Video Recorder
Video Recorder allows recording video of your tests with minimal configurations.
Setup
Video Recorder is primarily used as a Java dependency . We typically use a build tool (such as Maven or Gradle) to resolve the Video Recorder dependency.
- Maven
- Gradle
<dependency>
<groupId>io.github.selcukes</groupId>
<artifactId>video-recorder</artifactId>
<version>${selcukes.version}</version>
</dependency>
dependencies{
implementation("io.github.selcukes:video-recorder:${selcukes.version}")
}
note
Video Recorder is a transitive Dependency of selcukes-reports
.If you are using selcukes-reports
,
then ignore adding this dependency explicitly.
warning
If you are using selcukes-reports
then refer Selcukes TestNG for video configuration
integration
Usage
Add selcukes.yaml
file in src/test/resource
folder and update below video configuration as required
video:
recording: true
recorderType: MONTE
ffmpegPath:
watermarkStatus: false
Create a test class as follows
public class VideoTest {
@Test
public void recordVideo() {
Recorder recorder = RecorderFactory.getRecorder(RecorderType.MONTE);
recorder.start();
Await.until(5);
File file = recorder.stopAndSave("test");
Assert.assertTrue(file.getAbsolutePath().contains("mp4"));
}
}