[core] @BeforeSuite and @BeforeClass not always being invoked #182
Labels
comp:core
core feature of infinitest (infinitest-lib + infinitest-runner))
status:needs-repro
type: bug
I'm using Infinitest 5.1.115 in Eclipse Mars with TestNG 6.8. I have some tests that work fine when run manually using the TestNG plugin, but sometimes fail when run by Infinitest.
My tests are set up like:
It appears that when Infinitest decides to run only some of the tests in
FooTest
, it doesn't trigger the@BeforeSuite
method.I then tried adding a
@BeforeClass
method inFooTest
that calledTestBase.configureEnvironment()
. This didn't help though, it appears to suffer from the same problem.Lastly I added a
@BeforeMethod
method inFooTest
that calledTestBase.configureEnvironment()
-- this seems to keep Infinitest happy in all situations, but obviously isn't ideal from a performance or convenience standpoint.It's probably also worth noting that if I clean the project (causing Infinitest to run all tests), everything passes as expected.
The text was updated successfully, but these errors were encountered: