-
Notifications
You must be signed in to change notification settings - Fork 207
PTMCli
PTMCli is a command-line tool for test automation of the Protocol Test Manager. It supports multiple operating systems including Windows, Linux and macOS.
-
Download and install .NET 6.0 for your platform.
-
Download PTMCli.zip/PTMCli.tar.gz from the Releases page and extract the archive.
cd <the folder that contains the extracted files>
dotnet PTMCli.dll <-p|--profile profilePath>
<-t|--testsuite testSuitePath>
[-s|--selected] [--filter filterExpression]
[--config overriddenProperties]
[-r|--report reportFile] [-f|--format plain,json,xunit]
[--outcome pass,fail,inconclusive]
[-d|--debug]
[--help]
[--version]
Specifies the path of the test profile to run.
To get a valid profile. You need to export one from PTM GUI. See Export Test Profile section.
Specifies the path of the test suite to run.
When specified, only the selected test cases will be executed. Otherwise, all the test cases in the profile will be executed.
Specifies the filter expression of test cases to run. This parameter overrides the test cases in profile.
See Run selected unit tests for how to construct a valid filter expression.
Specifies the configuration items which will override the values in profile.
Each configuration should be in format {property_name}={property_value}, and multiple items should be separated by whitespace.
For example: --config "RDP.ServerPort=3389" "RDP.Security.Protocol=TLS"
Specifies the result file which will be written to. If not specified, test results will be written to stdout.
Specifies the report format.
Valid values are: plain
, json
, xunit
.
Default value is plain
.
Specifies the outcome of the test cases to be included in the report file.
Value should be separated by comma or space.
Valid values are: pass
, fail
, inconclusive
.
Default value is pass,fail,inconclusive
.
When specified, PTMCli debugging is enabled. The log file can be found under the current directory where you run PTMCli.
Display the help info.
Display the version info of PTMCli.
As the below image shown, when using PTM to run test cases, in the last screen, click Export / Import at the right bottom of the test case list, then click Save Profile .... Then you can get a valid PTM profile to use with PtmCli.
If you want to run test suite using a different configuration, you can modify the test profile.
The test profile (.ptm file) itself is actually a zip file. Unzip the .ptm
file, you will get two folders: config
and ptfconfig
.
In config
folder, you can edit playlist.xml
to update playlist and edit profile.xml
to update the selected rules.
And all ptfconfig
file used by test suites are located in ptfconfig
folder, you can change them accordingly.
When you are ready, zip the folder and modify the extension to .ptm
. You can use the new test profile to run test suites using the new configuration.
PTMCli supports multi-instance, meaning that you can run multiple PTMCli at the same time.
For example, open two Console windows on Windows OS, and execute the commands below in each window.
dotnet PTMCli.dll -p C:\test1.ptm -t C:\FileServer-TestSuite-ServerEP
dotnet PTMCli.dll -p C:\test2.ptm -t C:\FileServer-TestSuite-ServerEP
You will get two results under C:\FileServer-TestSuite-ServerEP\HtmlTestResults\
.