# Postman Monitors Test Failed

**URL:** <https://community.postman.com/t/postman-monitors-test-failed/2880>\
**Category:** Help Hub\
**Created:** [October 4, 2018, 7:22am UTC](https://community.postman.com/t/postman-monitors-test-failed/2880 "2018-10-04T07:22:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![z.seikyo.cho](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@z.seikyo.cho](https://community.postman.com/u/z.seikyo.cho)\
**Post date:** [October 4, 2018, 7:22am UTC](https://community.postman.com/t/postman-monitors-test-failed/2880/1 "2018-10-04T07:22:58Z")

</div>

I have a problem to auto test the collection in Postman Monitor.

For example, The test target like `https://mysite.xyz/`.

Here is my test code in Postman:

```auto
    pm.test("Response time is less than 200ms", function () {
        pm.expect(pm.response.responseTime).to.be.below(200);
    });

    pm.test("Status code is 200", function () {
         pm.response.to.have.status(200);
    });

```

It can be pasted in Postman client. But failed in Postman Monitor cloud. From the log got these messages:

```auto
    4 15:25:48 Error: ESOCKETTIMEDOUT
    5 15:25:48 Failed: Response time is less than 200ms
    6 15:25:48 expected undefined to be a number or a date
    7 15:25:48 Failed: Status code is 200
    8 15:25:48 expected { Object (id, _details, ...) } to have property 'code'

```

Another way:

```auto
    tests["Response time is less than 200ms"] = responseTime &lt; 200;
    tests["Status code is 200"] = responseCode.code === 200;

```

Got error from Console Log:

```auto
|4|15:45:55|Error: ESOCKETTIMEDOUT|
|5|15:45:55|Failed: Response time is less than 200ms|
|6|15:45:55|expected false to be truthy|
|7|15:45:55|Failed: Status code is 200|
|8|15:45:55|expected false to be truthy|

```

Have already choosed `Disable SSL validation` in setting page.

Don’t know why.

---

<div class="post-metadata">

**Author:** ![ankit-m](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/ankit-m/32/979_2.png) [@ankit-m](https://community.postman.com/u/ankit-m)\
**Post date:** [October 4, 2018, 7:54am UTC](https://community.postman.com/t/postman-monitors-test-failed/2880/2 "2018-10-04T07:54:57Z")

</div>

Is your target URL available publicly? For a monitor to run correctly, the URL needs to be public.

---

<div class="post-metadata">

**Author:** ![z.seikyo.cho](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@z.seikyo.cho](https://community.postman.com/u/z.seikyo.cho)\
**Post date:** [October 4, 2018, 8:10am UTC](https://community.postman.com/t/postman-monitors-test-failed/2880/3 "2018-10-04T08:10:04Z")

</div>

The `Test Results` can passed:

![45](https://us1.discourse-cdn.com/getpostman/original/3X/a/b/ab86cb3fbb7a0ebcc8ae7fd1f2d28a60263b6f30.png)

It’s public.

---

<div class="post-metadata">

**Author:** ![tejaswinipatel3](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@tejaswinipatel3](https://community.postman.com/u/tejaswinipatel3)\
**Post date:** [January 18, 2020, 9:37pm UTC](https://community.postman.com/t/postman-monitors-test-failed/2880/4 "2020-01-18T21:37:14Z")

</div>

Hey , how can we make URL publicly ? Where we have to declare it while creating monitor?

---

<div class="post-metadata">

**Author:** ![tejaswinipatel3](https://avatars.discourse-cdn.com/v4/letter/t/a9a28c/32.png) [@tejaswinipatel3](https://community.postman.com/u/tejaswinipatel3)\
**Post date:** [January 18, 2020, 9:38pm UTC](https://community.postman.com/t/postman-monitors-test-failed/2880/5 "2020-01-18T21:38:46Z")

</div>

I see same errors. Could you please help ?
