Starting a test from the command line
You can run tests suites or a test harness by using the command-line interface of eclipse. The command line supports a set of options. You can enter -help in the command line to view all the supported options.
Before you begin
- Read and been familiar with the command line arguments
- You must have closed Test Embedded
Procedure
-
Go to the directory that contains the eclipse.exe file.
For example,C:\Program Files\HCL\DevOpsTestEmbedded.
-
Run the following command to start the tests from the command line:
eclipse -nosplash -application com.ibm.rational.testrt.test.campaign.launcher.TestLaunchers -data <workspace> <test_to_launch> [<test_to_launch>] [options]
For example, if you place visual_test_kit/test_elements/harness/harness_simple_call.test_harness for the test to run, it will run the test harness named "harness_simple_call.test_harness" located in folder "/test_elements/harness" of project "visual_test_kit"
Note: On windows, run eclipsec instead of eclipse. eclipsec is available in the installation folder.. -
Run the following command to list the help options:
eclipse -nosplash -application com.ibm.rational.testrt.test.campaign.launcher.TestLaunchers -data <your workspace> -help
The following table lists the supported options with description:
Option Description -help This option displays the help options and then returns you to the command line interface. -version This option displays the product version and then returns you to the command line interface. -forcerefresh This option refreshes the eclipse whenever there is an update to the project that contains the test to be run. -xmlreports This option generates xml reports for the test suites and the test harnesses. -xmlfile="<file path>" This option is used to set a name of the report. If this option is set, then -xmlreports option is not needed. -xmlencoding="<encoding>" This option sets the encoding to use for XML generation. The default character encoding value is UTF-8. If this option is set, the -xmlreports option is not required. -bindir="<folder path>" This option enables you to specify the folder path that is used when running the tests. -tdpdir="<folder path>" This option indicates the relative path of the target deployment port directory. -outputfolder="<folder path>" This option indicates the location where the .xml report files are copied. -buildconfig="<config name>" This option runs the test harness with the specified configuration. When the configuration does not exist, the default configuration is used. This option has no effect on the test suite. -build_project="<project>" This option builds the project in the workspace. When the project name is defined as all, all the projects in the workspace gets build. -tdp="<tdp to use>" This option overwrites the tdp from launch configuration. For example,
tdp=C:\Program Files\HCL\DevOpsTestEmbedded\targets\cvisual2019
Results
You have run the test from the command line and can view the test result.