# Not getting correct response status when creating multiple sending request from Test

**URL:** <https://community.postman.com/t/not-getting-correct-response-status-when-creating-multiple-sending-request-from-test/7321>\
**Category:** Help Hub\
**Created:** [August 21, 2019, 8:26pm UTC](https://community.postman.com/t/not-getting-correct-response-status-when-creating-multiple-sending-request-from-test/7321 "2019-08-21T20:26:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NitiJabin](https://avatars.discourse-cdn.com/v4/letter/n/e99b99/32.png) [@NitiJabin](https://community.postman.com/u/NitiJabin)\
**Post date:** [August 21, 2019, 8:26pm UTC](https://community.postman.com/t/not-getting-correct-response-status-when-creating-multiple-sending-request-from-test/7321/1 "2019-08-21T20:26:15Z")

</div>

I am trying to send multiple request under one test. But I can see that if first request has status 422 then second request also showing the same status 422 when i am checking it from pm.response.to.have.status(…). Whereas the second request has status 409 and it is sending the correct request. And if I put pm.response.to.have.status(409) for second request it is showing fail. I have printed the responseCode.code in console the output is 409.

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/f/4/f4dc4941b8f3cb61ef1b4218c46103e23b1a6e6c.png)

---

<div class="post-metadata">

**Author:** ![lvaltierra](https://avatars.discourse-cdn.com/v4/letter/l/d9b06d/32.png) [@lvaltierra](https://community.postman.com/u/lvaltierra)\
**Post date:** [August 22, 2019, 3:11am UTC](https://community.postman.com/t/not-getting-correct-response-status-when-creating-multiple-sending-request-from-test/7321/2 "2019-08-22T03:11:29Z")

</div>

Are you using the collection runner or newman? Or are you sending a single request?

> Note that `postman.setNextRequest()` only works with the collection runner and Newman where the intent is to run a collection, as opposed to sending a single request. [https://learning.getpostman.com/docs/postman/collection\_runs/building\_workflows/](https://learning.getpostman.com/docs/postman/collection_runs/building_workflows/)

---

<div class="post-metadata">

**Author:** ![ankit.arun](https://avatars.discourse-cdn.com/v4/letter/a/a4c791/32.png) [@ankit.arun](https://community.postman.com/u/ankit.arun)\
**Post date:** [August 22, 2019, 8:55am UTC](https://community.postman.com/t/not-getting-correct-response-status-when-creating-multiple-sending-request-from-test/7321/3 "2019-08-22T08:55:32Z")

</div>

Hi!

If I understand correctly, you are trying to run a series of requests inside the Postman application.

The correct way to do this is to use pm.setNextRequest() in the test script.

Two things:

1. The seNextRequest will ONLY work in collection runner or Newman, just like @lvaltierra said above.

2. The name that you are to supply is the name of the request YOU provide to the request, for example the name of the request you have in your case is “Multiple Request2”.

Also, try to keep one request per tab, as that is the correct way. The collection runner exists for this purpose. I suggest you check this out for more clarity: [Collections in Postman](https://learning.getpostman.com/docs/postman/collections/intro_to_collections/)
