826 questions
0
votes
1
answer
156
views
Rollback database changes made by application/API in .NET test automation
I am working on a large-scale .NET test automation project (over 2500 test cases) that interacts with an application API. My goal is to keep the database clean and isolated between test runs.
Here's ...
0
votes
0
answers
56
views
Getting 'Account not authorized' error with OAuth 2.0 password grant type in Python script
I’m trying to fetch an OAuth 2.0 token using the password grant type in a Python script for an API integration with a cloud service (Infor CloudSuite). The script uses the requests library to make a ...
0
votes
2
answers
290
views
In httpYac how to assign the current system time to a variable and use this variable in http request payload?
For my e2e tests I'd like to get the current date and time and use this dateTime string in the payload body, like this:
### Precondition: Create a contract with current time stamp in ISO format
# ...
2
votes
2
answers
2k
views
In the latest version of Bruno, is there a way to read data in from a file, to use as a feeder in a PUT request?
-I can use pre-request and post-response scripts and test scripts inside individual requests.
-I cannot use collection-level scripts because I only have the free version.
-I can't find a method in the ...
0
votes
1
answer
47
views
Building and running automated test on User Profile API endpoint but getting error message
I’m creating as well as running an automated test for Profile Page API endpoint using the DRF extension APITestCase.
I already created/ran two separate automated tests for the login/registration API ...
0
votes
2
answers
82
views
Using Jmeter Websocket sampler with no port number in the URL
I'm working with a websocket api thats hosted on AWS. The URL doesn't have a port number. But the Jmeter websocket plugin by Peter Dornbosch requires a port number in the URL in order to function.
...
1
vote
2
answers
104
views
How to store specific data set from JSON response body?
I am trying to learn cypress then come across a topic in validating json response body but did not discuss on how to store it in a variable. I would like to know how to store specific data set in a ...
-1
votes
1
answer
67
views
Postman test script for matching 2 key values inside of each item
Here is how the response tested looks like:
[
{
"label": "Summer '14",
"url": "/services/data/v31.0",
"version": "31....
1
vote
1
answer
44
views
Laravel AuthenticatedSessionControllerTest Fails with 404 for Login and Logout Tests
I am encountering an issue with testing the login and logout functionalities in my Laravel application. When I run the test suite, some tests fail with a 404 status code instead of the expected 401 or ...
1
vote
0
answers
73
views
Integer values being converted to float after being passed into a JSON file
I'm having a problem I've never before experienced with Karate. This is the basic skeleton of the code I'm working with right now:
Feature: This is a feature to test account updation
Scenario: ...
1
vote
1
answer
65
views
How can I validate that a name-value pair has a value that contains text in an API response object?
I am currently writing API tests with karate and I've run into a scenario I've been struggling to resolve. I'd like to validate that each object within the response has a specific item that has a ...
2
votes
2
answers
256
views
How get a REST API endpoints coverage test report in Java
I have a spring-boot project with existing unit tests and Karate integration tests that interact with my application during my maven build cycles and I want to have a generated report that tells me ...
0
votes
1
answer
325
views
Loading ".http" test file in Visual Studio. This triggers an error in the VS 2022 Output Box
I am trying to run a test file for my Web APIs using .http files.
However, whenever I attempt to load the file in Visual Studio 2022 in the output box I get the following:
Executing command 'dotnet ...
1
vote
1
answer
53
views
global variable returns NULL value after upgrading the karate version from 1.4.0.RC3 to 1.5.0.RC4
We have a feature file in which we declared a global variable to use across different scenarios within the same feature file. It was working well until I upgraded my Karate version from 1.4.0.RC3 to 1....
0
votes
1
answer
50
views
Authorization token is not working in Rest Assured
package com.automation.tests;
import static io.restassured.RestAssured.*;
import org.json.JSONObject;
import io.restassured.response.Response;
import io.restassured.specification.RequestSpecification;...
1
vote
2
answers
2k
views
Cypress TypeError : Cannot read properties of undefined (reading 'then')
I have this function below :- checkStatusCode
I check if a response is OK then I try to return a value and based on that I try to visit the URL (ex:- if response status is 200)
checkStatusCode(href) ...
1
vote
1
answer
1k
views
Error: apiRequestContext.get: getaddrinfo ENOTFOUND Playwright [closed]
I'm trying to execute this API test:
import { test } from "@playwright/test";
test("health check request", async ({ request }) => {
await request.get(`<my-url>`);
});
...
0
votes
1
answer
283
views
How to use existing db in django pytest?
I have default schema for my API, and existing schema for data search. This is db settings:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql&...
0
votes
1
answer
100
views
Jmeter performance Report
I'm using jmeter and I am testing my API. So in that API I have to test for 3 different thread groups (1 thread,100 and 1000 threads) and get as sum of all threads as a report in html file.
But I need ...
1
vote
3
answers
148
views
How to match that the API response has one of the possible value using Karate?
I have a response which I would like to validate in such a way that a particular attribute in this case capital may contain any of the following value {"BOM", "DEL", "BLR"...
2
votes
1
answer
2k
views
Unable to Intercept Requests with Mitmproxy: Getting "502 Bad Gateway" Error
I'm currently conducting penetration testing on a website, and I'm attempting to intercept requests using Mitmproxy to reverse engineer the backend APIs. However, I'm encountering a "502 Bad ...
1
vote
1
answer
246
views
Troubleshooting Zap Docker Image for Authenticated API Scan
I am trying to conducting an API scan using Zap Docker image, despite passing authentication configurations, authenticated endpoints return 404/403 errors. Unauthenticated endpoints scan correctly. ...
0
votes
1
answer
181
views
Can we extract the full URL with query parameters in RestAssured
I'm working on a RestAssured project and for some debugging purposes waant to print the full url to which the request is sent.
In the project that I'm working on we set the ApiHost, BasePath, uri and ...
0
votes
0
answers
25
views
Running a request from postman testscript of another request
Requirement:There are 2 requests, request A and request B. I need to run Request A when a condition specified in the test script of Request B is attained in POSTMAN. I used the below code, but while ...
0
votes
0
answers
58
views
ASP.NET Core 7 Web API : simultaneous Post/Put call how to prevent update a data at the same time?
I'm currently doing a mock voting app using ASP.NET Core 7 Web API and Blazor WebAssembly, I still do not have database for this, so what I did is I use AddSingleton for my repository, for me to test ...
0
votes
1
answer
403
views
Keyword name cannot be empty after post request with expected_status in robotframework
enter image description hereI'm going create Negative Test with post request by expected_status,but I confront Keyword name cannot be empty message.
InvalidPassword Test
[Tags] InvalidPassword
...
0
votes
1
answer
369
views
How to pass cookie to get request Robot framework with API (RequestsLibrary)
I want to use the cookie, received from the session in which I do POST request, in the next session with GET request, but I have problem.
Here is my keyword:
MY_Profile
Log To Console HEADER
...
0
votes
0
answers
57
views
Multiple API testing e2e with different bodies and responses
We have what we call an aggregator in our company, basically we have more than 15 APIs, all which have different headers, bodies and also expect different responses.
We aggregate and consume those ...
-1
votes
1
answer
508
views
[How to run only particular APIs in a collection of APIs
In my collection I have many requests with asserts, in that I need to run only particular requests. Assume I have 10 requests and I need to run only 3,4 & 10 how can I do it by running through ...
1
vote
0
answers
492
views
Idea Http Client - Reusing Requests
I'm interested in starting to use the Idea Http Client for API testing. I'm currently facing a challenge. I have a set of requests or a sequence of requests that I would like to execute within other ...
1
vote
1
answer
106
views
How to use websockets in Visual Studio http files
I am looking to test websocket connections using Visual Studio 2022 http files. Could not find any documentation on https://learn.microsoft.com/en-us/aspnet/core/test/http-files?view=aspnetcore-8.0.
0
votes
1
answer
1k
views
In artillery can I run multiple scenarios simultaneously
I need to run load test on 5 different APIs with different loads, simultaneously.
Right now I have 5 yaml files for load tests of the 5 APIs. I am looking for a way to either run all 5 yaml files in ...
1
vote
2
answers
541
views
Karate framework vs Jmeter
**
I'm evaluating testing frameworks and trying to decide between Karate and JMeter. What are the specific advantages of Karate over JMeter?
**
1
vote
1
answer
96
views
karate api testing : Is response header validated based on request headers
I have an api
example -
/get/userBundle
Request header - Accept = application/zip
Response assertion - status == 200.
If response status = 200, but response is NOT of type zip but json response or any ...
-1
votes
1
answer
147
views
How to call service class in mock Framework with x-unit method ASP Web API .Net 6?
We will be performing unit testing in ASP.NET Web API using .NET 6. We are attempting unit testing using the Moq framework with the xUnit testing method. To begin, we download the Moq package. Next, ...
0
votes
1
answer
38
views
Best way to dynamically fire API queries using payloads from a JSON Array?
I need to measure the response times of an API query to different combinations of payloads.
While exploring multiple API testing tools I came across Jmeter. Which provides a CSV Data Set configuration....
0
votes
1
answer
150
views
facing issue in Pactum cucumber undefined error
I'm encountering an issue with Pactum Cucumber where I'm getting an undefined error, despite receiving the expected output when testing the same request in the Postman application. Below, I've ...
0
votes
2
answers
695
views
How to use .http file outside visual studio - e.g. Azure Pipeline
Is .HTTP file format Visual Studio specific, or is there some multi-plaftorm tooling for it?
How do I integrate it to CI/CD pipeline?
https://learn.microsoft.com/en-us/aspnet/core/test/http-files
2
votes
1
answer
1k
views
Injecting a variable into POST JSON call in Postman Flow
I am using postman flow for my POST calls. I have a variable, organizationId, that I would like to insert into my JSON body of my POST call. But I am getting the following error:
body: "invalid ...
1
vote
1
answer
2k
views
How to change baseURL during tests in cypress-io/github-actions [closed]
I'm trying to run my Cypress tests using Github Actions. I have everything set up but I have a problem with baseURL variable which is set during GitubActions process and then passed to Cypress. In my ...
0
votes
0
answers
59
views
Oops, filename.json doesn't seem to exist | Creating filename.json with some default data
I am learning API testing, so I have created JSON file, and trying to create an API which will display the data found in JSON file into browser, but getting
Oops, filename.json doesn't seem to exist
...
0
votes
1
answer
377
views
Thunder client : how to compare actual and expected response in scripting tab
New to Thunder client. How to compare actual test results with expected ? How to define in Thunder client. Could you explain please?
Many thanks ,
Sri
Could not find any documentation for scripting ...
0
votes
0
answers
32
views
How to resolve server related error when testing multiple TypeScript APIs?
I would like to test the POST and GET methods of two APIs called Restaurant and Employee. The two APIs work as expected. This question is specifically about how to test the two APIs? I have created 2 ...
-1
votes
1
answer
147
views
Write TDD test with Mock for Web API project with dot net 6.0 and Unit Of Work
I have a Web API project, I use Unit Of Work pattern with dot net 6.0 and want to write test for it.
I have a controller like below and a function in it for authentication:
public AuthController(...
0
votes
2
answers
106
views
How to replace repetitive pattern in a string in Java?
I have intelliJ running with Java/REST API and having trouble removing and replacing string in a certain format.
Response string :
{"isSuccess":[{"frequency":}]}]}}{"...
1
vote
0
answers
21
views
How to I store dynamic key values in Karate? [duplicate]
Below is the payload where we need to store the value inside ABC->XYZ. Here "123456" is the dynamic key. Where this "123456" value is stored from previous api.
{
"...
0
votes
2
answers
618
views
I want to send the request sent by postman to jmeter
I want to changing test tool from postman to jmeter.
Usual body format was raw-json, I did well without any problems.
But this case I should change form-data.
First, Postman confirmed response(return ...
1
vote
1
answer
44
views
Unable to upload a image in Karate Framework using graphQl mutation
[[enter image description here](https://i.sstatic.net/PY6FQ.png)](htenter image description heretps://i.sstatic.net/06hOp.png)
Unable to upload an image using graphQl query in Karate framework.
ERROR:
...
0
votes
0
answers
100
views
Cucumber: Feature file is unable to find step definitions when they are in separate modules
I am unable to map the feature file to the step definition one which is in different module.
The project is split between two Java modules, in the firts one are the feature files and the runner and in ...
0
votes
0
answers
109
views
Can I use only Karate DSL extension for VS Code to access database and kafka?
At work, there was a need to automate some of the regression tests.
The only tools available are Visual Studio for working with C#, which I know a bit, and VS Code, which is used for sending messages ...