We've encountered a problem which we have few test classes, each one of them has it's own @BeforeClass
logic.
We want that in case we run tests from suite, Test's @AfterClass
won't be executed as it will cause a conflict with the suite @AfterClass
.
(In our case, we are running a docker container in @BeforeClass
and kill it in @AfterClass
of each test class.
But once we run tests through suite, we want this opearation will be executed only once in suite before and after class).
We know that we can a set a system property in suite @BeforeClass
(and to check it in before class of test classes) but we wonder if there is some built in solution for our problem?
Thanks a lot.