Closed bam-hbt closed 1 year ago
Thanks for the hint, calling @BeforeAll
in the same thread and clearing the mockito cache should work starting with https://github.com/DaGeRe/peass/commit/c8f6fa35dfb51cbb948c5b2d8f60fa4371431f44 - can you confirm this?
JUnitTestTransformer add "_peass_initializeMockito()" method to other test class, they didn't use any Mockito. Therefore, miss Mockito import in these classes, or is better don't add the method to the test classes without Mockito.
This should fix that: https://github.com/DaGeRe/peass/pull/111
Thanks for fix, looks fine.
What feature do you want to see added?
Kopeme runs the tests in a separate thread and the mocking static methods in a local thread-mock. Also, JUnit 5 starts the test initialization (including @BeforeAll), and then KoPeMe starts the test control later in the test cycle, and then starts BeforeAll again. However, since mock static instances are supposed to be closed, running BeforeAll multiple times will give an exception. Therefore, the Kopeme should be capable of calling the @beforAll method in the same thread.
Upstream changes
No response