Use of Test Case Tags during Execution

Hi,

We can define a tag for a test case and based on that tag, we can filter and execute those tests only which have the mentioned tag(s).

In this document there is no mention of either we can use tags with test suite execution or test suite collection execution.

I have a test suite collection with many test suites and each test suite have some test cases marked with a particular tag i,e SmokeTesting.

I tried to run test suite collection in console mode with flag “-testCaseFlags=SmokeTesting” thinking that it will execute only those cases of a test cuite which have this tag value but it didn’t. It simply starts executing all the scritps in within a test suite.

If I execute a test suite with same flag then it work as it should be.

So can someone comfirm wheather “-testCaseFlags” flag is working in case of test suite collelction execution or only working in case of test suite execution?

Executing each test suite for the purpose of smoke testing (couple of test cases from each test suite) seems tedious to me.

Thanks

1 Like

Hi - it looks like you’re using ‘flags’ instead of ‘tags’ in your command line arguments:
documentation gives an example:

In your command, add this argument:
-testCaseTags="<tag1>,<tag2>"

In the command, you add this argument: testCaseTags="jan,feb".

Whereas you used: “-testCaseFlags=SmokeTesting” (note also where the quotation marks go)

You could also use Dynamic Test Suites (as a enterprise user), as another option

Hi there Zahid @zahid.asim, :wave:

Just checking in to see if Dan was able to provide the answer you needed or not.

If yes, then could you help to mark his reply as a solution :white_check_mark: by following the video below, so that other members can refer to it in the future? Thanks.

If not yet, then please follow up with Dan so you can work together towards a solution.

Thanks,
Albert

I fugured it out that the mentioned flag only works with test suite not with test suite collection.

Note - @Dan_Bown you were as I mistyped the flag “-testCaseFlags” whereas it should be “-testCaseTags”