Skip to Main Content
Return to Navigation

Executing Tests

This section describes how to execute tests and test cases.

Executing a Test

To execute a test:

  1. With a test open in PTF, select Test, Run.

    Alternatively, you can press F5 or click the Run button.

  2. If Yes is specified in the Prompt for Options field for the default execution option, then the Execution Options dialog box appears.

    Select an execution option from the list and click Accept.

    PTF opens the PeopleSoft application specified in Execution Options and executes the steps in the test.

  3. After the test executes, PTF opens the test log in the Log Viewer.

Note: When PTF executes a test it disables Num Lock and Caps Lock on your keyboard and restores them when the test completes. If the execution terminates abnormally, the test does not complete, or hangs up, and PTF does not restore Num Lock and Caps Lock. Select Test, End or click the End icon in the toolbar to end the test and restore Num Lock and Caps Lock.

Executing a Test Case

To execute a test case:

  1. With a test open in PTF, select a test case from the Test Case drop-down list.

    If you do not select a test case, the system uses the DEFAULT test case.

    Alternatively, you can open a test case from PTF Explorer.

  2. Select Test, Run.

  3. Review the log in the Log Viewer.

Executing a Test from the Command Line

You can also execute a test from the command line.

Syntax

Use this syntax to execute a test using existing environment connection:

PsTestFw -CD=ConnectionName -CP=ConnectionPassword -TST=TestName
-TC=TestCaseName [-PFX=Prefix] -EXO=ExecutionOption [-LOG=LogFileName]

Use this syntax to explicitly specify connection parameters:

PsTestFw  -CS=Server -CNO=NodeName -PS=ProxyServer -PU=ProxyUser -PP=ProxyPassword -CO=UserName  -CP=ConnectionPassword -TST=TestName
-TC=TestCaseName [-PFX=Prefix] -EXO=ExecutionOption [-LOG=LogFileName]

Parameters

–CD=

Specify the name of the environment signon to use for connection. This is the Database Name you would select in the PeopleSoft Test Framework Signon dialog box when signing on to PTF.

The environment signon settings are stored in the environments.xml file in the PTF data directory (C:\Documents and Settings\<User>\Application Data\PeopleSoft\PeopleSoft Test Framework by default). If the environment connection data is not set in the environments.xml file, then you can explicitly specify the connection parameters. See the following table for a description of connection parameters.

See Creating a Connection to a PTF Environment.

–CP=

Specify the user password.

–TST=

Specify the test name.

–TC=

Specify the test case name.

–PFX=

(Optional) Specify the prefix.

See #PREFIX#.

–EXO=

Specify the execution option to be used in the execution.

Note: The name of the execution option must not contain the following characters:

space & ? / \ * < > ' "

–LOG=

(Optional) Specify the name for the log. The default is unattended.log.

If you do not use the -CD= parameter to specify the connection data, use the parameters in the following table:

–CS=

Specify the server:port to connect to. This is the Server:Port value you would enter in the PeopleSoft Test Framework Signon dialog box when signing on to PTF.

–CNO=

Specify the node name.

–CO=

Specify the user name.

–PS=

(Optional) Specify the ProxyServer:Port.

–PU=

(Optional) Specify the proxy user. If you use network authentication, use the DOMAIN\USER format.

–PP=

(Optional) Specify the proxy password.

Example

The following example uses the –CD= parameter to set connection parameters:

PsTestFw -CD=QE851 -CP=VP1 -TST=TEST_CMD_LINE -TC=DEFAULT -PFX=Prefix 
-EXO=QE851_No_Folder -LOG=my_run_log

The following example explicitly sets connection parameters:

PsTestFw -CS=rtdc79637vmc:8643 -CNO=PT_LOCAL -PS=ProxyServer:2345-PU=mydomain\username -PP=pwd123  -CO=VP1 -CP=VP1 -TST=TEST_CMD_LINE 
-TC=DEFAULT -PFX=Prefix -EXO=QE851_No_Folder -LOG=my_run_log	

Log File

The execution will generate an output log file in the PTF data directory (C:\Documents and Settings\<user>\Application Data\PeopleSoft\PeopleSoft Test Framework by default).

If the log file exists it will be overwritten.

This is an example of a log file for a passed execution:

<execution>
  <Started>2010-07-27 16:49:47</Started>
  <Param>
    <Database>QE851</Database>
    <TestName>TEST_CMD_LINE</TestName>
    <TestCase>DEFAULT</TestCase>
    <Prefix>01</Prefix>
    <ExecOpt>QE851-Folder</ExecOpt>
  </Param>
  <Status>Passed</Status>
  <Test>
    <LogFolder>Folder</LogFolder>
    <LogName>48. VP1 2010-07-27 16:49</LogName>
  </Test>
</execution>

This is an example of a log file for a failed execution:

<execution>
  <Started>2010-07-27 16:47:07</Started>
  <Param>
    <Database>QE851</Database>
    <TestName>TEST_CMD_LINE</TestName>
    <TestCase>DEFAULT</TestCase>
    <Prefix>01</Prefix>
    <ExecOpt>QE851-Folder</ExecOpt>
  </Param>
  <Status>Not Completed-FatalError</Status>
  <Test>
    <LogFolder>Folder</LogFolder>
    <LogName>46. VP1 2010-07-27 16:47</LogName>
    <Message>Browser not initialized.</Message>
  </Test>
</execution>