Questions tagged [postman-testcase]

283 questions
0
votes
0 answers

POSTMAN Assertion with IF ELSE statement not working

I need to test the response code and if it is true do next api call.I am using below code to achieve the desired functionality. Let me know what am i doing wrong. pm.test("response is valid", function(){ if(pm.response.code === 201){ …
Mir
  • 37
  • 1
  • 7
0
votes
0 answers

How can we calculate the exact pass & failure count in newman collection run report excluding assertions?

I'm having 15 requests(test cases) in the executed collection. How can I calculate how many test cases got passed and failed in my 15 requests. My Question in detail: In the below mentioned result, as per my knowledge test scripts are considering…
0
votes
0 answers

Postman Collection Runner - read ECONNRESET

i'm trying to run a web-service test Using CSV data files in the Postman Collection Runner . When i parameterize and give more than one value , for the 2nd run am getting the following error in the postman console Postman Collection Runner has two …
Raj
  • 13
  • 1
  • 5
0
votes
3 answers

How to Test the API by Token on Postman?

I want to test my APIs on Postman with the token so, I just write a URL with a POST request. Then select Authorization option and Choose Bearer Token and paste my token. After that, I choose the raw and JSON option and pass the JSON object but data…
Vijay Gehlot
  • 80
  • 1
  • 10
0
votes
1 answer

I wrote a javascript code that calculates a Fibonacci nth term, how Can I use it in Postman

I would appreciate your assistance if possible , I wrote a javascript code that calculates a Fibonacci nth term, how Can I use it in Postman. I send an initial request to an endpoint and the response sends back data (a n term for example: 43) I…
0
votes
0 answers

Postman collection variables in a collection run

I have a line like pm.collectionVariables.set("blah", jsonData.someField) in my Tests tab for a request. It sets the collection variable fine if I run the request in the workspace, but not if I run a Collection Run. That is, when I run the…
Guy
  • 666
  • 1
  • 10
  • 34
0
votes
0 answers

Assert an element from an Array in Postman

Problem in this Loop //Test to Check W2B001 is received same from API as well//Test that the response is an Int or date I have an Array like this "dates": [{ "id": 1, "date": "2019-06-30T00:00:00" }, { "id": 2, …
0
votes
1 answer

Postman: Sending different bodies per request for testing?

We have this REST endpoints at work we need to make some tests for in Postman. The endpoints are just accepting a json body which we are providing in the "Body" field and the tests are covering basic stuff: Mostly a good request and different types…
Neuromante
  • 531
  • 2
  • 12
  • 29
0
votes
1 answer

postman schema validation into reporter-htmlextra

I'm currently running some tests with postman where I get a schema and try to validate my results against it. I know the schema is not consistent with the response I'm getting but I wanted to know how is it possible to expand the results to give a…
Miguel Costa
  • 627
  • 1
  • 12
  • 30
0
votes
1 answer

If i forgot to fill field than not show laravel error

This is my code of register controller...I applied code through try catch but in postman still show error like this Symfony\Component\Debug\Exception\FatalThrowableError: Argument 2 passed to…
Kinnu123
  • 245
  • 1
  • 2
  • 12
0
votes
1 answer

How I get request body params in Postman Tests tab?

I am writing tests collections for endpoints and I want the test to check if the response param estadoAula has the same value as the request param estadoAula so I can test everything went as intended. The param need to be sent in the body and not in…
0
votes
1 answer

Postman-API Automation testing

To test API using Postman what should be the best practice for test management. We tried to create a fork for the folder in collection where developer created his APIs. But if the developer do any changes on his collection no change will get…
0
votes
1 answer

Saving values in collection level and not in environment level in postman

I am new to postman and I have some 200 services to automate. Now for every service I need to save some values and retrive in other services. Now can I do it by saving and retriving from environment variables. Is there any other option other than…
0
votes
0 answers

How to fix nested 'if, else if, else' test scripts in Postman

I have a nested 'if, else if, else' test script for #Postman tests but i get some condition executed when it is not meant to be and others not executed properly. When I comment some section out of the condition in the test, it works as desired. var…
Senny
  • 1
  • 1
0
votes
1 answer

Need Of Postman test case

I understand in postman we use test cases like status codes and response time to ensure API does not break but what is the necessity to validate the response body. var schema var jsonData = JSON.parse(responseBody); tests["Verify that the Schema is…