After having changed the xUML service model, you need to build and deploy the service to test it. By adding Build and Deploy tests to your regression tests you can also automate this.

Adding a Build Test

Build tests are performed locally and are independent from a specific Bridge. Therefore, you do not need to add the build test to a library (PurchaseOrderExample in this case), but in a separate test suite.

Remember that it is not possible to add tests directly to the root test suite. You need to add a new test suite to contain the build tests.

Right-click the root test suite and select Create Test Suite from the context menu.
Enter the name of the test suite, e.g. Build and click OK.
Select Build Bridge Repository from the list of available tests.

Enter the path to the xUML model source file to compile or browse for it. Select a deployment, if there are multiple deployments in your model.

Click OK to continue.

The test properties are displayed. Click OK to save the test.

Run the test. If there are no compile errors, the test is green. If there are compile errors, the test is red and a list of errors is displayed. In this case, you need to check the source with the Builder and rectify it before running the test again.

Adding a Deploy Test

Before each test run (Dev Tests and QA Tests in this case), you need to deploy the latest build of the service to the corresponding Bridges. Therefore, add a deploy test to test library PurchaseOrderExample.

Go to the root element of the library and select Create Test from the context menu.
Select Deploy Bridge Repository from the list of available test actions.

Enter the path to the repository to be deployed or browse for it. Make sure that you select the path of the repository you build with your build test. It should read something like ...\PState\regressiontest\.$output\Build\pstatePurchaseOrder.xml\PurchaseOrderExample.rep.

Click OK.

The test properties are displayed.

Make sure that HostPort, User and Password are empty. These values will come from the options of the test suite the library is used in.

Click OK.

The deploy test has been added to the library and to all test suites using the library.

Now you need to add deployment options to each test suite to specify the Bridge the service will be deployed to.

Go to Dev Tests > Options and select Add options from the context menu. Select Deploy Bridge Repository from the list of available options.

Enter the test preferences you want to override:

  • host
  • port
  • credentials

Take a look at the deploy options. Select

  • Override existing, because you are updating an existing deployment
  • Keep changed settings, so the settings that have been adapted on the E2E Bridge will not be reset
  • Do not start service, because service start-up is already defined in a separate test action

Click OK to continue.

The provided options will be used in the selected tests.

Click OK to apply the options.

  • No labels