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
4
votes
1 answer

pytest request param of fixture to be used in tests

I have parameterized my fixture to call APIs, with different input data to POST request on each call with scope as class. Since I need to check API response with sent data. I need to read request params of the fixtures into tests. class…
Amit K.
  • 549
  • 2
  • 5
  • 11
4
votes
6 answers

RestAssured: java.lang.IllegalArgumentException: Schema to use cannot be null?

I need to compare my api tests response against an external JSON file. Seem to be seeing the following exception: 'java.lang.IllegalArgumentException: Schema to use cannot be null' when executing my api test. My Test: @Test public void…
SamP
  • 417
  • 5
  • 24
4
votes
4 answers

How to assert based on body item with Rest Assured with JSON response?

How can I assert my properties inside the "description" array using the rest assured .body() method. Example: .body ("[0] .userType", equalTo (1)); // error Here is my current JSON data which I want to assert with: { "validSession":…
JJB
  • 115
  • 1
  • 1
  • 7
4
votes
2 answers

Asserting entire response body in post man

I recently started working on spring boot projects. I am looking for a way to assert the entire response of my API. The intention of this is to reduce the testing time taken for the API. Found A few solutions mentioned below, but nothing helped me…
Tushar Banne
  • 1,587
  • 4
  • 20
  • 38
4
votes
2 answers

Get content length of Postman request including variable values

How do I programmatically get the content length of a Postman request INCLUDING variable values? I need to include the content-length header in a PUT request I'm putting together in Postman. I can get the request content length in a pre-request…
bynary
  • 841
  • 2
  • 11
  • 26
4
votes
2 answers

How to set environment variable in postman collection runner?

I have an API named getcampaignlist. It returns me all campaign list with descriptions according to relevant person. Like in image I have multiple campaign with id and description. I want to set environment variable…
4
votes
2 answers

jMeter .jmx to corresponding java code

We can generate JMeter .jmx files from JMeter Java APIs. Is there any way via which we can convert per-recorded .jmx file into corresponding java code? This can be useful for comparing changes between jmx files versions.
Rohit
  • 3,314
  • 1
  • 13
  • 15
4
votes
1 answer

Batch running multiple Newman (Postman) test collections

I have defined several Postman test collections/folders and their associated test data files. Running them through Postman Collection Runner and Newman individually works fine. I wanted to batch multiple runs together, like this .bat in Windows: SET…
zemien
  • 562
  • 6
  • 17
4
votes
3 answers

Selenium vs XmlUnit+HttpClient for web REST API testing

I need to test web API functions in REST format. Currently using Selenium RC for functionally testing the website. And using XmlUnit and HttpClient to functionally test our REST API. But it seems life would be easier if we could really separate…
at.
  • 50,922
  • 104
  • 292
  • 461
4
votes
2 answers

Content-Type application/soap+msbin1 in SOAP UI / SOAP UI PRO

I have a WCF service and I am attempting to use it with SOAP UI PRO. On the first execution I got the following response: HTTP/1.1 415 Cannot process the message because the content type 'application/soap+xml;charset=UTF-8;' was not the expected…
4
votes
3 answers

libraries for end to end testing or api testing in clojure?

I am planning to add test suit for my web-project and some mobile api. I finalise Midje and clojure.test to test each line of code basically for (Unit Testing), but I am unable to figure out test libraries to test end-to-end api. what about…
piyushmandovra
  • 4,219
  • 3
  • 19
  • 30
4
votes
1 answer

web api integration testing

I have an integrationtest project and a web api project in the same solution. The integration tests use RestSharp to call the web api. When running the integration tests I want the web api project to launch first. Is that possible?
Rune
  • 381
  • 1
  • 3
  • 14
3
votes
1 answer

How to use query parameter with different combination in rest assured in Java?

I have 6 query parameters. All of them are optional. How should I use them with all combinations? I tried the following: do { Response searchbyfield = given() .headers("Cookie", cookies) .queryParam("search","test") …
3
votes
1 answer

Playwright API testing: intercept API request

I'm testing a server with Playwright's API testing. I have a simple GET route, that always returns a 405 not allowed. It also logs that the API route was called. For the sake of this StackOverflow example, I replaced the log with a fetch to a place…
J. Hesters
  • 13,117
  • 31
  • 133
  • 249
3
votes
0 answers

Why multiple tests are not allowed in robotframework-datadriver while using csv file.. is there some workaround?

Problem Statement: I want to have 1 robot file with 3 Test cases 1st test case would not use any Test Template 2nd test case would use a Test Template using Variables in 'Variables' section so as to iterate same template with multiple data sets 3rd…
1 2
3
52 53