Generate A Simple Test Report

Hi All,

I’ve created a public collection which displays a simple test report. Shows the total number of tests, folders and requests on a specific collection. It uses the Postman collection GET request endpoint, then searches the response JSON and displays the results as a simple bootstrap HTML table.

I deal with big collections, so I can’t always wait for a runner or a Newman test report to be generated, especially whilst the API is in development and the tests are being built up. It works for me and hopefully might help someone else :slight_smile:

Postman Test Report Collection Link

11 Likes

Looks cool @ianb120, great use of the visualizer. :trophy:

Thanks for sharing the Public Workspace link.

You can also create custom HTML report templates to display the data, in the same way, using Newman. Not sure which reporter you were but all of the HTML ones give you the ability to display the data in a way that suits your own context.

3 Likes

Thanks I’ll have a look. Problem is with Newman, I’ve gotta wait till the requests have finished. To get that data back. This is more of a quick and dirty way to display that data. Especially on the first run with a heavy number of tests/requests. Each taking a minute or so per request.

Nice to get this data as it is being worked on and the API is changing. I see Newman being useful once it goes in to a more stable environment, and the data isn’t so volatile. Again this works for me.

That’s fair - It’s just a list of numbers/metrics rather than the actual test feedback though right?

All 21 of those tests could be failing or those requests could be returning 400 or 500 status codes :smiley:

Again, it’s all based on context and if it fulfils your requirement that’s awesome. :trophy:

2 Likes

Yeah its just static data based on the JSON in the collection. So those tests/req could all fail. It’s just to give an indicative set of numbers. So in my case to show test progress, as we were creating tests and the API response got changed. We had 1000’s of tests/req but hadn’t run Newman as they’d all fail. I know we could have run Newman/Runner but it would of taken a few minutes to run something we’d knew that would have failed just to get the numbers to be able to report back.

So an edge use case maybe, plus I learnt about recursive loops :slight_smile:

3 Likes

Hi @ianb120,

Nice one thanks for sharing, when i tried with some lengthy collection name the postman logo
misplaced, i just want to share this to you, again good one and thanks !

Hi @SaravananSeenivasan, thanks for letting me know.

I’ve updated the img tag with object-fit: contain, so it fits better when long collection names are used.

1 Like

It’s actually using the older logo too :cry:

You can find the updated one at the bottom of this page:

1 Like

Good catch - I’ve updated the src img :slight_smile:

1 Like

Hey @ianb120,
I really like it! The use of the visualizer for quick feedback right in the app and sharing via a public workspace. Good stuff :grinning_face_with_smiling_eyes:

1 Like