How to run specific test case in particular environment?
I have 2 environments setup : Dev & QA.
There are certain test cases which are intended for Dev env only. How I avoid running those when I select QA environment?
or when I select Dev env, only dev environment specific test cases run?
You have a few ways you can do this.
Use Test Suites : You could arrange your tests into two different test suites. One suite called 'Dev' and the other called 'QA'. This doesn't stop you running the Dev test suite against the QA environment though! The other downside is that you might actually have tests you want to run against both environments. It's not ideal to have two copies of the same test, so maybe a third test suite called 'All Environments'?
At a test case level, you could also use a Groovy script to check the env and then decide whether to run or skip.
I'd be interested to hear other suggestions.