# How to use 'OR' operation with any test

**URL:** <https://community.postman.com/t/how-to-use-or-operation-with-any-test/8195>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [October 5, 2019, 10:06am UTC](https://community.postman.com/t/how-to-use-or-operation-with-any-test/8195 "2019-10-05T10:06:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![amit.nandha](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@amit.nandha](https://community.postman.com/u/amit.nandha)\
**Post date:** [October 5, 2019, 10:06am UTC](https://community.postman.com/t/how-to-use-or-operation-with-any-test/8195/1 "2019-10-05T10:06:51Z")

</div>

{  
“status”: 0,  
“errorList”: ,  
“message”: “Wrong password.”,  
“response”: {}  
}

but message can any thing and i want to verify with OR condition.

---

<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:** [October 5, 2019, 10:19am UTC](https://community.postman.com/t/how-to-use-or-operation-with-any-test/8195/2 "2019-10-05T10:19:55Z")

</div>

Hey @amit.nandha

Welcome to the community!! 🏆

It’s not too clear what you’re trying to do or what you’re trying to check for, with the info provided. Is it just the `message` value you’re looking to create a test for?

Are you able to post an example of a test that you have created?

If you’re thinking in terms of the different assertions that you can use with the `pm.expect()` function, you might want to take a look at the chaijs docs, to see what’s available for you to use.

> **[Expect / Should - Chai](https://www.chaijs.com/api/bdd/)**
>
> Chai is a BDD / TDD assertion library for \[node\](http://nodejs.org) and the browser that can be delightfully paired with any javascript testing framework.

---

<div class="post-metadata">

**Author:** ![amit.nandha](https://avatars.discourse-cdn.com/v4/letter/a/58956e/32.png) [@amit.nandha](https://community.postman.com/u/amit.nandha)\
**Post date:** [October 5, 2019, 10:35am UTC](https://community.postman.com/t/how-to-use-or-operation-with-any-test/8195/3 "2019-10-05T10:35:38Z")

</div>

Hi Danny,

My scenarios is mention as below:

Response:

{

```
"status": 0,

"errorList": [],

"message": "Wrong password.",

"response": {}

```

}

But depending on input “message” value is change like “Email is wronge”

If I want to verify the message in one test case so I am going with below code:

var JsonRespons = JSON.parse(responseBody);

pm.test(“Invalid credentials”, function()

{

pm.expect(JsonRespons.message).to.eql(“Please verify email (or sign up first).”

```
        >> "Wrong password.");

```

console.log("Expected Message : " +JsonRespons.message);

});

I want to ORing to message in one test case.

So my question is how can I handle this scenarios using one test case.

Awaiting reply …

Regards,

Amit Nandha
