How to run a Perl script from SilkCentral Test Manager?

0 Likes

Problem:

How to run a Perl script from SilkCentral Test Manager?

Resolution:

Out of the box, Windows-WSH supports Javascript and Visual Basic scripts. For other scripting languages (e.g. Perl) we need a Windows plugin. A WSH plugin for Perl needs to be installed on the execution server(s). After that the script can be defined for any WSH test definition, just like a Visual Basic script. The WSH tool on the execution server will be recognised by the file extension, i.e a Perl script and execute it appropriately.

You would have to install the Perl script interpreter ("ActivePerl") on the execution server(s). This is for example downloadable from ActivePerl. If the Perl interpreter has been installed, a user may define any Perl script file (extension ".pls") located in the source control system for the "Script" property of WSH test definitions.

Note, if the "Browse" button is used to select the Perl script for the test definition, the file filter needs to be changed to "All files (*.*)" to be able to see ".pls files instead of only ".vbs" and ".js" files. ( see below)



Steps to run the attached Perl Script.

  1. Install Active Perl on the execution server
  2. Create a new Child Test Definition of type : Windows Scripting Host
  3. Browse to your .pls script
  4. Execute the Test Definition


This will create the following log file in Results.


Example Perl Script.
helloworld.pls


Related documents:


Old KB# 24692
Comment List
Anonymous
Related Discussions
Recommended