Indicating Start and Finish for Video Capturing

Refer to the Javadoc for full details regarding available Java classes and methods. If the link does not work, click Help > Documentation > Silk Central API Specification in the Silk Central menu to open the Javadoc.

When you create a new third-party test plug-in for Silk Central, with a third-party test type that supports processing multiple test cases in a single test execution, and you want to associate captured videos to specific test cases, you can proceed in two ways.

Third-Party Tests that are Running in the Plug-In

For these tests, we recommend you to use the indicateTestStart and indicateTestStop methods of the TestLaunchResultDrain class.

Third-Party Tests that are Running in an External Process

For these tests, you can use a TCP/IP-based service to send START and FINISH messages to the port of the Silk Central execution server. The port number to be used can be queried from ExecutionContextInfo.ExecProperty#PORT_TESTCASE_START_FINISH in the plugin. The port is also available as an environment variable called #sctm_portTestCaseStartFinish in the test process, if the plugin extends ExtProcessTestLaunchBean. These message types inform the execution server that a test case in the test has started or respectively finished. The messages must be encoded in Unicode (UTF8) or ASCII format.
Message Type
Format
START
START <Test Name>, <Test ID> <LF>, where LF has ASCII code 10.
FINISH
FINISH <Test Name>, <Test ID>, <Passed> LF, where LF has ASCII code 10. Passed can be True or False. If video capturing is set to be performed On Error, the video is only saved to the results if Passed is set to False.

The execution server responds with the message OK, if the request was recognized, or otherwise the execution server responds with an error message. Always wait for the response of the execution server before you execute the next test case, because otherwise the recorded video might not match the actual test case.

If the external process, where the test is executed, is based on a Java environment, we recommend you to use the indicateTestStart and indicateTestStop methods of the TestCaseStartFinishSocketClient class, which is included in the file tm-testlaunchapi.jar.