setNextRequest does not scale and is error prone, we need a better way

We need a better way to programatically skip requests, a very common use case is when you have requests that should not be run in determined environments so not to compromise data.

At the moment, we cannot control that behaviour and the only available tool, setNextRequest, does not scale and is pretty error prone, adding setNextRequest in a request that executes before the request I want to skip is error prone because requests tend to change order or move folders, this is specially true on large teams, also it does not make logical sense as I am configuring a specific test by adding a line of code in a different test.

We have tried work around using dummy requests wrapping requests we want to skip as this

  1. Skip requests below (setNextRequest(“End of skip requests”))
  2. request 1
  3. request 2
  4. End of skip requests

The above gets messy pretty fast as logic for skipping requests can be a bit complex, also collections get polluted with useless requests

There should be a way to run a skip method in the pre-request so the request running the script is skipped.