I have 100 testcases in my collection and part of these testcases are data assertions.
Now, this data setup is actually is based on values in Staging environment of my application which would eventually fail if run them on any other environment(as we have different data on different environment).
Thus, can i categorize such cases and ignore them while running the collection on some other environment at my convenience??
Sounds like you’re hardcoding the data? If so, I would suggest using variables instead.
I have 3 environments I write tests for and only have 1 collection of nearly 100 requests. I basically made all of my tests environment agnostic by using variables anywhere I know I will be using data specific to an environment. So no matter which env I run my tests on, I don’t have to worry about mixing up the data from one environment into another.
You can put requests in folders and run specific folders, even multiple folders at once.
You can use variables as @lvaltierra suggested. You can skip tests based on a condition that you define (such as based on which environment is active).