# Is it possible to ignore tests on a collection and use request tests?

**URL:** <https://community.postman.com/t/is-it-possible-to-ignore-tests-on-a-collection-and-use-request-tests/5679>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [May 30, 2019, 1:28pm UTC](https://community.postman.com/t/is-it-possible-to-ignore-tests-on-a-collection-and-use-request-tests/5679 "2019-05-30T13:28:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon.robinson](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jon.robinson](https://community.postman.com/u/jon.robinson)\
**Post date:** [May 30, 2019, 1:28pm UTC](https://community.postman.com/t/is-it-possible-to-ignore-tests-on-a-collection-and-use-request-tests/5679/1 "2019-05-30T13:28:51Z")

</div>

Example

I have some generic tests stored against a collection folder… but would it be possible to somehow ignore those tests for a specific request?

e.g. my generic tests contain:  
`pm.test("Response status is 200", function() { pm.response.to.have.status(200); if (responseCode.code !== 200) return;`

But I want to add tests that will return other response codes.

Thanks  
Jon

---

<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:** [May 30, 2019, 1:38pm UTC](https://community.postman.com/t/is-it-possible-to-ignore-tests-on-a-collection-and-use-request-tests/5679/2 "2019-05-30T13:38:11Z")

</div>

Hey @jon.robinson,

Welcome to the community 👋

There was a question asked a couple of weeks ago around skipping tests if they don’t meet a certain criteria - Is this something that you’re looking for?

> [@Skipping collection test but in the results it shows as skipped and failed](https://community.postman.com/t/skipping-collection-test-but-in-the-results-it-shows-as-skipped-and-failed/5438):
>
> I have a test set in a collection to check whether the status of the response is one of a list: pm.test('Check status code', () =\> { pm.expect(pm.response.code).to.be.oneOf([200, 201, 202, 203, 204, 205, 206, 207, 208, 226]) }) In the Pre-request script of two of my requests, I have a line to skip the test that is set up for this collection (as I know the response of these two particular tests is going to be different but that’s ok for these as individual requests). pm.test.skip(‘Check st…

---

<div class="post-metadata">

**Author:** ![jon.robinson](https://avatars.discourse-cdn.com/v4/letter/j/b487fb/32.png) [@jon.robinson](https://community.postman.com/u/jon.robinson)\
**Post date:** [May 30, 2019, 2:13pm UTC](https://community.postman.com/t/is-it-possible-to-ignore-tests-on-a-collection-and-use-request-tests/5679/3 "2019-05-30T14:13:03Z")

</div>

Hi @danny-dainton… yes this is exactly what i’m after (i think). Thanks

---

<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:** [May 30, 2019, 2:19pm UTC](https://community.postman.com/t/is-it-possible-to-ignore-tests-on-a-collection-and-use-request-tests/5679/4 "2019-05-30T14:19:43Z")

</div>

Awesome 🏆

Take a look through the examples and try some of the things out - If you get stuck or need some extra information, give me a shout. 🙂
