# Bypass or skip tests for a request

**URL:** <https://community.postman.com/t/bypass-or-skip-tests-for-a-request/2704>\
**Category:** Help Hub\
**Created:** [September 18, 2018, 4:57am UTC](https://community.postman.com/t/bypass-or-skip-tests-for-a-request/2704 "2018-09-18T04:57:58Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [May 27, 2019, 6:24am UTC](https://community.postman.com/t/bypass-or-skip-tests-for-a-request/2704/4 "2019-05-27T06:24:30Z")

</div>

In addition to the above response, there’s also another way to directly control the skipping of the complete tests using some control boolean.

You can either use an environment variable or you can perform the computation in the test script whether you want to set a test (or a set of tests) and use that.

For eg:

```javascript
let skipTest = pm.environment.get('skipTest');

(skipTest ? pm.test.skip : pm.test)("Check status code", () => {
    pm.expect(pm.response.code).to.equal(200);
});

(skipTest ? pm.test.skip : pm.test)("Check status code is not 404", () => {
    pm.expect(pm.response.code).to.not.equal(404);
});

```

---

_[View the full topic](https://community.postman.com/t/bypass-or-skip-tests-for-a-request/2704)._
