Running multiple tests from the command line

When you want to run multiple tests, schedules or compound tests that are in a project folder, you can select and run those tests by using any of the command options such as "*" or testType from the command line.

Before you begin

You must have completed the following tasks:
  • Recorded multiple tests or created multiple compound tests that are contained in your project folder.
  • Read and been familiar with the command-line arguments to use with the cmdline command. See Command-line parameters.

Procedure

  1. Navigate to the directory that contains the cmdline.bat or cmdline.sh file.
  2. Enter one the following commands to run multiple tests:

    cmdline -workspace <workspacename> -project <projectname> -suite "*"

    cmdline -workspace <workspacename> -project <projectname> -testType <testtype_value>

    Where,
    • “*” is the wildcard character enclosed within double quotes that denotes all test assets in the specified project folder.
    • <testtype_value> indicates the test type to be selected for test run. Rational® Performance Tester supports test and compound as <testtype_value>. You can specify the value as test for all individual tests such as Web UI, mobile, HTTP, and Windows tests. For all compound tests, you can specify the value as compound.

    You can also use the exclude option “!” along with the wildcard option “*” to exclude the specified test assets.

    The following table lists the sample commands to run multiple tests.
    Option Sample command Description
    Wildcard character '*' cmdline -workspace “workspace” -project myProject -suite "*" This command runs all the tests and schedules in myProject.
    cmdline -workspace “workspace” -project myProject -suite "test*" This command runs all the tests in myProject that have the file names starting with 'test'.
    cmdline -workspace “workspace” -project myProject -suite "Compound Tests/*" This command runs all the tests in the Compound Tests folder under myProject.
    cmdline -workspace “workspace” -project myProject -suite "Web*.testsuite:/myProject2/Test1*.testsuite" This command runs all the tests in myProject that have the file names starting with 'Web' and all the tests in myProject2 that have the file names starting with 'Test1'.
    cmdline -workspace "workspace" -project "PT1" -schedules "sch1*" This command runs the schedules that have schedules starting with 'sch1'
    Wildcard character '*' with '!" to exclude a specified value cmdline -workspace “workspace” -project myProject -suite "Web*.testsuite:!Web2" This command runs all the tests in myProject that have the file names starting with 'Web', but not 'Web2'.
    testType cmdline -workspace “workspace” -project myProject -testType compound This command runs all the compound tests in myProject.
    cmdline -workspace “workspace” -project myProject -testType test This command runs all the Web UI, HTTP, mobile and Windows tests in myProject.

Results

You have run multiple tests that are contained in your project folder by using the wildcard or testType option from the command line.