Run a schedule from the command line

 

+

Search Tips   |   Advanced Search

 

Overview

You can run a schedule or test from the command line outside of the Eclipse workspace and automatically export the results.

Verify that a supported Java executable file (java.exe) is in path before you attempt to run a schedule or test from the command line. A supported Java executable file is provided with RPTv8. The executable file is located at...

  1. To run a schedule or test from the command line, go to the directory containing the cmdline.bat and cmdline.sh files. This is typically...

      C:\Program Files\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.cmdlineexecuteversion_date

  2. Issue the following command:

    cmdline -workspace workspace_full_path 
            -project proj_rel_path 
            -schedule sched_rel_path 
            -eclipsehome eclipse_full_path 
            -plugins plugin_full_path 
            -configfile file_full_path 
            -results result_file 
            -overwrite {true | false} 
            -quiet 
            -users nn 
            -vmargs JVM_args
    

    If a value contains spaces, enclose the value in quotation marks.

    To see the online help for this command, while you are in the directory containing the .bat file, type cmdline -help.

    Option Description
    -workspace Required. The complete path to the Eclipse workspace.
    -project Required. The path including the file name of the project relative to the workspace.
    -eclipsehome Required. The complete path to the directory containing eclipse.exe.
    -plugins Required. The complete path to the folder containing the plug-ins. Typically, this folder location is...

      C:\Program Files\IBM\IBMIMShared\plugins
    -schedule Optional, but specify either -schedule or -suite. The path including the file name of the schedule to run relative to the project.
    -suite Optional, but specify either -suite or -schedule. The path including the file name of the test to run relative to the project.
    -configfile Optional. The complete path to a file containing the parameters for a schedule or test run. Each parameter must be on a single line, so use an editor that does not cause the line to wrap. Any parameters, whether required or optional, can be set in the configuration file. Command line parameters override the values in this file. Do not use quotation marks in this file, even for values containing spaces.
    -results Optional. The name of the results file. The default result file is the schedule or test name with a time stamp appended.
    -overwrite Optional. Determines whether a results file with the same name is overwritten. The default value, true, means that the results file is overwritten.
    -quiet Optional. Turns off any message output from the launcher and simply returns to the command shell when the run, or the attempt, is complete.
    -users Optional. Overrides the default number of virtual users in the run. For a schedule, the default is the number of users specified in the schedule editor. For a test, the default is one user. This option creates a new copy of the schedule which contains the specified number of users.
    -vmargs Optional. Java Virtual Machine arguments to pass in.

    For example, -vmargs "-debug -Xmx512m". The values are in quotation marks because they contain spaces.

  3. Messages are displayed to indicate when the test or schedule is launched and when it is completed, unless you include the -quiet option.

  4. Issuing the command locks the workspace.

    To check the progress of the schedule or test during the run, invoke another workspace and open the project through that workspace.

  5. When you return to the command prompt, the run is finished. Optionally, start Performance Tester to review the results.

    To automatically export results after a run completes from the command line, click...

      Windows | Preferences | Test | Performance Test Reports | Export Reports


Example

The configuration file must contain information in option=value pairs. Although paths containing spaces must be enclosed in quotation marks on the command line, do not enclose spaces in quotation marks in the configuration file. A sample configuration file looks as follows:

workspace=D:\My Workspace 
eclipsehome=C:\Program Files\IBM\SDP 
plugins=C:\Program Files\IBM\IBMIMShared\plugins
project=myProject
schedule=mySchedule.testsuite


What to do next

After you run the schedule, you may want to export the results.


Related tasks

  • Exporting report counters automatically