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 ...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...
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.
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 ...
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 ...
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 ...
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 ...
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",
&...
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 ...
1
vote
How to avoid API tests duplicating Unit tests
Unless doing BDD, you'll find the Devs write unit tests and QA to writes functional tests as a typical test pyramid pattern.
A unit test will basically feed inputs to your different functions. "...
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 ...
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 ...
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]...
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 ...
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&...
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(), ...
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.
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 ...
1
vote
I am about to automate the Web API testing, how to initiate
First of all, you should ask from developers the API Documentation and understand it. Then prioritize the cases after discussion with them.
I would suggest using Rest Assured which is a Java Library ...
1
vote
How can I test Web service without any automation tool and only using manual
cURL.
I recommend using this command-line tool for the following reasons:
it allows both developers and other testers to reproduce your test or issue you have found by just copy-pasting your command ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rest × 34api-testing × 13
automated-testing × 10
soapui × 9
rest-api × 6
web-service × 5
java × 4
manual-testing × 3
jmeter × 3
test-management × 3
api × 3
json × 3
c# × 2
postman × 2
rest-assured × 2
http × 2
python × 1
test-design × 1
testng × 1
android × 1
testcase × 1
agile-testing × 1
qa-developer × 1
quality-center × 1
security-testing × 1