Questions tagged [api-testing]

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.

Filter by
Sorted by
Tagged with
2
votes
2answers
312 views

Postman API test structure

Recently I started writing tests for our API. However, I have faced some issues which I think it is critical to think at the start. How should I structure my tests in terms of setup and cleanup phase (...
0
votes
2answers
204 views

Best practice for testing data integrity between server and UI

I am a QA. This is the software chart: Search Engine (Apache Solr) <-> Server (expose itself to UI by an API) <-> UI. The server makes queries on the search engine and send the returned data ...
1
vote
1answer
26 views

AllureRestAssured , how to ignore logging headers

I am using rest-assured and allureRestAssured for testing api given().header("Content-Type", "application/json") .header("key", key()).filter(new ...
3
votes
5answers
578 views

Advice on API Mocking Tools

I was interested in hearing people's experiences of using mocking, specifically for API testing. Whilst I’m (fairly!) well versed in automation techniques now, I haven’t yet used this approach but ...
1
vote
2answers
89 views

New to automation testing of APIs with Pycharm and Pytest

We are moving all manual testers to automation. I am very familiar with 'concepts' but really need a beginners step into automation for new API Service and endpoints. The developer is coding a new ...
1
vote
1answer
116 views

GUI tool for API testing with possibility to choose HTTP protocol version

I'm looking for a GUI tool for API testing that allows for changing a HTTP protocol version. There're many tools for API testing, but all I've found don't offer a choice of selecting what HTTP ...
1
vote
1answer
901 views

How to get number of requests sent and actually received by server in JMeter

I'm using Jmeter in remote env.(1manager server, 3-5 querying servers, 1 target server). I have fixed EPS/QPS and threads(gradually increasing up to a certain value). I want to know if there is any ...
0
votes
2answers
6k views

How do I implement Extent Reports in my rest assured api testing framework?

I have recently started rest assured to automate apis. My current framework folder structure has an ApiTestCases class in a folder under src/test/java I have a testNG suite xml to run the tests. How ...
2
votes
2answers
62 views

Search for minimum number of occurrences of a substring

The following is the Body of the response: { "downloadTime": "2021:03:17T17:52:21Z", "downloadTimeStamp": 1616003541, "genome": "hg38", ...
1
vote
1answer
967 views

Can we run One thread group with multiple threads but hitting same request by all threads concurrently in jmeter?

I have a one thread group with 100 requests in it, I am passing some ids from one request to another (it is a one complete flow of application). What I want to achieve is if I give 50 threads, each ...
2
votes
1answer
2k views

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

I have a multi module application "Project A". This application is hosted in clustered app nodes using tomcat as web server. We are using Spring, Web Services as primary among many other technologies ...
-1
votes
2answers
62 views

How can one test the security measures or vulnerability when it comes to API testing? [closed]

I use REST for API Testing. What are good tools and/or approaches to testing security issues ? Any information through which I can broaden my perspective,ways,tools for testing when it comes to API.
4
votes
5answers
9k views

How to randomly generate email address on postman request using pre-request script

I am new with Postman > Pre-request Script, Can you help me create a random email value for my API Request. Thank you in advance.
2
votes
1answer
73 views

When I use thread = 5 all test cases get failed but same test cases works wih thread = 1 on jenkin

I am executing the api test cases using TestNG. When i use the below command clean test -i --tests 'com.testcases.api.*' -Pgroups=mygroup -Pthread=1 -Ptype=api All test cases get pass however if I ...
2
votes
2answers
181 views

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

I've manage to get new job and what I can say so far - expectations for me are high. I never used to test API on production - usually I've been teached to test API on dev/test enviroment, but in ...
0
votes
1answer
1k views

Rest Assured | Why getting repeated errors when trying to automate apis using rest assured?

I have just set up rest assured framework and implemented it as a maven project. My pom.xml has the below mentioned dependencies <dependencies> <!-- https://mvnrepository.com/artifact/io....
0
votes
1answer
46 views

Taurus/JMeter - total time for thread group execution within pass/fail criteria

I have an end-to-end scenario to include in performance testing that takes a decent length of time to execute. Between releases of the system, this time needs to be monitored to ensure it hasn't ...
3
votes
3answers
5k views

How to test and automate APIs implemented in GraphQL

In our company, we are creating APIs using 'GraphQL'. I want to test and automate this API for CI/CD. I have tried 'REST assured' but it doesn't have proper support for 'GraphQL' queries yet, please ...
0
votes
2answers
178 views

Taurus - JMeter properties set via command line are not being picked up

I've got a JMeter test setup with the environment details (protocol, hostname and port number) set as properties. This is so I can repeat the same test on multiple environments through a pipeline. ...
1
vote
1answer
176 views

JMeter - save response to file listener but also ignore result

In JMeter, I am using a post processor running prev.setIgnore() within the setup thread group to ignore those requests. Some of these requests are JDBC requests to select data out of the database and ...
0
votes
1answer
46 views

Taurus & JMeter - ignore setup/teardown requests in reports

I'm using Taurus to execute JMeter test files. In my JMeter files, I need to do a small amount of setup and teardown (for authentication purposes and data seeding). They aren't directly related to the ...
0
votes
4answers
4k views

TestNG- No tests found. Nothing was run

UTF-8 io.rest-assured rest-assured 4.1.2 test org.testng testng 6.14.3 ...
0
votes
1answer
178 views

How to get variable in Flexible File Writer in JMeter

I was testing service with JMeter. I need to write the phone number into a CSV file and the phone number is a variable as you can see in the Debug Sampler. I was using Flexible File Writer for writing ...
1
vote
0answers
1k views

Postman gives There was an error in evaluating the test script: JSONError: No data, empty input at 1:1 ^ error

I'm trying to create a postman script that sends an SMS message to a phone. When I send the message I get this error: There was an error in evaluating the test script: JSONError: No data, empty input ...
8
votes
3answers
161 views

Rest API and resources validation from QA perspective

In the current project, let "toys" be the category and "gun" be the product. The ID for the toys category is 2 and ID for the gun product is 1. The URI for categories is /api/v1/categories/<...
4
votes
7answers
161 views

I want to practice testing API but can't find anything interesting

I want to practice in automating API testing but can't find anything interesting. Everything that I found were on the one hand rather complicated, on the other hand they did not allow testing such ...
1
vote
1answer
286 views

JMeter - csv data set with property as filename

In my setupThread, I firstly run some code to generate a property containing a file path. I then want to use this file path as the filename parameter for a CSV data set config (still within the ...
3
votes
4answers
179 views

How to spoof a third party API

Our application does calls to a third party API for completing a few tasks. This endpoint has an issue in the test environment, and management has asked us to mock this environment so when the app or ...
0
votes
1answer
107 views

aspectjweaver must be a valid version in POM.xml [closed]

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ...
1
vote
1answer
132 views

JMeter to Taurus - how to handle external property files and pass/fail criteria?

I've got a lot of JMeter tests setup - multiple test plans, thread groups, requests, asserts etc. We're using it for our functional API testing, as well as performance testing. I am now investigating ...
1
vote
0answers
46 views

Status code 400 when trying to use the petstore3 API [closed]

I am experimenting with API testing but I am stuck almost at the beginning. Please tell me maybe I am doing something wrong? On the petstore3.swagger.io web-page I press Authorize button and enter ...
0
votes
1answer
25 views

In JMeter, what are some good methods to handle external dependencies?

As the title says, what are some ideas for dealing with non-API request related dependencies in a JMeter test? I have a series of tests that work with zipped-up data. The first step in the test is to ...
-1
votes
1answer
33 views

How to fetch the list of newly created time entries alone using Postman? [closed]

From this json, I need to fetch created_at. How should I do it in Postman? { "meta": { "total_logged": 127200, "total_logged_per_team_member": [ ...
0
votes
1answer
541 views

Rest-assured - Schema to use cannot be null

Using the code below, I'm getting the following error: My code: @Test public void get_user_API_Schema_Test() { RestAssured.baseURI = "https://gorest.co.in"; given()....
1
vote
0answers
72 views

Consumer-driven Contract Testing

I've just come across the term consumer-driven contract testing and, working as a QA, was wondering a few things: What does this actually mean in laymans terms? Who would generally execute this type ...
0
votes
1answer
187 views

Test Plan/Strategy of an application which has API +DB

I have faced this question numerous times during interviews. Given a simple application diagram (like below) how would you test it or what will be your test plan or test strategy. I know it is a very ...
2
votes
0answers
222 views

Laravel codeception api testing test structure

I want to test all my API endpoints with codeception. I started off with a more model-based approach: class UserCest { public function it_can_request_its_own_status (ApiTester $I) { ...
3
votes
1answer
180 views

How to count max character text for JSON api test

I have a JSON free text field that allows maximum 1000 characters. I want to check whether user is able to send paragraphs, so when I parse the text to string using online tools some extra characters ...
0
votes
1answer
528 views

JMeter - can multiple thread groups use different rows within the same input csv file?

As part of my setUp Thread Group, I plan on creating objects that I need to refer to later on. Some of these objects are to test particular request methods like GET/PATCH/DELETE - things that need a ...
1
vote
1answer
206 views

Mock test automation with Wiremock + Xray + Jenkins possible?

Task Workflow, which links Wiremock + Postman + Jira +Xray + Jenkins in such a way that automatic test procedures can be carried out, which then return reports to Xray. Details Currently we use the ...
2
votes
2answers
534 views

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

When we assert our body part, we use the method equalTo() but while asserting for Header, we are just providing ("Key","value") pair only. Why can't we use just- body("scope&...
2
votes
1answer
912 views

UFT and RestAssured

My company is working on API which is RESTful JSON Web API. So far, all my testing was done using Selenium WebDriver. I was given a task to look for a tool that can help us automate the API tests(...
0
votes
1answer
893 views

JMeter - how to use external property files robustly in GUI and non-GUI mode?

I've got a JMeter test plan that I'm in the process of amending to use external property files for environment details and thread group numbers - similar to this link: https://octoperf.com/blog/2019/...
1
vote
1answer
43 views

Sticking to DRY when fixtures and test cases overlap

I'm looking for a way to structure tests from simpler to more complex and at the same time stick to the DRY principle. Here is an example that might clarify things better. I'll use some pseudo code to ...
6
votes
2answers
10k views

Testing a Python REST API

We want to add formal testing an quality assurance to our application API. It is written in Python using Flask with Restless and outputs JSON. My question is what is the best way to test our API? It ...
1
vote
1answer
350 views

RestAssured: Url Constrcution with query param where param value is not String

Is there a way to construct Url with query parameters where the value of the query param is not string. For String values of query parameter there are APIs in RestAssured or apache httpClient but I ...
6
votes
3answers
3k views

How to test if my application method handles HTTP status 404 of a REST API without actually calling that REST API

I am currently trying to automate some of the testing for my application using JUnit. My application has a method which calls a 3rd party REST API. I need to check if that method is handling HTTP ...
3
votes
2answers
26k views

How to verify response body as a test in postman

I want to verify the response data as a test using Postman. For example, given the response below: { "data": { "id": 2, "first_name": "Janet", "last_name": "Weaver", "avatar":"...
3
votes
3answers
140 views

Pros and cons of using database dump in autotesting?

I'm going to write API and e2e auto-tests, and planning this encountered the problem of how to load test data needed to execute test cases. I see 2 approaches: Use api to create necessary resources....
1
vote
2answers
3k views

JMeter - FileToString with relative file path to test plan?

I've got a JMeter POST request that has body data like below: ${__FileToString(/${json_request}.txt,,)} The json_request variable comes in from a CSV data set config, allowing me to iterate through ...