public class ScreenShooterExtension
extends java.lang.Object
How to use in Java:
@ExtendWith({ScreenShooterExtension.class})
public class MyTest {...}
How to use in Java (with customization):
public class MyTest {
@RegisterExtension
static ScreenShooterExtension screenshotEmAll = new ScreenShooterExtension(true);
...
}
How to use in Kotlin:
@ExtendWith(ScreenShooterExtension::class)
public class MyTest {...}
How to use in Kotlin (with customization):
public class MyTest {
companion object {
@JvmField
@RegisterExtension
val screenshotEmAll: ScreenShooterExtension = ScreenShooterExtension(true);
}
...
}
| Constructor and Description |
|---|
ScreenShooterExtension() |
ScreenShooterExtension(boolean captureSuccessfulTests) |
| Modifier and Type | Method and Description |
|---|---|
void |
afterEach(ExtensionContext context) |
void |
beforeEach(ExtensionContext context) |
ScreenShooterExtension |
to(java.lang.String folderWithScreenshots)
One-liner to configure Configuration.reportsFolder property.
|
public ScreenShooterExtension()
public ScreenShooterExtension(boolean captureSuccessfulTests)
captureSuccessfulTests - param that indicate if need to capture successful testspublic ScreenShooterExtension to(java.lang.String folderWithScreenshots)
folderWithScreenshots - Folder to put screenshots topublic void beforeEach(ExtensionContext context)
public void afterEach(ExtensionContext context)