<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Screencasting of running tests
</h3>
<span style="margin-bottom: 10px;">
modified by <a href="https://community.jboss.org/people/vpakan">Vlado Pakan</a> in <i>JBoss Tools Development</i> - <a href="https://community.jboss.org/docs/DOC-24365">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p><span>Recording screencast of running tests is implemented in JBT test suite via class [ScreenRecorderExt.java|</span><a class="jive-link-external-small" href="https://svn.jboss.org/repos/jbosstools/trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ScreenRecorderExt.java" target="_blank">https://svn.jboss.org/repos/jbosstools/trunk/tests/plugins/org.jboss.tools.tests/src/org/jboss/tools/test/util/ScreenRecorderExt.java</a><span>].</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>To save screencast of test just insert this code to proper place within test class:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><span style="color: #000000; font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; font-size: 11.199999809265137px; background-color: #f4f3f3;">{code}</span></p><p>screenRecorderExt = new ScreenRecorderExt();</p><p>// start scren cast recording</p><p>screenRecorderExt.start(videoFileLocation);</p><p><... test instructions ...></p><p>// stop screen cast recording</p><p>screenRecorderExt.stop();<span style="color: #000000; font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif; font-size: 11.199999809265137px; background-color: #f4f3f3;"><br/></span></p><p><span style="color: #000000; font-size: 11.199999809265137px; background-color: #f4f3f3; font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;">{code}</span></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><strong>Implementation for SWTBot tests</strong></p><p style="margin: 16px 0 0; color: #000000; font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 12.727272033691406px; background-color: #e0f0ff;">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.</p><p style="margin: 16px 0 0; color: #000000; font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 12.727272033691406px; background-color: #e0f0ff;">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.</p><p style="margin: 16px 0 0; color: #000000; font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 12.727272033691406px; background-color: #e0f0ff;">Implementing class is <a class="jive-link-external-small" href="https://svn.jboss.org/repos/jbosstools/trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/RequirementAwareSuite.java">RequirementAwareSuite.java</a></p><p style="margin: 16px 0 0; color: #000000; font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 12.727272033691406px; background-color: #e0f0ff;">Important methods:</p><p style="margin: 16px 0 0; color: #000000; font-family: Arial, FreeSans, Helvetica, sans-serif; font-size: 12.727272033691406px; background-color: #e0f0ff;">{code}</p><p> private static void startScreenRecorder(String className)</p><p>private static void stopScreenRecorder()</p><p>protected Statement withBeforeClasses(Statement statement)</p><p>public void run(RunNotifier notifier)</p><p><span style="color: #000000; font-size: 11.199999809265137px; background-color: #f4f3f3; font-family: 'Lucida Grande', Geneva, Verdana, Arial, sans-serif;">{code}<br/></span></p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-24365">going to Community</a></p>
        <p style="margin: 0;">Create a new document in JBoss Tools Development at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2129">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>