How can I define a visualizer for a folder


I have a set of tests, with the same response structure, stored in one folder.
And each test uses the same visualizer ‚Äúdefinition‚ÄĚ like

pm.visualizer.set( pm.variables.get(‚ÄėmyVisualizerTemplate‚Äô), { response: pm.response.json() });

But it is very annoying to copy the same line in each test.

Can I define it per folder (e.g. via a central post-request-trigger script call?) that no duplicates are required anymore.


Hey @helmutk :wave:

You should be able to place that script at the Folder or the Collection level, it would then run after every request.

You would only need to have it in a single place and not repeated in every single request.

Thank you, you are right it is working and so simple if I call it in the ‚ÄúTests‚ÄĚ script (and not in the ‚ÄúPre-request Script‚ÄĚ, which I used until now)
BR Helmut

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.