# How to print the schema validation in console?

**URL:** <https://community.postman.com/t/how-to-print-the-schema-validation-in-console/19415>\
**Category:** Help Hub\
**Tags:** schema, jsonschema, test, schemavalidation\
**Created:** [January 22, 2021, 5:40am UTC](https://community.postman.com/t/how-to-print-the-schema-validation-in-console/19415 "2021-01-22T05:40:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tarekalba](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@tarekalba](https://community.postman.com/u/tarekalba)\
**Post date:** [January 22, 2021, 5:40am UTC](https://community.postman.com/t/how-to-print-the-schema-validation-in-console/19415/1 "2021-01-22T05:40:14Z")

</div>

Hi,

I am trying to print the results of pm.test, but so far failed to do so. e.g. I want to print this in the console:  
pm.test(“Validation schema”, () =\> {pm.response.to.have.jsonSchema(schema);

It is a schema validation that I defined, it works fine in showing the Test Results, however, I want the message that appears in Test Results to appear in the console.

I know that I can print the other tests using for example the pm.response.responseTime , however in validating schema until now I couldn’t find a similar approach that enabiles me to do so.

The qusetion: Can I have an approach that prints the schema validation results using the method e.g. console.log(“Pass, responseTime is: " + pm.response.responseTime + " ms”); ?

Thanks.

---

<div class="post-metadata">

**Author:** ![tarekalba](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@tarekalba](https://community.postman.com/u/tarekalba)\
**Post date:** [January 22, 2021, 6:10am UTC](https://community.postman.com/t/how-to-print-the-schema-validation-in-console/19415/2 "2021-01-22T06:10:51Z")

</div>

Basically what I am trying to do an if-else statement that will print the pass or fail for the results that come from the pm.test e.g.

---

<div class="post-metadata">

**Author:** ![tarekalba](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@tarekalba](https://community.postman.com/u/tarekalba)\
**Post date:** [January 23, 2021, 1:45am UTC](https://community.postman.com/t/how-to-print-the-schema-validation-in-console/19415/3 "2021-01-23T01:45:18Z")

</div>

Solution was done by @allenheltondev as here:

[How to print the results of pm.test in console? - Help - Postman](https://community.postman.com/t/how-to-print-the-results-of-pm-test-in-console/19417)
