# Collection Runner - This request does not have any test

**URL:** <https://community.postman.com/t/collection-runner-this-request-does-not-have-any-test/46265>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [April 12, 2023, 7:00pm UTC](https://community.postman.com/t/collection-runner-this-request-does-not-have-any-test/46265 "2023-04-12T19:00:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhd400](https://avatars.discourse-cdn.com/v4/letter/j/919ad9/32.png) [@jhd400](https://community.postman.com/u/jhd400)\
**Post date:** [April 12, 2023, 7:00pm UTC](https://community.postman.com/t/collection-runner-this-request-does-not-have-any-test/46265/1 "2023-04-12T19:00:35Z")

</div>

Hello, I have a question I have some test and am using a csv file to provide data, this csv has a colum called category I want some test to run only when the data has the category user

this is what I have in the test:

```auto
if(data.test_type == "happy_path" & data.category == "user")
pm.test("Status code is 200", function () {
    pm.response.to.have.status(200);
});

else if(data.test_type == "unhappy_path" & data.category == "user")
pm.test("Status code is 422", function () {
    pm.response.to.have.status(422);
});

```

the tests work the way they are supposed to work when I use the runner but when the data doesn’t have the category user there is just a blank space like this

 ![imagen](https://us1.discourse-cdn.com/getpostman/original/3X/6/d/6dad114af95ad5236882cc904ffb9c0b7461a4cb.png)

the test are working but is there a way to not show “This request does not have any test” every time uno row of the csv doesn’t have the category user? because there is a lot of empy tests

---

<div class="post-metadata">

**Author:** ![michaelderekjones](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/michaelderekjones/32/14819_2.png) [@michaelderekjones](https://community.postman.com/u/michaelderekjones)\
**Post date:** [April 13, 2023, 9:45am UTC](https://community.postman.com/t/collection-runner-this-request-does-not-have-any-test/46265/2 "2023-04-13T09:45:49Z")

</div>

Please don’t.

Split the csv file into two, ones with and without categories, and create appropriate requests and tests for each. It might be the same actual request with different tests, but name the request appropriately so its easy to understand in the reports.

It’s not a great pattern relying on IF statements to run tests. I loathe to say its not best practice as that’s subjective but that is where I’m going with this.

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [January 25, 2024, 8:49pm UTC](https://community.postman.com/t/collection-runner-this-request-does-not-have-any-test/46265/3 "2024-01-25T20:49:08Z")

</div>

Closed on January 25, 2024, 8:49pm UTC


