Hi Team,
Would like some suggestion on a problem that I have
We currently have postman tests running in our CI/CD pipeline across different environments, with a folder structure as such
Feature
- Collection 1
-
- Request 1
-
- Request 2
-
- Request 3
- Collection 2
-
- Request 1
-
- Request 2
- Collection 3
-
- Request 1
-
- Request 2
And so on
- Request 2
Of course during development we will run into issues where, there are bugs in a particular environment, and hence a particular collection will fail, and hence the pipeline will show that a test fails. Which is great! And not great at the same time, because I don’t want it to keep running the failed tests, I want to exclude these tests so that we don’t waste time/resources to run these tests until I know that a fix has been made.
So I have several questions regarding this:
-
How would I go about skipping a whole collection? For example, I only want to run Collection 1 and Collection 3 only. At the moment I am skipping a whole feature, but if only 1 collection is failing, I want to be able to run the other ones. I have tried doing
postman.setNextRequest({{folderName/folderId}}),
at the folder/collection level, but it would just run Collection.Request1 and stop there, instead of running the whole collection. Is there a way to skip only a particular collection? -
If not, am I structuring my tests wrong perhaps? What would be the suggestion to deal with an issue such as this? I’m sure this is a fairly common scenario, would love to hear how other people structure/deal with this!
Thank you