# Can I return fail response eventhought the test shows pass

**URL:** <https://community.postman.com/t/can-i-return-fail-response-eventhought-the-test-shows-pass/12305>\
**Category:** Help Hub\
**Tags:** tests, testscripts\
**Created:** [April 30, 2020, 3:42pm UTC](https://community.postman.com/t/can-i-return-fail-response-eventhought-the-test-shows-pass/12305 "2020-04-30T15:42:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![martigi](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@martigi](https://community.postman.com/u/martigi)\
**Post date:** [April 30, 2020, 3:42pm UTC](https://community.postman.com/t/can-i-return-fail-response-eventhought-the-test-shows-pass/12305/1 "2020-04-30T15:42:12Z")

</div>

Hello, I am trying to get a FAIL when a test condition is met, but because of the logic, if the condition is met in the response body then it will PASS.  
Is there a way to make it be a “Failed” test?

The image below shows a Pass test result since it met the first condition, but I really want that to be a Failed test…

 ![image](https://us1.discourse-cdn.com/getpostman/original/2X/d/d008b5bc32ad567bb6d3249d3683448b214da1f2.png)

---

<div class="post-metadata">

**Author:** ![vdespa](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/vdespa/32/2770_2.png) [@vdespa](https://community.postman.com/u/vdespa)\
**Post date:** [May 2, 2020, 2:55am UTC](https://community.postman.com/t/can-i-return-fail-response-eventhought-the-test-shows-pass/12305/2 "2020-05-02T02:55:54Z")

</div>

You can “manually” fail a request:

> pm.expect.fail(‘This failed because …’);

---

<div class="post-metadata">

**Author:** ![martigi](https://avatars.discourse-cdn.com/v4/letter/m/71e660/32.png) [@martigi](https://community.postman.com/u/martigi)\
**Post date:** [May 4, 2020, 3:06pm UTC](https://community.postman.com/t/can-i-return-fail-response-eventhought-the-test-shows-pass/12305/3 "2020-05-04T15:06:15Z")

</div>

Thank you so much! This worked beautifully!
