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

Access array value from codeception object

I am on PHP53 so codeception 1.8 $response = (array)$I->grabDataFromJsonResponse("result"); \Codeception\Util\Debug::debug($response); Array ( [*position] => 0 [*val] => Array ( [key1] => 10 …
Neil
  • 5,919
  • 15
  • 58
  • 85
0
votes
1 answer

How to document the failing JUnit tests

I have developed an Automation framework with JUnit for our API Testing. Here I have created a separate class for each API listing multiple unit tests for that API. I want to list each failing JUnit test case in some separate file so that I can…
0
votes
1 answer

UFT-API Testing-How can I can store values of response in an excel file?

I am sending a request two times using LOOP, and in output I am getting a unique value. I want to store these unique values in an excel sheet column so that further I can parameterize all the values. I have successfully got the values to a TEXT…
0
votes
0 answers

Getting Not Logged In Error! for 200 Response

I am trying with simple scenario stated below: Initiating the Webdriver instance and logging in to the facebook page trying to GET the response for the Browser_all/nullState.php?**sometext for the same I am getting following error. Error ! Not…
0
votes
2 answers

How to change the service URL in SoapUI

We are automating the Rest APIs using SoapUI free version. Here we would like to handle the service URL i.e. As of now we have 3 environment for testing: QA, UAT, Pre-Prod. The difference between the environments is the base URL. The end points will…
0
votes
0 answers

symfony phpUnit functional test printing response instead of checking test cases

I am using Symfony 1.4 Used phpunit function test get('/api/v2/membership/membershipDetails')-> …
-1
votes
0 answers

Error message appearing while generating html reports in newman

enter image description hereI have installed Newman and Newman-reporter-HTML in the same folder, still whenever I run Postman collection through CLI and try to generate reports it displays the following error: "ensure that the reporter is installed…
-1
votes
0 answers

Rest Assured getting TLS10 protocol handshakeSSLexception

I am working on rest assured to test the rest APIs. When I am hitting my rest api through rest assured I got below error in some of the api not in all apis. ERROR - "javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is…
-1
votes
1 answer

How can I call a GET endpoint from Postman with JSESSIONID and CSRF protection enabled?

My cookies in the request header look like this: website cookies When I log out or the session expires, I can't make a GET request in Postman, because the values of those two are different each time. I don't know how to generate csrf token and…
Vasil
  • 1
  • 1
-1
votes
1 answer

Cannot post a tweet using rest assured

I cannot post a tweet using Rest assured, the test case passes every time but the status code is 403. I have passed the consumerKey, consumerSecret, accessToken and secretToken. I have attached a screenshot.pleaseCheckAttached
Som
  • 1
  • 3
-1
votes
1 answer

When I compare my password through Insomnia API tester by doing tests on username and password for the first time it works but then server crashes

router.post("/auth", async (req, res) => { const { username, password } = req.body; const user = await login.findOne({ where: { username: username } }); if (!user) res.json({ error: "User Doesn't Exist" }); bcrypt.compare(password,…
-1
votes
1 answer

How to use {{$randomInt}} in request body and save it in environment

I am trying to generate a random number using {{$randomInt}} and writing this script in pre-request script to get and set the value in an environment let rand_int = pm.variables.replaceIn('{{$randomInt}}') pm.environment.set("rand_int",…
-1
votes
1 answer

Jackson xml Unrecognized Property Exception after karate 1.2.0 upgrade

I have a existing test for a endpoint which was working fine with Karate 1.1.0 but after recent update to karate 1.2.0 it stopped working due to Jackson xml uncognised property exception test endpoint which accepts request body in terms of…
hamsa raj
  • 39
  • 1
  • 5
-1
votes
1 answer

How to I declare Global Variable in Robot Framework and use it in another robot file

In the response I'm getting one access token which I'm storing in ${Token} variable and want to set it as Global variable and want to use it in SendFax.robot file **GenerateToken.robot** *** Variables *** ${base_Url}= …
-1
votes
2 answers

Casting an ActionResult rather than IActionResult to an OKObjectResult for testing a 200 status code?

I am moving to use and ActionResult rather than IActionResult so that Swagger automatically picks up my types, but I am getting an error saying that I cannot cast an ActionResult to an OkObjectResult. How do I cast to an OKObjectResult for testing a…
iamsimonsmale
  • 366
  • 3
  • 14