TestCaseMetaInfo.Status.DISABLED ignored
Citrus Version 2.7.4
Expected behavior Testcase isn't executed as it is when we are using the CitrusXmlTest annotation
Actual behavior Testcase is executed
Test case sample
public class Foo extends extends TestNGCitrusTestRunner {
@CitrusTest
@Test
public void test() {
status(TestCaseMetaInfo.Status.DISABLED);
Please, share the test case (as small as possible) which shows the issue
Hi!
Please use the annotations provided from the respective test runner (TestNG, Junit4, Junit5).
E.g. @Test(enabled = false) For TestNG
BR, Sven
Sure I can do, but still a bug. Otherwise you have to remove it from your API
After a little research, I agree that this is a potential bug. :+1:
status(TestCaseMetaInfo.Status.DISABLED); is a supported feature according to the Test meta information documentation.
BR, Sven
Confirmed for the runner using
@Test
@CitrusTest
public void testGet() {
status(TestCaseMetaInfo.Status.DISABLED);
echo("foo");
}
For the designer, the feature works as expected.
Nevertheless, I am pretty sure that this can not be fixed as the runner works completely different from the designer. The runner executes the test case immediately, while the designer just configures the Citrus test when the underlying test runner "executes" the test. After the configuration has been completed, the Citrus test designer starts executing the test case. To put it another way, in the moment the runner gets status(TestCaseMetaInfo.Status.DISABLED); the test execution has already been started.
So from my current perspective, status(TestCaseMetaInfo.Status.DISABLED); is a redundant feature to the underlying test runner capabilities and should be removed instead of being fixed.
BR, Sven
@christophd @bbortt Hello, right now status() not work, right?
What do you think about:
[svettwer]:
So from my current perspective, status(TestCaseMetaInfo.Status.DISABLED); is a redundant feature to the underlying test runner capabilities and should be removed instead of being fixed.
@akuz0 maybe rather remove for 4.0.0 and leave it to be for 3.x.x. would create a new issue (to remove the code) and add it to the 4.0.0 project.