How can I define a visualizer for a folder

Hi,

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.

Thanks

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.