Command Line


WAPT Pro allows performing a number of its operations using the command line. In this way, you can perform WAPT Pro commands just from the console, without opening the program window. It is convenient for automated management of testing process.

If you use some tool that automatically manages your test runs (for example, Jenkins), you can create various test scenarios in WAPT Pro and then run those scenarios from the console. For example, you can run several tests in a batch (run a .bat file) so that the tests will be executed one by one. Or you can run tests automatically each time after the compilation and deployment of a new version of web application.

The following keys will allow you to run WAPT Pro test scenarios, create HTML reports and save test run results and logs from the command line.

-help: Opens WAPT Pro help topics.

-run "C:\Testing\Test 1\testscenario.wpsx": Runs the scenario "testscenario.wpsx" located in the specified folder.

-close: Closes all running instances of WAPT Pro. This command is used to close all instances of the program running in non-GUI mode.

The "run" command has additional options:
-run "C:\Testing\Test 1\testscenario.wpsx" [-noexit] [-hr "file/folder path"] [-sr "file/folder path"] [-csv "file/folder path"] [-timing "file/folder path"] [-log "folder path"] [-logfull "folder path"] [-noui]

You should specify an absolute folder path for the scenario file. All other paths (for HTML reports, results and logs) can be relative; corresponding subfolders will be created in the directory where scenario file is located.

If a folder path contains spaces, you should enclose it in quotes.

Note that the command line options have the highest priority. For example, if you turn on the option for saving HTML reports in WAPT Pro interface (in the Report Options), and also specify "-hr" key for the "run" command in the command line, then the generated HTML report will be saved to a location entered in the command line. This is also true for other keys: -sr, -csv, -timing, -log and -logfull.

-noexit: WAPT Pro will not exit after test completion.

-hr "file/folder path": Saves the results of test run as HTML report in a specified folder. If you do not enter any folder, then the generated report will be saved to the directory where scenario file is located.

-sr "file/folder path": Saves the results of test run as WAPT Pro result file in a specified folder. If you do not enter any folder, then the result file will be saved to the directory where scenario file is located. WAPT Pro result files have an extension .wprx.

-csv "file/folder path": Saves the results of test run in the CSV format in a specified folder. If you do not enter any folder, then CSV files will be saved to the directory where scenario file is located.

-timing "file/folder path": Saves the complete time statistics including the timings for each separate request and response to the CSV file. WAPT Pro also saves special CSV-files with the values of performance counters (in case you specified some web server or database server for monitoring in the Performance Counters view). These files are saved to a specified folder. If you do not enter any folder, then CSV files will be saved to the directory where scenario file is located.

-log "folder path": Generates a full log for the first user of each profile and saves it in a specified folder. If you do not enter any folder, then log files will be saved to the directory where scenario file is located.

-logfull "folder path": Generates full logs for all virtual users and saves them in a specified folder. If you do not enter any folder, then log files will be saved to the directory where scenario file is located.

-noui: Launches WAPT Pro in non-GUI mode.

The command E-mail HTML report to from the Report Options works when you run a test from the command line as well. So if you turn on this checkbox, then HTML reports will be e-mailed on test completion.

Besides, you can specify the name of some scenario in the command line (e.g. "C:\Testing\Test 1\testscenario.wpsx") and press Enter. WAPT Pro will open that scenario in the program window.

Next page