[jboss-dev-forums] [JBoss Tools Development] - Screencasting of running tests
Max Rydahl Andersen
do-not-reply at jboss.com
Fri Aug 31 08:04:04 EDT 2012
Max Rydahl Andersen [https://community.jboss.org/people/maxandersen] modified the document:
"Screencasting of running tests"
To view the document, visit: https://community.jboss.org/docs/DOC-24365
--------------------------------------------------------------
Recording screencast of running tests is implemented in JBT test suite via class ScreenRecorderExt.java (https://anonsvn.jboss.org/repos/jbosstools/trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/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 (https://anonsvn.jboss.org/repos/jbosstools/trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/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
[https://community.jboss.org/docs/DOC-24365]
Create a new document in JBoss Tools Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20120831/fbf16de6/attachment.html
More information about the jboss-dev-forums
mailing list