Checking Collection Runner State

Hi All.

Apologies if this has been asked before, but I search for it and could find it.

Is there function in Postman to call to that with tell me if the the Collection Runner is currently running?

Only in some cases I want to be able to do different things depending on if the collection runner is active or not.

For example if the collection runner is not active I can’t use a pm.variable between requests whereas I can if the collection runner is active.

Thanks in advance

Hi @cruxto.

You can only visually inspect the status of the collection runner. Why are you using pm.variables rather than collection or environment variables? pm.variables allows you to only set local variables.

Hi @gbadebo-bello.

Thanks for responding.

I do use collect and global variable as well.

I prefer to use pm.variable where i can so that i don’t have to worry about cleaning them up after the test execution has finished.

As a rule of thumb when building a new test pack i like them to be work with and without the runner.

So if i don’t use the runner for example, I with normally put the data needed into the global variables. But i have the option to use a csv file to test more scenarios.

Thanks again

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