Update docs/src/junit-java.md
Co-authored-by: Yury Semikhatsky <yurys@chromium.org> Signed-off-by: Jean-François Greffier <jfgreffier@users.noreply.github.com>
This commit is contained in:
parent
1c44385e42
commit
2306f84ce9
|
|
@ -125,7 +125,7 @@ Since it is not safe to use same Playwright objects from multiple threads withou
|
|||
instance per thread and use it on that thread exclusively. Here is an example how to run multiple test classes in parallel.
|
||||
|
||||
Use [`@TestInstance(TestInstance.Lifecycle.PER_CLASS)`](https://junit.org/junit5/docs/current/api/org.junit.jupiter.api/org/junit/jupiter/api/TestInstance.html)
|
||||
annotation to make JUnit create one instance of a class for all test methods within that class (by default each JUnit will create a new instance of the class
|
||||
annotation to make JUnit create one instance of a class for all test methods within that class (by default JUnit will create a new instance of the class
|
||||
for each test method). Store [Playwright] and [Browser] objects in instance fields. They will be shared between tests. Each instance of the class will use its
|
||||
own copy of Playwright. This is done automatically if you use the `@UsePlaywright` JUnit annotation.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue