-
Notifications
You must be signed in to change notification settings - Fork 14
Video recorder
Desktop video recorder is an extension to Arquillian platform which provides the possibility to record tests as videos. Whole desktop is recorded. In order to use it, please place this artifact configuration into Maven dependencies.
<dependency>
<groupId>org.arquillian.extension</groupId>
<artifactId>arquillian-desktop-video-recorder</artifactId>
<version>${version.desktop.recorder}</version>
</dependency>
You can inject video recorder into Arquillian test like this:
@ArquillianResource Recorder recorder;
You can then start and stop recording as you wish directly in your test via startRecording() and stopRecording() methods. Feel free to explore. You can not start recording when you have already started to do so and you can not stop recording when you have not started to record yet.
When you want to record manually by injecting Recorder into test, you can not record by automatic manner because Recorder is able to record only one video in some particular moment. In order not to record videos automatically, all start* properties and takeOnlyOnFail property have to be set to false in order to successfully inject Recorder as @ArquillianResource.
You can record videos which span multiple test methods, like this:
@ArquillianResource private Recorder recorder; @Test @InSequence(1) public void test1() { recorder.startRecording(); } @Test @InSequence(2) public void test2() { // we are still recording, whatever happens here is recorded } @Test @InSequence(3) public void test3() { recorder.stopRecording(); }