InvokePerl

You use the InvokePerl keyword to execute a Perl file.

  • Signature supported:

    InvokePerl (Select Machine|scriptname.pl:@VAR/String[String1,String2....N]/NULL|Output Variable)

    • Select Machine : SiebelServer machine or TestHarness machine. Siebel Server reads the server credentials from the xml file and executes the Perl file on server machine.

    • TestHarness Machine : Executes the perl file locally.

    • Scriptname.pl : Perl script to be executed.

    • @VAR/String[String1,String2....N : Variable support or strings to be passed to the perl file.

    • @Output Variable : Variable support to get the value from the perl file.

    Note: You should declare a PerlExecStatus variable in the Perl file. Separate all string inputs by commas to InvokePerl resolves to ARGV[1] in your perl program. Comma separated inputs in your program are parsed, if multiple strings are expected.
  • Include PerlExecStatus at the end of the Perl File (as shown in the following example).

    print"PerlExecStatus = $PerlExecStatus";
  • To save a value into a variable, use the following syntax in the perl file:

    print"\@invokePerl1=$ARGV[1]."; 
    print"\@invokePerl2=$ARGV[0]."; 
    print"perlexecstatus = $PerlExecStatus";
  • Prerequisites:

    Folder Structure: All user defined perl files and cmd.txt for execution should be placed in the Resources/invokePerl folder in TestHarness.

    The exe files folder should be placed in the framework\exe in TestHarness.

  • Update the following tags in config.xml:

    SIEBEL-SERVER-NAME=macihne-name ----SERVER_MACHINE will be passed as $ARGV [0] to the perl file
    SIEBEL-SERVER-MACHINE-LOGIN-ID=userid ----SERVER_LOGIN will be passed as $ARGV [1] to the perl file
    SIEBEL-SERVER-MACHINE-PASSWORD=pwd ----SERVER_LOGIN will be passed as $ARGV [2] to the perl file
    SIEBEL-SERVER-OS-TYPE=WINDOWS ----SERVER_OS_TYPE will be passed as $ARGV [3] to the perl file
    SERVER-DB-TYPE=MSSQL ----SERVER_DB_TYPE will be passed as $ARGV [4] to the perl file
    SERVER_DB_NAME=dbname ----SERVER_DB_NAME will be passed as $ARGV [5] to the perl file
    DBSERVER-AND-PORT=dbserver,port ----DBSERVER_AND_PORT will be passed as $ARGV [6] to the perl file
    DB-TABLE-OWNER=XYZ ----DB_TABLE_OWNER will be passed as $ARGV [7] to the perl file
    DB-SERVER-LOGIN=SADMIN|MSSQL ----DBSERVER_Login will be passed as $ARGV [8]&& $ARGV [9] to the perl file
    TEST-MACHINE-NAME=machinename ----CLIENT_MACHINE will be passed as $ARGV [10] to the perl file
    ----------- ----TestHarness Path $ARGV[11] 
    SIEBEL-GATEWAY-PORT=servername:port ----ENTSERVER_AND_PORT will be passed as $ARGV[12] 
    SERVER-INSTALLATION-PATH ----C:\\23044\\ses\\siebsrvr\\BIN ----SERVER INSTALLATION PATH will be passed as $ARGV[13]
    ------------- ----Exefiles folder location will be passed as $ARGV[14] 
    Variable passed from script ----Will be passed as $ARGV[15] 
    [PERL-PATH]
    Ex: PERL-PATH= \\\\servername\\install\\PERL_UTILS\\Perl1\\bin\\perl.exe

Examples in the following table show how to use the InvokePerl keyword.

Keyword Target Object Inputs Closing Action

InvokePerl

N/A

SiebelServer Machine;test.pl:NULL;NULL

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:value1,value2;NULL

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:value1;NULL

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:value1,@invokePerl;NULL

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:@invokePerl;NULL

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:@invokePerl,@invokePerl;NULL

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:@invokePerl,@invokePerl;@invokePerl1

N/A

InvokePerl

N/A

SiebelServer Machine;test.pl:@invokePerl,@invokePerl;@invokePerl1,@invokePerl2

N/A

InvokePerl

N/A

TestHarness Machine;test.pl:NULL;NULL

N/A

InvokePerl

N/A

TestHarness Machine;test.pl:value1,value2;NULL

N/A

InvokePerl

N/A

TestHarness Machine;test.pl:value1,@invokePerl;NULL

N/A

InvokePerl

N/A

TestHarness Machine;test.pl:@invokePerl,@invokePerl;@invokePerl1

N/A

InvokePerl

N/A

TestHarness Machine;test.pl:@invokePerl,@invokePerl;@invokePerl1,@invokePerl2

N/A