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
-1
votes
1answer
23 views

Login call should hit before every call in Jmeter

In my projects' auth token, I can use it once then it expires so obviously other calls are also failing. All the sub calls are configured in the csv file(s), tied with multiple jmx file integration ...
4
votes
1answer
90 views

Is it okay to use UI automation code in API automation tests?

Say that I am testing a GET api. The get api fetches data which is stored due to user actions on a web UI. The data cannot be setup by simply looking at the network inspector calls for these actions ...
0
votes
1answer
70 views

Testing REST api with postman

I am very new to this, so I am approaching it like I would test a sign up form for instance. I have a Rest interface exposed for testing operations: Getting all users, getting users by id, searching ...
0
votes
1answer
40 views

Eclipse C++ Unit Testing without Unit Testing framework

I am looking for some ideas on how to implement a Unit Test framework without any existing unit test tools like Google Test Runner. I am on a closed network without internet access and so whatever ...
3
votes
3answers
106 views

The scope of automated API testing for a SQA tester

My situation: I am creating automated tests for testing a server's API endpoints. It is connected to a database and making requests to its API endpoints can result in it grabbing data from the ...
0
votes
0answers
38 views

How to remove keys from rest-assured ValidatableResponse and assert response with constant json string

In rest-assured test cases I am getting mentioned 'ValidatableResponse response' where I want to remove keys such as "updated_at", "deleted_at", "created_at" and "notice" and assert this object with ...
0
votes
0answers
18 views

How to remove keys from response json and hold remaining json data in an object using java 8 lambda expressions for rest assured test case

In REST-assred test case I am getting ValidatableResponse body as mentioned from which I want to remove notice, created_at, updated_at and deleted_at keys using java 8 lambda expressions and assert it ...
1
vote
3answers
473 views

Unit Test - Testing API Methods

I was reading the following article Unit testing an API This article is about unit testing an API and the methods on a class through the interface. What I do not seem to grasp is the fact that in my ...
0
votes
1answer
61 views

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

Is it is good practice while writing automated tests for APIs to compare the complete response of the requests with a benchmark response instead of writing specific tests to verify the required values ...
0
votes
1answer
37 views

Is it necessary to write test cases for different test levels?

When creating test cases after unit testing(done by developers) QA team starts working on component testing. For component testing level there will be test cases written by the QA's When it ...
0
votes
1answer
29 views

Error showing for url when try to run api test script with Newman

I'm beginner to REST API testing. I wrote some scripts for some scenarios using postman and tried to run with Newman. (In there URL defined as environment variable.) Showing errors for that URL when ...
0
votes
2answers
116 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":"...
1
vote
1answer
37 views

For my POST method i used Threads User multiple but actually when i run jmeter record will added only single time

I have created Thread Group with 5 number of users, but in actual when I run my POST method then record add only single time, but I want to add 5 records in a single run to check performance for POST ...
1
vote
2answers
40 views

How to identify a specific location in returned Json through a postman test

When submitting an order to an API we get a Json response containing: "AMLResults": [ { "amlResult": [ { "addresses": [ { ...
2
votes
4answers
107 views

Diff between Integration(written by dev) and End to End testing(written by qa)

Recently, I was in conversation with a developer, developing an API. We had a conversation appertaining to testing of that API, while I told him we will test the end to end flows of API using ...
0
votes
1answer
119 views

Rest assured API to get a element from Json response

I'm using restassured.path.json.JsonPath extractor From the below response I would like to extract the customerProductIdentifier where highLevelProduct is HSI, { "recordsChoice": [ { ...
3
votes
3answers
133 views

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

Working primarily as UI test automation engineer, what further steps one should take to be more valuable & useful to the Dev team. How one take automation to a level where it becomes an handy ...
0
votes
2answers
64 views

How should I design test automation project by including UI testing, DB testing and API testing components?

We are planning on revamp for an old system. Also previously we haven't done any test automation tasks too. So my plan is to start the automation project earlier for the existing system and give a ...
0
votes
2answers
89 views

How to decide Test Cases for API vs GUI Automation

Please help me understand, if I am trying to implement Test Pyramid and have automated good amount of API tests, how do I decide what all needs to be automated using the GUI now and what all can be ...
1
vote
2answers
29 views

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

I am implementing automated tests of the system that consists of many microservices. To verify appropriate behaviour of the endpoints using POST and PUT methods, I need to obtain some data (for ...
1
vote
1answer
68 views

When to automate an api test?

I am testing a GET "xyz" API which is one of the many apis needed by a web UI. We need to setup some data before we test xyz. It can be done by using other apis like "abc" or by web UI. Both ...
0
votes
1answer
801 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.
1
vote
1answer
71 views

NullPointerException in RequestSpecification

Getting Null pointer exception whenever running, unable to resolve. Below is my code public static RequestSpecification setFormParam(String formParam, RequestSpecification reqSpec) { ...
0
votes
1answer
133 views

Multiple API requests from CSV file as parameters

Let's say that my domain is api.test.com, path is /v1/products and I have to do 1000 API requests with different products as parameters. Examples: GET api.com/v1/products/product1 GET api.com/v1/...
1
vote
1answer
73 views

Testing specifics of GraphQL API endpoints

I'm used to testing "regular" REST API endpoints on daily basis, but currently I got into my first GraphQL API endpoint and I'm wondering are there any specifics that I should be aware of that are ...
0
votes
1answer
532 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 ...
5
votes
4answers
2k views

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

I'm planning on creating a project to begin test automation for software. For this task, I'm considering the following things: UI level testing (with Page Object Model) API testing ...
0
votes
2answers
128 views

How to test decoupled front and back end web apps

I often struggle to see the benefit of unit testing, especially in a web app environment that uses a JS frontend and an API + database backend. On both the front and back end, you would typically ...
2
votes
1answer
123 views

Passing parameters between tests with RestSharp

As I'm getting more familiar with the RestSharp client library for my API testing I'm confortable with using it for single API response checks e.g. checking a status code is correct, or that the ...
0
votes
1answer
49 views

What does integration testing an API involve?

I'm diving into the world of API testing and coupled with that integration testing. It's made me think quite a lot about a few things: 1) Who would carry out integration tests? The dev or the tester? ...
0
votes
3answers
70 views

Testing multiple API contracts as part of 1 test

I have a situation whereby, say, I have one API which creates an employee(POST); one which then returns the employee(GET) and one which deletes the employee(DELETE). I've been using RestSharp/C# to ...
1
vote
0answers
40 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: 1) what does this actually mean in laymans terms? 2) who would generally execute ...
5
votes
1answer
3k views

Assistance with a DELETE request in Postman

I'm attempting to create some API tests to assist with getting familiar with API automation and I'm using the really helpful Restful-Booker API for this. The API documentation is also here. However I’...
1
vote
1answer
421 views

How to run samplers sequentially in JMeter while running samplers by throughput?

I have ~10 scripts in my Test Plan which are dependent. (e.g. the 2nd request couldn't be passed if the 1st request is not passed - it is restriction of functionality) My goal is to run JMeter ...
1
vote
2answers
105 views

Advice on assertions to make when creating an API testing framework

I'm currently looking at building an API test automation framework for a series of Rest Services, utilising c#. Coming from a UI-automation background I was after some advise on assertions when ...
2
votes
1answer
241 views

What are the pro's and con's of writing an API test automation framework at code level as opposed to using a tool

As I look into writing automation frameworks at the API layer(relatively new to this area), a question that keeps cropping up in my mind is.....why should I write an automation framework at code level ...
0
votes
2answers
758 views

Deserializing JSON response using RestSharp

I'm looking for some general advice with an API framework I am setting up using C# and RestSharp as the client library. I've successfully set up an initial test, but I'm now looking at creating a ...
5
votes
1answer
94 views

Good strategies to test integration with multiple external providers

I have a single service that acts as "middle-man"/gateway between a few internal services and multiple external complex APIs, over 20 to 30+ different ones. I want to direct my testing efforts in ...
0
votes
1answer
579 views

Preview tab is empty for the request sent in Postman tool

Am new to POSTMAN tool and when I send a request am getting the response status as '200 ok'. But in Preview tab, the page is not displaying and its empty. How to view the response in preview tab?
6
votes
4answers
208 views

How do you test, auto-logout after 60 minutes?

Our system implements that the user with out activity for 60 minutes should be logged-out of the system. How do I test this? Do i need to test it manually? Wait for 60 mins? Is there a tool that I ...
1
vote
1answer
118 views

SoapUI response: Integer range validation

One of my API's is returning, "minStudentAge":12 For a one API out put there will be 5 ,6 "minStudentAge" tags with different integer value. Is there any way to validate the integer value which ...
3
votes
3answers
60 views

How to not load api from a given URL? [closed]

A customer wants a specific error code when certain apis fail to load. I am thinking of blocking the URL where apis come from. I was given the task to verify our developers have implemented the ...
1
vote
3answers
110 views

Advice on API Mocking Tools

I was interested in hearing peoples 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 ...
0
votes
1answer
210 views

Testing NIFI: best practices

I do have new task related to test NIFI Apache. not sure where to start or how to. I have one thing in mind to test it as an API but the only response it sends is status code. I know also it has be ...
13
votes
3answers
1k views

Test strategy to bring automated tests from UI to lower(API/Unit) layers?

Background/Problem Statement: Recently I came across a project team, which is having thousands of UI automated tests covering all kind of manual tests including positive, negative etc., and obviously ...
0
votes
1answer
80 views

API automation for a android App [closed]

I have to start API automation for a android App. App is coded in C++. Please suggest the approach as I am new to API testing.
0
votes
0answers
429 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 io.rest-assured rest-assured 3.0.2 test io....
1
vote
1answer
5k views

PostMan gives “JSONError: Unexpected token '<' at 1:1 <!DOCTYPE html> ^ ” when trying to extract data from response body [closed]

I am trying to chain API request on using POSTMAN. I am writing a script in the test section for extracting token from the response body and storing it in an environment variable. This is my code in ...
-1
votes
1answer
2k views

JMeter executing samplers in sequential order wherein each subsequent request depends on the response of the preceding one?

I have a JMeter script wherein the thread group has eight samplers and each sampler depends on the response of the preceding one. When I run this jmx script with 'Number of Threads' as one, it works ...
5
votes
5answers
5k views

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

When writing a test case is it a best practice to use loops for several test cases? For an example consider following two code segments Code 1 public class testing{ public void ...