Can I run test cases based on "not matching" a particular tag in Catch2?
TEST_CASE("Check the data validity","[Working]"){
REQUIRE(true);
}
TEST_CASE("Check the input","[InProgress]"){
REQUIRE(true);
}
TEST_CASE("Validate the response","[NotWorking]"){
REQUIRE(false);
}
I want to invoke testcases that are not falling in [NotWorking]
tag until I finish implementing that functionality.
Source: https://github.com/catchorg/Catch2/blob/master/docs/command-line.md#specifying-which-tests-to-run
Test case examples:
thisTestOnly Matches the test case called, 'thisTestOnly'
"this test only" Matches the test case called, 'this test only'
these* Matches all cases starting with 'these'
exclude:notThis Matches all tests except, 'notThis'
~notThis Matches all tests except, 'notThis'
~*private* Matches all tests except those that contain 'private'
a* ~ab* abc Matches all tests that start with 'a', except those that
start with 'ab', except 'abc', which is included
So in your case add to the command line:
exclude:NotWorking
or
~NotWorking
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With