Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space WBRIDGE and version 7.2.0
Div
Classe2e-refDiv

Otp
Floatingfalse
maxHLevel1

Rp

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.

...

 
ParameterMandatoryDescriptionExample
-project(tick)Specify the path to the E2E Builder project that contains the regression tests. -project "C:\E2E Documentation\Advanced Modeling\PState"
-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. -suite "QA Tests/PurchaseOrderExample"
-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. -project "C:\E2E Documentation\Advanced Modeling\PState" -list
-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.

Noteinfo
iconfalse

This logfile is not to be confused with the logfile that is created if you have added a logfile option in the Regression Test Tool (see Logging Test Runs).

For more information on the contents of the logfile, see Format of the Test Logfile further below.
-logfile C:\Temp\myLogFile.txt

...

ParameterDescriptionExample
-hostHost name of the Bridge. Used for SOAP, deploy, start and stop tests.-host testbridge.e2e.ch
-portBridge port. Used for deploy, start and stop tests.-port 8080
-usernameBridge user to authenticate for deploy, start and stop tests.-username admin
-passwordPassword of the Bridge user. Used for deploy, start and stop tests.-password secure1234
-nodeBridge node name. Used for deploy, start and stop tests. If it is the same as -host, you can skip this parameter.-node localhost
false
Note
icon
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
SpaceWithExcerptINTERNAL
MultiExcerptNamesetting_request_timeout
PageWithExcerptINTERNAL:_analyzer_excerpts

Multiexcerpt include
SpaceWithExcerptINTERNAL
MultiExcerptNameactions_supporting_timeout
PageWithExcerptINTERNAL:_analyzer_excerpts

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.

...

E2E AnalyzerRegression Test Command Line Tool

Code Block
C:\E2E Documentation\Advanced Modeling>java -jar RegTestRunner.jar -project PState -list
/Build Tests
/QA Tests
/QA Tests/PurchaseOrderExample
/QA Tests/PurchaseOrderExample/createPurchaseOrder
/QA Tests/PurchaseOrderExample/addNewItem
/QA Tests/PurchaseOrderExample/addGratifications
/QA Tests/PurchaseOrderExample/getAllPurchaseOrders
/QA Tests/PurchaseOrderExample/getPurchaseOrder
/QA Tests/PurchaseOrderExample/checkOut
/QA Tests/PurchaseOrderExample/getPurchaseOrdersByDate
/QA Tests/PurchaseOrderExample/closePurchaseOrder
/Dev Tests
/Dev Tests/PurchaseOrderExample
/Dev Tests/PurchaseOrderExample/createPurchaseOrder
/Dev Tests/PurchaseOrderExample/addNewItem
/Dev Tests/PurchaseOrderExample/addGratifications
/Dev Tests/PurchaseOrderExample/getAllPurchaseOrders
/Dev Tests/PurchaseOrderExample/getPurchaseOrder
/Dev Tests/PurchaseOrderExample/checkOut
/Dev Tests/PurchaseOrderExample/getPurchaseOrdersByDate
/Dev Tests/PurchaseOrderExample/closePurchaseOrder

Code Block
C:\E2E Documentation\Advanced Modeling>java -jar RegTestRunner.jar -project PState -suite "Build Tests"
Running Test '<buildRepositoryTest>Build repository of PurchaseOrderExample'.
Finished: 19.094 seconds
<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
   <testsuite name="TestSuites.Build Tests" tests="1">
      <testcase errors="0" name="Build repository of PurchaseOrderExample" time="19.091"/>
   </testsuite>
</testsuites>

Code Block
C:\E2E Documentation\Advanced Modeling>java -jar RegTestRunner.jar -project PState -suite "QA Tests/PurchaseOrderExample"
Running Test '<startservice>Start PurchaseOrderExample'.
Running Test '<TestcaseTest>Create Purchase Order 1'.
Running Test '<TestcaseTest>Create Purchase Order 2'.
Running Test '<TestcaseTest>Add Item 1'.
Running Test '<TestcaseTest>Add Item 2'.
Running Test '<TestcaseTest>Add Gratifications for Wishes Unlimited'.
Running Test '<TestcaseTest>getAllPurchaseOrders'.
Running Test '<TestcaseTest>Get Purchase Order 1'.
Running Test '<TestcaseTest>Get Purchase Order 4'.
Running Test '<TestcaseTest>Check Out Order 1'.
Running Test '<TestcaseTest>Check Out Order 2'.
Running Test '<TestcaseTest>Get Purchase Orders from 1970-11-01'.
Running Test '<TestcaseTest>Close Purchase Order 1'.
Running Test '<TestcaseTest>Close Purchase Order 2'.
Running Test '<stopservice>Stop PurchaseOrderExample'.
Finished: 8.261 seconds
<testsuites>
   <testsuite name="TestSuites.QA Tests.PurchaseOrderExample" tests="15">
      <testcase errors="0" name="Start PurchaseOrderExample" time="1.198"/>
      <testcase errors="0" name="Stop PurchaseOrderExample" time="5.694"/>
   </testsuite>
   <testsuite name="TestSuites.QA Tests.PurchaseOrderExample.createPurchaseOrder" tests="2">
      <testcase errors="0" name="Create Purchase Order 1" time="0.316"/>
      <testcase errors="0" name="Create Purchase Order 2" time="0.116"/>
   </testsuite>
   <testsuite name="TestSuites.QA Tests.PurchaseOrderExample.addNewItem" tests="2">
      <testcase errors="0" name="Add Item 1" time="0.119"/>
      <testcase errors="1" name="Add Item 2" time="0.111">
         <error message="Assertion Failed Error - [Reference = D:\E2E Documentation 18\Advanced Modeling\PState\regressiontest\reference\libraries\PurchaseOrderExample\addNewItem\PurchaseOrderService.PurchaseOrderPort.addNewItem\Add Item 2\request.log]&#xA;&#xA;[different] Expected text value '1' but was '99' - comparing &lt;purchaseOrderID ...&gt;1&lt;/purchaseOrderID&gt; at /env:Envelope[1]/env:Body[1]/ns0:addNewItem[1]/purchaseOrderID[1]/text()[1] to &lt;purchaseOrderID ...&gt;99&lt;/purchaseOrderID&gt; at /env:Envelope[1]/env:Body[1]/ns0:addNewItem[1]/purchaseOrderID[1]/text()[1]&#xA;&#xA;[Reference = D:\E2E Documentation 18\Advanced Modeling\PState\regressiontest\reference\libraries\PurchaseOrderExample\addNewItem\PurchaseOrderService.PurchaseOrderPort.addNewItem\Add Item 2\response.log]&#xA;&#xA;[different] Expected attribute name 'xmlns:ns0' but was 'null' - comparing 
   [...]
</testsuites>

...

Check the certificate on your E2E 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.

...