Questions tagged [postman-testcase]
283 questions
0
votes
1 answer
Save custom response in json file in postman
In postman, I am getting response from 3rd party API and the response contains unnecessary data.
I want to get few keys from the resposne and save in json file when I click on SAVE RESPONSE button inside postman.
"goods": {
"193651": {
…

Cyberian
- 11
- 5
0
votes
0 answers
I want to parameterize API collection
I have 2 request API in postman now I want to do parameterization for them through CSV file, bit for first request I have 7 rows and for second request I have only 5 rows. And while running collection I have to pass same single CSV for both…

tushar73
- 1
- 1
0
votes
0 answers
How to write to the console log in Postman when a choice is defined from an underlying table and when there isn't
I wrote a test in Postman which works when a choice was made from the underlying table. The chosen data is then fetched and written to the console log for the next request.
For example as shown in the console log: "value of…

Rob
- 1
- 1
0
votes
1 answer
Test assertion as a boolean
I'm looking for a way to store the result of a test as a boolean. There is any way I can use pm.response.to.have.body("Example")?

Jack1886
- 37
- 7
0
votes
0 answers
mock a request in postman
I am trying to mock the server on Postman with a specific type of request.
request format
GET : /v1/employee/{empID}
here empID is dynamic but still want to mock this irrespective of empID. I need to have the same response (like some dummy data) for…

Abhishek kumar
- 129
- 1
- 8
0
votes
0 answers
Is there a way to write Postman tests using a plain Assert instead of Chai BDD?
Postman test examples all use the Chai BDD library. Personally I think BDD style testing libraries that attempt to imitate natural language are a fundamentally bad idea. In Chai there are different accessor properties for eq, eql, equal and equals.…

Neutrino
- 8,496
- 4
- 57
- 83
0
votes
0 answers
Convert XML string to JSON to create testcase in Azure DevOps Rest API
I want to use Rest Assured to work with Azure DevOps. All was smooth until it came to creating testcases. I am able to create it with hardcoded strings. This is not as useful because I'll need to port the strings as POJO objects for reusability. I…

ken4ward
- 2,246
- 5
- 49
- 89
0
votes
0 answers
Postman sending in CSV data as a payload to update monitor
We would like to store new CSV data in a monitor for every single iteration, as a means to test a dataset of over 80,000 rows. The end result would be that every time the monitor executes it has a new dataset to test that was extracted from an…
0
votes
1 answer
Postman How to check Not Equal to Condition in Postman?
I want to validate First Id Value 1 is not equal to second id value 2 in below API/Response. But when I used below Code in Postman Tests Postman not retrieving the Result.
API URL:
https://jsonplaceholder.typicode.com/posts
Snippet Used:
var…

Rajasubramanian SM
- 23
- 3
0
votes
2 answers
getting dependency error on Postman after successfully passed all tests
I am getting dependency error on Postman after successfully passed all tests in Postman Student submit training.
{"status":"error","message":"Your collection failed one or more Postman tests. See the errors array for details.","errors":[{"test":"6.…

Aftab Ahmed
- 1
- 1
0
votes
0 answers
How to get the request body raw inside test cases in TESTS scripts POSTMAN?
I am trying to get the request body raw inside test cases in TESTS scripts?
Here the script in TESTS:
pm.sendRequest({
url: pm.collectionVariables.get("url") + '/xxxxx/' + api + '/xxxxxxxxxxx',
method: 'POST',
header: {
…

Tester SG
- 1
- 1
0
votes
0 answers
Getting TypeError: Cannot read property 'listOutlets' of null in postman
Getting
TypeError: Cannot read property 'listOutlets' of null when trying to chain requests in postman, I am using response from one API and trying to get response from it and chain values in the other API.
I am working on chaining of the API…

shruti jain
- 1
- 1
0
votes
1 answer
Using Postman How to write a test to check for duplicate ids
I would like to write a test in Postman that validates there are no duplicate values in the array of objects. Here is an example response:
This is my json response :
{
"content": [
{
"id":…

Shams
- 43
- 9
0
votes
0 answers
How to Read the Payload from Browser-Network tab and use it in postman as Header in another request
In my 1st Request- i am getting Re-direction url in Response.
Once provide the Redirection url in Chrome browser, User will get Payload in Network tab.
Same Payload value need to provide in Another postman request in Param section.
So same request…

prem
- 81
- 1
- 3
- 12
0
votes
1 answer
How to write a script to check whether the date format is correct or not
Below is the array I got in postman. I have to write a script to check the date format is correct or not.
can anyone please help.
[
{
"sportName":"cricket",
"sportId":"1.923",
"nextSportDateTime":"2023-01-14T12:30:00.000Z"
…

susan
- 13
- 1