Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Div | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
|
You can run regression test from command line. This is needed, if you want to e.g. integrate the regression tests into a continuous integration server such as Jenkins.
Call the Regression Test Command Line Tool like:
Code Block |
---|
java -jar RegTestRunner.jar -project <path to the |
...
Builder project folder> [-suite <name of the test suite to be executed>] [-logfile <filename including path>] [<target Bridge>] |
e.g. java -jar RegTestRunner.jar -project "C:\E2E Documentation\Advanced Modeling\PState" -suite "Build" -logfile C:\Temp\testlog.xml.
Multiexcerpt include | ||||
---|---|---|---|---|
|
Parameters
Regression Test Parameters
To select the tests to perform, you can specify the following parameters:
Parameter | Mandatory | Description | Example |
---|---|---|---|
-project | Specify the path to the |
...
Builder project that contains the regression tests. | |
-suite |
...
Specify the test suite you want to run. The test suite must exist within the project given with -project . If you specify no test suite, all tests of the project will be executed. | | ||
-file |
...
Deprecated since Analyzer 6.0.27Specify the path to a testsuite.xml that contains the tests you want to perform. For more information on where to find such a file, refer to Regression Test File and Folder Structure. | -file "C:\E2E Documentation\Advanced Modeling\PState\regressiontest\QA Tests\testsuite.xml" | ||
-list |
...
Lists all available test suites in the project specified by -project . No tests executed. | | ||
-logfile |
...
Optionally specify a filename (including extension of your choice) and a path. The RegTestRunner will generate a file with the given name to the given path. If you specify a filename only, the logfile will be generated to the location of the test suite. |
...
|
...
| -logfile C:\Temp\myLogFile.txt |
Target Bridge Parameters
Optionally specify a target Bridge to run the tests against. Specify all or none of the following parameters:
Parameter | Description | Example |
---|---|---|
-host | Host name of the Bridge. Used for SOAP, deploy, start and stop tests. | -host testbridge.e2e.ch |
-port | Bridge port. Used for deploy, start and stop tests. | -port 8080 |
-username | Bridge user to authenticate for deploy, start and stop tests. | -username admin |
-password | Password of the Bridge user. Used for deploy, start and stop tests. | -password secure1234 |
-node | Bridge node name. Used for deploy, start and stop tests. If it is the same as -host, you can skip this parameter. | -node localhost |
...
Info |
---|
Note, that the target Bridge parameter values will only be applied to the tests, if the tests do not have these values specified directly in the test themselves. Tests that have e.g. specified a dedicated host in the test case properties will not get overwritten by the target Bridge parameter values. |
To make your tests compliant to using the target Bridge parameters, you have to specify the related data (host, port, user credentials and node) via test case options. How to do that is explained in detail on Adding Options to a Test Suite pp.
Setting a Request Timeout
Analyzer 7.2.0 Regression test actions that do a network request have a timeout. You can change the timeout defaults via Java system properties:
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
Multiexcerpt include | ||||||
---|---|---|---|---|---|---|
|
Set the changed timeouts via the Regression Test Command Line Tool call like
Code Block |
---|
java -Dsun.net.client.defaultReadTimeout=5000 -jar RegTestRunner.jar ... |
The command above starts tests with a timeout of 5000 ms for waiting for a response of network requests.
To set the same timeouts for the Analyzer refer to Setting a Request Timeout for the Analyzer.
Examples
To try out the Regression Test Command Line Tool, you can use the PState Builder project that is delivered with the E2E Examples.
Multiexcerpt include | ||||
---|---|---|---|---|
|
...
Analyzer | Regression Test Command Line Tool | ||
---|---|---|---|
Image Modified |
| ||
Image Modified |
|
...
| |||
Image Modified |
|
Format of the Test Logfile
The logfile generated by the -logfile
parameter is formatted in a junit compatible xml format that is used by Jenkins and others:
Code Block | ||
---|---|---|
| ||
<testsuites>
<testsuite name="TestSuites" tests="10"/>
<testsuite name="TestSuites.Dev Tests" tests="10"/>
<testsuite name="TestSuites.Dev Tests.PurchaseOrderExample" tests="10">
<testcase errors="0" name="Create Purchase Order 1" time="0.854"/>
<testcase errors="1" name="Create Purchase Order 2" time="0.01">
<error message="Assertion Failed Error - [...]"/>
</testcase>
[...]
</testsuite>
</testsuites> |
The XML structure of the logfile reflects the test case structure in the Regression Test Tool and gives some additional information on the test execution:
XML Element | XML Attribute | Description |
---|---|---|
testsuites | - | Root element. |
testsuite | name | Name of the test suite including test suite path in a test suite hierarchy. |
tests | Number of tests in the test suite. | |
testcase | name | Name of the test case. |
errors | Number of errors during test execution. | |
time | Elapsed test time in seconds. | |
error | message | Text of the test error message. |
Troubleshooting: Bridge Certificate Exception
Problem
Running tests with the Regression Test Command Line Tool, Bridge calls fail and you are getting this error: javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints
.
Solution
Check the certificate on your
...
Bridge (see Managing the Bridge Certificate). MD5 certificates are deprecated as insecure. If your Bridge still uses MD algorithm (MD5withRSA), you should create a new certificate and restart the Bridge. The new certificate should have algorithm SHA256withRSA.
Workaround:
If you can not fix the Bridge as described above (for whatever reason), you can change file <jre>/lib/security/java.security
of the JRE you use to run the Regression Test Command Line Tool. Remove the "MD5" parts in jdk.certpath.disabledAlgorithms and jdk.tls.disabledAlgorithms to enable the usage of MD5 certificates.
Panel | ||
---|---|---|
| ||
|
Panel | ||
---|---|---|
| ||