JBoss Community

Screencasting of running tests

modified by Max Rydahl Andersen in JBoss Tools Development - View the full document

Recording screencast of running tests is implemented in JBT test suite via class ScreenRecorderExt.java.

 

To save screencast of test just insert this code to proper place within test class:

 

screenRecorderExt = new ScreenRecorderExt();
// start scren cast recording
screenRecorderExt.start(videoFileLocation);
<... test instructions ...>
// stop screen cast recording
screenRecorderExt.stop();

 

Implementation for SWTBot tests

 

For SWTBot tests is screencasting fully implemented. Once enabled via setting system property swt.bot.test.record.screencast=true all tests from test run are saved together with requirements processing. For each test class of test run one video file is saved with name of the test class. Recorded files are saved in the screencasts directory at the same location where SWTBot tests are creating screenshots directory.

 

Implementing class is RequirementAwareSuite.java


Important methods:


private static void startScreenRecorder(String className)
private static void stopScreenRecorder()
protected Statement withBeforeClasses(Statement statement)
public void run(RunNotifier notifier)

Comment by going to Community

Create a new document in JBoss Tools Development at Community