# Trying to Skip one of my common tests placed in parent folder for only one request inside it

**URL:** <https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [November 25, 2019, 6:43am UTC](https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213 "2019-11-25T06:43:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saitejagoud080996](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@saitejagoud080996](https://community.postman.com/u/saitejagoud080996)\
**Post date:** [November 25, 2019, 6:43am UTC](https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213/1 "2019-11-25T06:43:06Z")

</div>

Hi, I am trying to Skip one of my common tests placed in the parent folder for only one child Request.  
ex: Folder: Test Claims - contains below test  
pm.test(“status to be 200”, function(){  
pm.expect(pm.response.code).to.equal(200);  
});  
pm.test(“responsesize to be \<200”, function(){  
pm.expect(blabla).to.be.below(200);  
});

II have 3 request under folder say  
Req1  
Req2  
Req3  
Since I placed tests in folder it will run for all 3 requests.  
For Req2 i don’t want response size test to be executed.

Can anyone help me how I can do this, please???

---

<div class="post-metadata">

**Author:** ![arlem](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/arlem/32/3078_2.png) [@arlem](https://community.postman.com/u/arlem)\
**Post date:** [November 25, 2019, 12:52pm UTC](https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213/2 "2019-11-25T12:52:26Z")

</div>

Hey @saitejagoud080996,

If each request has a different URL you could put a condition in your Tests so they run only on the requests that are _not_ that URL.  
Example:

```auto
if (pm.request.url != "REQUEST_URL_TO_SKIP") {
    pm.test("status to be 200", function() {
        pm.expect(pm.response.code).to.equal(200);
    });
} 

```

While this does what you ask for, for scaling reasons if you’re planning to add more requests/tests I would recommend to write the tests in each requests instead of doing it at the folder level.

---

<div class="post-metadata">

**Author:** ![saitejagoud080996](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@saitejagoud080996](https://community.postman.com/u/saitejagoud080996)\
**Post date:** [November 26, 2019, 7:59am UTC](https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213/3 "2019-11-26T07:59:09Z")

</div>

Hi Arlemi,

Thanks for your response but my request URL is same for all requests and out of my 12 tests say only two of them are not applicable for common test, so likely scenario is to place in folder, also i cannot pull out those 2 tests out because all belong to same category - validations :🙂  
can you please help if you have any other idea?

---

<div class="post-metadata">

**Author:** ![arlem](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/arlem/32/3078_2.png) [@arlem](https://community.postman.com/u/arlem)\
**Post date:** [November 26, 2019, 1:17pm UTC](https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213/4 "2019-11-26T13:17:44Z")

</div>

In that case you could use `pm.info.requestName` to do a condition on the name of the request, assuming these are unique?  
For example if I have three requests named “a”, “b” and “c” respectively, the following code will skip b:

```auto
if (pm.info.requestName != "b") {
    pm.test("status to be 200", function() {
        pm.expect(pm.response.code).to.equal(200);
    });
}

```

---

<div class="post-metadata">

**Author:** ![saitejagoud080996](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@saitejagoud080996](https://community.postman.com/u/saitejagoud080996)\
**Post date:** [November 27, 2019, 7:20am UTC](https://community.postman.com/t/trying-to-skip-one-of-my-common-tests-placed-in-parent-folder-for-only-one-request-inside-it/9213/5 "2019-11-27T07:20:14Z")

</div>

Hi arlemi,

yes, I have different names on each test case and you answer helped like 100%  
Thanks a lot
