Questions tagged [web-api-testing]

Web API testing is the functional testing of HTTP based services.

Testing can include verification of domain related behavior and/or compliance with HTTP specified application behavior as described in RFC 7231.

787 questions
0
votes
1 answer

Response time, Load Testing and Stress testing with Rest Assured

I know there is a way to measure the response time of a Rest API with Rest Assured. But can we increase the user load and measure the response time using Rest assured ,or is there any other suggested way to count in those parameters (Load / Stress)…
0
votes
1 answer

Integration testing using sqlite memory two api calls

I am having trouble making an insert call (and creating the database) after the query occurs that the database is in memory the problem is that the acada call the database dies. It would be interesting to be able to do the database creation in my…
0
votes
1 answer

Validating UI against JSON response in RESTAssured/Java

I have a test scenario wherein the fields in my Web application are populated with data from json response. e.g-> there is a field person id which when entered populates dozen other fields in UI ,make certain fields enabled or disabled depending…
started late
  • 97
  • 10
0
votes
1 answer

What is the standard for testing php phalcon api endpoints?

When testing an API endpoint is there a way to make the HTTP request to a test server started by the testing framework(PHPUnit) maybe building a specific database just for testing? What I find online is a bit strange. It implies to make a request to…
0
votes
2 answers

Incorrect Array length and array element when saving a JSON object key

I have an API with a JSON Array of objects response like this [ { person_id:"12212", person_name:"some name", deptt : "dept-1" }, { person_id: "12211", person_name: "some name 2" deptt : "dept-2" }, ] I…
demouser123
  • 4,108
  • 9
  • 50
  • 82
0
votes
1 answer

How to read and assert response from CSV using postman

I have CSV file GCNumber,facilityid,Balance eqx93019107722,871,150 WEB270412011610,871,100 WEB270412014333,871,200 Request URL: http://localhost/purchase/gift-card/{{GCNumber}}/for-facility/{{facilityid}} Wanted to write a test script using…
0
votes
1 answer

Postman environment variable returning null

I want to add a payload schema to an environment variable so that I can validate the response payload against the schema. I have my environment variable defined as follows: responseSchema: { "properties": "firstname": …
fuzzi
  • 1,967
  • 9
  • 46
  • 90
0
votes
2 answers

How to export a variable from inside a Mocha describe block

I am currently using Chakram API Testing framework to test some REST API endpoints. The first API gets a CSRF token which is used in the rest of the endpoints in the headers. The CSRF API returns a JSON object - something like this { csrf_token :…
demouser123
  • 4,108
  • 9
  • 50
  • 82
0
votes
1 answer

How to assert a header contains specific value in Chakram

I have an API which has a response header of Keep-Alive with the following values Keep-Alive →timeout=15, max=100 I want to assert that the values timeout is at least 10 and at most 100. Earlier I was using Postman BDD library and had this code let…
demouser123
  • 4,108
  • 9
  • 50
  • 82
0
votes
2 answers

Getting java.net.UnknownHostException while executing the basic automation script for Rest Api

I just executed the below script : import io.restassured.RestAssured; import static io.restassured.RestAssured.given; public class Basics { public static void main(String[] args) { RestAssured.baseURI="https://maps.googleapis.com"; given(). …
Baburaj V
  • 63
  • 1
  • 2
  • 12
0
votes
2 answers

Java: org.json.JSONObject - creating a new instance removes trailing zeros from big decimals

Take for example this short JSON taken as a String from an API response using RestAssured: { "id": "4d27afb18bfa4eb5917beee9aaddfa76", "hedgeId": 205598, "sellCurrency": "USD", "buyCurrency": "EUR", "buyAmount": 473935.00, …
iamkenos
  • 1,446
  • 8
  • 24
  • 49
0
votes
1 answer

How to specify (import?) scheme in GraphQL in python (graphene?)?

shame to ask, but we have GraphQL Server on Java (https://github.com/graphql-java/graphql-spring-boot), where we specified type.graphqls scheme for our service. On client side we have JS code based on Apollo Client library. And it does not need…
0
votes
0 answers

Issue faced in rest assured library

I am working with rest assured libraries and building a automation utility for it. My target URL looks like baseURL/catName,cat version. Now when I try to get response using rest assured, I am getting 404 error but same URL is working correctly in…
aviral
  • 1
0
votes
2 answers

extract value from json array of API response without brackets not working

Here is JSON: { "first":0, "rows":100, "data":[ { "id":326, "tag":"QATA9", "workNo":"qat12345" } ], "totalRecords":1 } And my code is : JsonPath jsonPathEvaluator = response.jsonPath(); wID =…
0
votes
0 answers

Process finished with exit code 0 at compile time in pytest API Testing

Trying to fetch data from created fixture but at Compile time getting error :Process finished with exit code 0 So please help me to remove that error and make my code running and as an output fixture setup1 has to be run def setup1(): headers =…
Parth Makwana
  • 51
  • 1
  • 9