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
0 answers

API requests and security tokens writing Selenium tests

I have recently started writing Selenium tests on C#. Some test setups create users calling API before interaction with UI. Implementing security requirements developer added a request verification token as a parameter into API model. Now, creating…
0
votes
1 answer

Test performance of multiple APIs at a time using Jmeter

I have some 100 RESTful APIs in my projet. For a specific reason I want to run all 100 APIs in one go, each one say with loop-count of random number 'n'. Is it possible. How can I do it. May be by writing a script or something? One suggestion was -…
Naveen Kumar
  • 384
  • 2
  • 11
  • 31
0
votes
1 answer

Adding OAuth to a rest api for testing

So I am testing the REST API's given by uber to implement uber service into my app, while sending a request to one of their api it sends me response massage: { "message": "No authentication provided.", "code": "unauthorized" } while iam…
Manish singh
  • 108
  • 1
  • 3
  • 13
0
votes
2 answers

"Post" method test result error in JMeter API testing

I tried to run a POST method for API testing in JMeter, I have sent the parameters as needed, but still it shows cannot post. What should I do to make it work? user add post request response message
manisha
  • 57
  • 10
0
votes
1 answer

JSON response from RestSharp is returning an empty character at the start

I just started setting up a framework for testing the API's and I'm using specflow with C# and VS. I'm able to send a request and receive a JSON response, however when I tried to Deserialise the response.Content I am getting an error. I think it is…
Fishyish
  • 21
  • 5
0
votes
1 answer

Unit testing strategy

I have to admit I'm quite new to unit testing and there is a lot questions for me. It's hard to name it but I think it's behaviour test, anyways let me go straight to the example: I need to test users roles listing to make sure that my endpoint is…
0
votes
1 answer

Passing the web service response from API Test to GUI Test in UFT 12.52

I want to achieve the following tasks: 1) Send the request 2) Validate the response 3) Use the various field in the response as an input for GUI validation of the web application. I am stuck on the last step. Is there any specific way to retrieve…
Lal Ansari
  • 139
  • 4
  • 13
0
votes
2 answers

How can we validate json based on key value pair in Jmeter

I haved worked around with Jmeter for load Testing. But now i am focusing on api automation. Reading file from CSV for the endpoints and Response expected, only challenge i am facing whether how to validate the json based on key value pair, so that…
Vishal Chepuri
  • 306
  • 5
  • 26
0
votes
1 answer

Unit tesing an api call using jasmine

I am writing unit tests for my website at work and I cant seem to figure out how to test an api call. Lets say I want to test an api call in one of my Vue components api.ajax("users") .done((response) => { …
0
votes
0 answers

Node module to Grab cookies from an http.request()

I am using https.request() to invoke and test a bunch of REST APIs. I need to maintain session information which invoking a bunch of APIs and so the cookies and other headers from one API response is to be submitted in the subsequent API request.…
GnyG
  • 151
  • 1
  • 2
  • 11
0
votes
1 answer

Adding negative tests to my dredd/hook CircleCI test suite (API document on apiary), Relevant? Other tools?

We are using dredd to test our API and have been making use of python hooks to successfully separate the API document and however dredd makes use of it from the rest of the test logic. My question is: is it possible to incorporate negative tests…
Shachar R
  • 311
  • 1
  • 2
  • 8
0
votes
1 answer

Codeception add new JsonTypes

I wonder if it's possible to define some custom JsonType for validation API responses through seeResponseMatchesJsonType method. I mean, let's suppose I have response with a structure: [ 'id' => 'integer', 'name' => 'string', 'address' =>…
Tomasz Kapłoński
  • 1,320
  • 4
  • 24
  • 49
0
votes
1 answer

API Integration With Facebook - Testing

I am working on API Integration Tests. In particular, I am trying to test the user's ability to login to our application with Facebook. Prior to signing in with our API, the user must sign in with Facebook on the front end of the application via the…
moonboy
  • 1,296
  • 4
  • 16
  • 29
0
votes
1 answer

How to set cookie for localhost to test API in NodeJS?

I have a web application and I'm writing APIs on NodeJS. I want to test this APIs use mocha, chai and Node-rest-client and don't open browser, but I have a problem: "I don't know How to set cookie (Authorization of header) when I ran server on…
Tam Vo
  • 301
  • 4
  • 13
0
votes
1 answer

Can anyone suggest how to generate Rest body dynamically while calling Get API with Query match

In my case, while calling API (GET Method), I should send the below query as part of the body. URI : GET XXX/_search Body: { "query": { "match_all": { } } } As of now, I'm hard-coding the string and appending to the…