Created On:  26 October 2010

Problem:

Information on configuration and usage of process executor type test definitions

Resolution:

This test definition type allows users to create test definitions that can execute an application process and gather the any command line output of the execution in a text file as part of the result. It is also possible that using scripting for e.g vbs or javascript SilkCentral test manager(SCTM) compatible result output file (output.xml) can be created that can be added to the SilkCentral results set.

This particularly can be useful in scenarios where you need to fire off a build or start running a test suite outside of SCTM or send a command to a non-windows operating system and have the results returned on the command prompt or in any other file format which can then be parsed and stored in SCTM aware result output file (output.xml) format.

Configuration

To create a test definition of type process executor following steps are required to be performed

1. Navigate to the Test Manager | Test Plan module on SilkCentral Test Manager
2. Select the Test Container where the new test definition has to be created
3. Right-click and choose “New Child Test Definition” option

4. Choose the test definition type “ProcessExecutor Test” on the New Test Definition Screen

5.Following information need to provided when creating ProcessExecutor type of test definitions

a.Executable Name (Required):
The executable can be a batch file or an exe type file. Specify the name of the executable or batch file that you wish to run with its path

b.Argument List (Optional):
Any arguments that the command specified in the batch file or your exe require can be specified here.

c.Working Folder (Optional)
Specify the location where the Silk Central test manager will execute the process.


Usage scenario

In this sample we are running a trace route command to show route taken by packets to a public site microfocus.com which fails due to network problem and as a result we capture the failed message and log that message output to a result file that can be read by Silk Central Test Manager(SCTM).
This configuration is neither designed to reflect best practices nor does it reflect a desired configuration for a production network.

Steps for configuration of demo
1.Create a batch file (tracert.bat) that contains the following statement and is located in the C:\test directory

tracert.vbs www.microfocus.com %SCTM_EXEC_RESULTSFOLDER%


Storing of the result file created in step 2 below in a location where SCTM results are stored such that it is picked up by SCTM when the execution ends is achieved by using the %SCTM_EXEC_RESULTFOLDER% environment variable.


2. In this step for demonstration purpose we are using a VB script that executes the tracert command and writes the failure message returned by that command to an output.xml file in a format that is required by SCTM. Other scripts or methods to generate output.xml can be used depending upon how your test environment/package is set up.  For more details on the output.xml structure please refer to the "Windows Script Host Tests" topic in the SilkCentral Test Manager help


3.Create a test definition as mentioned in the Configuration section above and assign it to an execution definition.

4.Run the execution definition created above and change to “Activities” view to verify the execution status.
  ** if running on remote execution server make sure the tracert.bat and tracert.vbs is located in c:\test folder

5.Once the execution is complete you can click on the Run ID of the execution definition in the Last Executions section
 

6.On the results dialog select the Files tab and check the output.xml file for result of the command that was run from the vbs script file.


7.Open the Output.xml file in the browser to verify the failed result message from the tracert command.