helmutk
(helmut)
November 24, 2023, 8:53pm
1
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
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.
helmutk
(helmut)
November 25, 2023, 3:20pm
3
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
system
(system)
Closed
November 28, 2023, 3:20pm
4
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.