Open 0xHiteshPatel opened 7 years ago
@0xHiteshPatel Thanks for reporting this issue 👍 . Could you elaborate more on the use-case ?. What do you mean by unattended test runs?
I'm working on a framework that allows quick prototyping of polled workflows. We would like to enable different variations of pass/fail reporting via tests[] based on how the collection is run. Currently the user has to toggle this via a global/env variable, however, it would be better if we could auto-detect how the user was running the collection.
@a85 we need to decide whether we should do this since we are trying hard to unify all runtime hosts and difference during run can be confusing.
For reference the framework is here:
My use case is, I’d like to prevent (accidental) invoking of requests directly from postman. These are requests that are put in a folder made for Collection Runs only.
I realize I could introduce additional environments for this but it would require additional environments and/or user effortand I'd like a solution that works in all environments.
We have taken a lot of steps to improve Postman performance in all scenarious, however in some cases it's a choice between having smoother running app and monitors that take longer to run and therefore may timeout. Having a way to identify where the execution is happening will allow us to use different approaches and ensure best performance in all cases.
I have a usecase where I'd like to add a delay to a single request in a series of requests, but only when it's being run within the runner or newman. A flag somewhere would work.
A workaround would be to create an environment variable and duplicate the environment you're using and setting a flag in the duplicated env. That's untenable for me due to the overhead of keeping those environments in sync.
Is there any way to detect whether a request is running from requestor vs runner vs newman in a PR or Test script? I'm trying to modify tests based on how a request is run to allow unattended test runs but can't find a way to detect this.
If this is not available could it be added as a variable/function available in the PR/Test sandbox (e.g. postman.getRunMode())?