Tests Result in Tests Scripts

Hi guys!

Need a help from your experience : I need to have directly into the tests script a way to have the total amount of Pass, Failed an Skipped tests actually executed under a collection.

Thank you!

Hey @andrea.oboe,

Welcome to the community! :trophy:

If you run the Collection with Newman, you could use htmlextra to see that detail.

You can use it with a Docker too:

1 Like

Thank you @danny-dainton!

It’s not the things that i need (I already use newman-reporter-htmlextra).
I need directly into the script the values because i need to write the total result of the tests (Passed, Skipped and Failed) into a mysql db (I’m using xmysql)

And also @danny-dainton thank you for your AMAZING work with newman-repoter-htmlextra <3

1 Like

I don’t think that it’s exposed in the app, you could piece different information together but I don’t believe it would be straightforward. :pensive:

Thank you Danny for the info.

Maybe the best thing that actually i can do is to create a global function to collect the pm.expect assertions result with the old format. Something like this for example :

var testResult = tests[“Response time is less than 30000ms”] = pm.response.responseTime < 30000;

If it helps - pm.test.index() should give you a count of all tests.

1 Like