15 votes
Accepted

How to approach API testing?

API Test Checklist Endpoints Actions Status Codes Payload Data Performance Security Specifically Verbs / Actions / Methods What documentation exists ? What functionality it provide ? Does it ...
Michael Durrant's user avatar
9 votes

How to test the REST API's effectively ( Complete )?

I really like this question, it's something I've thought about a lot. Validation response codes and a JSON body is a good start, but like you said, there's a lot more that can be done. I built an API ...
Cody Reichert's user avatar
5 votes
Accepted

How to create generic Java code to make REST API calls?

I generally agree with @alexey-r... You should probably just re-write the code when the library changes. Companies change libraries for a reason; new features, better features, streamlined ...
MivaScott's user avatar
  • 548
5 votes
Accepted

Suggest me the best way to automate REST web services with JSON using Java

If you would love to test REST API then I would recommend you to use Rest Assured which is a Java Library. It’s better to create Page Object Model and use Testing Framework like TestNG to write tests....
Ashwiinn Karaangutkar's user avatar
5 votes

How to avoid API tests duplicating Unit tests

The tests serve different purposes. Overlap is good. The 'overlap' of higher order tests (such as API) and Unit tests should be high. In fact 100% would be good. Unit tests mock and stub all ...
Michael Durrant's user avatar
4 votes
Accepted

Should I obtain data required for particular test case using appropriate endpoint or read it directly from the DB?

This depends on what type of testing you implement: If it is a component testing (or if your goal is to test the particular end-point) you should isolate your component from the possible impact of ...
Alexey R.'s user avatar
  • 11.6k
4 votes

How to create generic Java code to make REST API calls?

I would approach with just refactoring the code to use restLibTwo. Here are few points on why I would do that: Rest calls are just HTTP calls. Moving to another lib (for example RestAssured) would be ...
Alexey R.'s user avatar
  • 11.6k
3 votes

How to create generic Java code to make REST API calls?

You can take a look at Google HTTP Client Library for Java, that offers: Pluggable HTTP transport abstraction that allows you to use any low-level library such as java.net.HttpURLConnection, Apache ...
dzieciou's user avatar
  • 10.5k
2 votes

I am about to automate the Web API testing, how to initiate

I believe for your second question you have enough and more answers so I'm not going to touch base on it. Coming to your first question, I.e what questions you need to ask, sharing some of my ...
Vikam's user avatar
  • 21
2 votes

How to test the REST API's effectively ( Complete )?

REST API is just an API to a system, so the way the system responds to your request depends often not only on your request but also on the state of your system and time when you call it. So you should ...
dzieciou's user avatar
  • 10.5k
2 votes

Testing a REST API client

Interfake is another option. You can create HTTP servers from a JSON file or through a straightforward JS API.
Hassy Veldstra's user avatar
2 votes

Suggest me the best way to automate REST web services with JSON using Java

Karate is a relatively new project that is specialized for testing JSON web-services and it runs on the JVM. Disclaimer: am dev. There are a set of demos and examples that will get you started very ...
Peter Thomas's user avatar
2 votes
Accepted

What type of tests would you run on this http GET request?

Looks like you've got some of the input checks. Some thoughts: You mention Postman, so I'm guessing no DB access? The API returns the plaintext password? That seems bonkers beyond the input ...
ernie's user avatar
  • 1,040
2 votes
Accepted

soapUI - REST API, parameters as variables in request body are empty (*previously posted as guest by accident)

Steps I followed Create a new Rest project Add plain parameter to request called it in request body using ${test} (${#test} also works) Right-click the request and click 'Add to Testcase' Now run the ...
PDHide's user avatar
  • 11.1k
2 votes

How to create generic Java code to make REST API calls?

I believe Alexey and MivaScott have provided good advice here. I would like to add some additional thoughts on why coding to use any possible REST API client may not be the best idea. Some of this ...
anonygoose's user avatar
2 votes

Postman PUT returns success, but parameters are null in response body

Welcome. You need to read the documentation in detail, it shows an example of a request body for PUT method: { "name":"test1", "salary":"1123", &...
pavelsaman's user avatar
  • 4,548
2 votes

Testing REST - submitting a web-form. Identifying why the server responses with 500 for some emails and for some - 200

Your testing is good. You are considering different possibilities and conducting experiments to see what happens. That is great. I would continue that process. Here are some thoughts for you to ...
Michael Durrant's user avatar
1 vote

Testing REST - submitting a web-form. Identifying why the server responses with 500 for some emails and for some - 200

- Is it really happening because of x-www-form-urlencoded? If so, why then we are able to get 200 Ok with [email protected] and any other real email? it seems that it's a bug with the way ...
PDHide's user avatar
  • 11.1k
1 vote

Is it a good practice to compare responses with benchmark responses in API Test Automation?

It depends on the service. If I'm testing something that doesn't change, or doesn't change often, I would assert the response against a benchmark response. For those services where the data may ...
Chris Adams's user avatar
1 vote
Accepted

Rest assured API to get a element from Json response

Use the following jsonpath query: serviceLines[0].customerProducts.findAll{product -> product.highLevelProduct == 'HSI'}.customerProductIdentifier Test: System.out.println(js.get("serviceLines[0]...
Alexey R.'s user avatar
  • 11.6k
1 vote

Testing multiple API contracts as part of 1 test

You could use BDD #Cucumber here. Given, When, Then keywords are its keywords. In Given step method trigger API POST to create the user. In When step method, trigger GET to retrieve user details. In ...
Harita's user avatar
  • 41
1 vote

Deserializing JSON response using RestSharp

Assuming the de-serialized class for the json looks something like below, the way to extract "circuitId": "albert_park" is follows: The code is not C#, but this can give an idea. List<Circuit&...
Kshetra Mohan Prusty's user avatar
1 vote

How to verify the body context using Assert command

Assert : Reminder : If Assert get failed the execution or program get terminated there itself. It can be used as follows: Assert.assertEquals(driver.findElement(By.id("your_element_id")).getText(), ...
Narendra Chandratre's user avatar
1 vote

How to test the REST API's effectively ( Complete )?

Performance Testing (or at least some concurrency testing to ensure that if 2 users call the same endpoint exactly at the same time it will still work as expected). The tools which could be used: ...
Dmitri T's user avatar
  • 13.5k
1 vote

How to test the REST API's effectively ( Complete )?

The best reference to design your test cases is API documentation a.k.a API contract. This document describes: How to call the APIs What to expect from them Generally, you can have these kind of ...
masood ghz's user avatar
1 vote

Tools for mobile web services, rest api testing

You may refer to this article for the list of API tools. Personally, I prefer Postman for its less required programming skills and Katalon for its simplicity and free license.
Helen's user avatar
  • 11
1 vote

Tools for mobile web services, rest api testing

I´ve been using SoapUI to test APIs (both rest and soap) and I always recommend it as the best option. You can test easily the features and, at the same time, it is easy to run those tests from ...
Borja's user avatar
  • 31
1 vote

Tools for mobile web services, rest api testing

Some of the tools that can be used for rest API testing are ReadyAPI/SoapUI NG Pro. Postman Advance Rest Client Postman and Advance Rest Client are free Chrome Apps. If you want to code with Java, ...
Lord Nick's user avatar
  • 111
1 vote

SoapUI: Refresh/update test step's payload or request headers from REST resource's request definition?

I would accomplish this with a groovy script, effectivly you would get the request from your project then use that to update your test step You can do it with something along the lines ofthe psudo ...
ECiurleo's user avatar
  • 2,043
1 vote

I am about to automate the Web API testing, how to initiate

Try Katalon automation tool. It is open source free and reliable. Installation is simple. To configure and how to PERFORM API Testing using KATALON you can refer these article from mundrisoft or ...
Sachin's user avatar
  • 23

Only top scored, non community-wiki answers of a minimum length are eligible