Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 27679

API testing is a type of software testing that involves testing APIs directly and as part of integration testing to determine if they meet expectations for functionality, reliability, performance, and security.

11 votes
Accepted

Is it a best practice to use loops for a test case to run it multiple times?

Apart from the fact your second piece of code will not even be compiled and also pretty much not representative since you're not showing us how exactly you would use the information of which particula …
Dykotomee's user avatar
  • 103
3 votes
Accepted

Advice on API Mocking Tools

Depends on what your resources are you might want to use either online service like either https://www.mocky.io/ or https://www.mockable.io/ or https://get.mocklab.io/ (that is build on top of wiremo …
Alexey R.'s user avatar
  • 11.6k
0 votes

API Testing on production - what requests shouldn't test?

If you have no other options except of performing your tests in prod, you should avoid using the methods which change the application state. Here are few sides you can look at the issue from: HTTP st …
Community's user avatar
  • 1
1 vote
Accepted

REST Assured API | Why we use equalTo() while asserting body part of response?

Answering your particular question, I'd like to spotlight that there are several ways to assert headers. And ("Key","value") is one of those ways. You can also find the methods which allow you to appl …
Alexey R.'s user avatar
  • 11.6k
1 vote

How to extract a value from a JSON response with Java and Rest-Assured

What you are showing is called a JSON object. Unless you're in JavaScript (that can natively parse JSON data) you can use a jsonpath language that is very similar to xpath (serves for similar purpose) …
Alexey R.'s user avatar
  • 11.6k
2 votes

What are the scopes of API testing

Going through your particular points I would say that This is the valid observation since this is improperly configured request (aka client error) so it has to be responded with 4xx status code. In …
Alexey R.'s user avatar
  • 11.6k
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
3 votes

How to provide more value from test automation to Dev/entire team?

To make it valuable for the entire team I would suggest to: Integrate your tests into CI process. So you need to take a role of devops or help your devops to do that Design your tests in BDD style ( …
Alexey R.'s user avatar
  • 11.6k
4 votes
Accepted

Should I obtain data required for particular test case using appropriate endpoint or read it...

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 o …
Alexey R.'s user avatar
  • 11.6k
1 vote

Testing specifics of GraphQL API endpoints

GraphQL endpoint is just a REST endpoint that returns you some data in response to some input data. So in this abstract there is no any specific things to test. Like in any other endpoint there is som …
Alexey R.'s user avatar
  • 11.6k
4 votes

How to test and automate APIs implemented in GraphQL

You should approach with REST Assured one more time. Actually it should perfectly fit your needs. When you run GraphQL service you basically run a REST end-point where you send some query and receive …
Alexey R.'s user avatar
  • 11.6k
0 votes

How to get Code coverage via external rest assured API automation using jacoco?

Check if your API tests with rest-assured operate with all the possible parameters (not just end-points) that could run your API in all possible ways Do not ignore negative tests. In my experience we …
Alexey R.'s user avatar
  • 11.6k
2 votes

Is it a good/industry practice to create both UI and API testing projects in one project?

I prefer to segregate the projects. There are few pros for doing so: If there is quite a lot of code in your project then you'll have to wait while all your code will get consistent (compiled, addre …
Alexey R.'s user avatar
  • 11.6k
0 votes
Accepted

What does integration testing an API involve?

Answering your questions It doesn't really matter and depends on the test implementation and execution complexity, skills of dev and test people, their current tasks and tasks' priorities. Integrati …
Alexey R.'s user avatar
  • 11.6k
1 vote
Accepted

Advice on assertions to make when creating an API testing framework

That depends on what exactly you're going to test. If you're going to test only API logic, then you should assert Response codes Response body (since API methods often return objects within the body …
Alexey R.'s user avatar
  • 11.6k

15 30 50 per page