# Get AsserionError without writting any tests

**URL:** <https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035>\
**Category:** Help Hub\
**Tags:** tests, assertionerror\
**Created:** [October 13, 2022, 3:21pm UTC](https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035 "2022-10-13T15:21:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mandar.nageshkar](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mandar.nageshkar](https://community.postman.com/u/mandar.nageshkar)\
**Post date:** [October 13, 2022, 3:21pm UTC](https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035/1 "2022-10-13T15:21:45Z")

</div>

In a negative test it is expected to get a 400 Bad Request as the response, however I have not written any tests, but still get the below error message under test results, which shows in the runner when executed the test. Can anyone help?

FAIL  
Request is Successful | AssertionError: expected response code to be 2XX but found 400

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 13, 2022, 5:27pm UTC](https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035/2 "2022-10-13T17:27:04Z")

</div>

Hi @mandar.nageshkar

Are you able to provide screenshots so we can see how you have things set up?

---

<div class="post-metadata">

**Author:** ![mandar.nageshkar](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mandar.nageshkar](https://community.postman.com/u/mandar.nageshkar)\
**Post date:** [October 14, 2022, 4:09am UTC](https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035/3 "2022-10-14T04:09:32Z")

</div>

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

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

I am not sure from where the Test is expecting the response to be 2XX even though there are no tests written.

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 15, 2022, 9:22am UTC](https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035/4 "2022-10-15T09:22:24Z")

</div>

This is the request level, could you also check if there is a test at the collection level?  
(Click collection and check the test tab).

---

<div class="post-metadata">

**Author:** ![mandar.nageshkar](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mandar.nageshkar](https://community.postman.com/u/mandar.nageshkar)\
**Post date:** [October 17, 2022, 7:31pm UTC](https://community.postman.com/t/get-asserionerror-without-writting-any-tests/40035/5 "2022-10-17T19:31:23Z")

</div>

Yes this was precisely the issue. The collection was a shared collection and the other team which had worked on it earlier had written tests at the collection level, which somehow went un noticed. Thanks alot @w4dd325. This has removed all the tests which were failing for reason not known untill now.
