We need to use methods annotated by @BeforeAll and @AfterAll in our tests; we also need to use a new instance of the test class for each test method.
Can we set the @TestInstance annotation to TestInstance.Lifecycle.PER_METHOD mode and use @BeforeAll and @AfterAll?
Test lifecycle annotations
Correct annotations and mode
Report a typo
Select one or more options from the list
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.