Add automated tests
You can add automated tests that are run by other testing tools.
Overview
Automated tests are usually run by CI or automation servers, such as Jenkins or TeamCity, or by ALM.
If you use UFT One for automated tests, executable automated test entities can be created based directly on UFT One tests. For details, see Add tests from an SCM repository.
The other way to add automated tests is based on test run results. For details, see Create automated tests.
To receive the test results, do one of the following, as described in the sections below:
- Work with pipelines. For details, see Pipelines.
- Use the Test Result Collection Tools (see also Receive automated test run results).
- Use the OpenText Core Software Delivery Platform REST API (see also Add automated test results).
Create automated tests
Automated tests are created automatically when test runs arrive from an integrated testing system. A new automated test is created for each unique combination of test run attributes.
A separate test is created for each unique combination of the following fields: Name, Package, Class, Component
Each automated test lists its runs, including their attributes and results. Details of a single automated test run are stored for each unique combination of the following attributes: Release, Milestone, Program, Environment tags, Pipeline, External run id. Each test suite run is also listed separately even if the rest of the run configuration is identical to other runs.
Each run accumulates its own history of Previous Runs. Previous run information is also available in dashboard trend widgets, and in a pipeline run's Tests tab.
Tip: When working with pipelines, you configure a test's environment by configuring the pipeline step that runs it. For details, see Create and configure pipelines.
Add tests from an SCM repository
If you use UFT One for automated tests, you can store your tests in Git or SVN and set up the integration. This lets you see your UFT One tests reflected in OpenText Core SDP as soon as you save them, regardless of test runs. For details, see Set up UFT One integration.
Executable automated test entities based on the UFT One tests are created in the SCM repository. You can then run these tests as part of a test suite. For details, see Run automated tests.
Add automated tests from runs in a pipeline
To add automated tests from test runs in an OpenText Core SDP pipeline, perform the following steps:
-
Run the pipeline that contains the tests.
The test run results are sent to OpenText Core SDP which creates or updates the automated test entities associated with these results.
To enable the Application Automation Tools plugin to send the results, make sure that the jobs running the tests publish them to the CI server. For example:
- For LoadRunner Cloud tests run by Jenkins, create a Publish JUnit test result report post build step.
- For tests run by GoCD, declare the result xml-report-files as artifacts of your build.
Add automated tests from external test runs
If you run automated tests on ALM, or on a CI server not integrated with OpenText Core SDP, you can use the following to send your automated test run results:
-
OpenText Core SDP API
-
ALM test injection, as described in Inject test runs from ALM/QC.
The automated test entities associated with these results are created or updated.
For details, see Push test results stored externally.
Assign tests to application modules and backlog items
Assigning automated tests to application modules and backlog items lets you view the test results in context. You can then use these results to analyze the progress and quality of your release and product.
Assigning owners to automated tests helps accelerate problem resolution. You can configure a pipeline to notify test owners when their test runs fail.
For details on defining application modules or creating your product backlog, see Assign items to application modules and Build the backlog.
To manually assign tests:
-
In the Tests tab of Quality or items of a Backlog module, click a test's link to open it.
-
In the Backlog coverage box, select the relevant backlog items.
-
In the Application modules box, select the relevant application modules.
-
In Owner, select the relevant user.
To manually assign multiple tests:
-
In the Tests tab, select the relevant tests.
-
Do one of the following:
-
Click the Assign to Application Module button and select the relevant application modules.
-
Right-click and select Bulk Update. Click Select field, select Application modules or Owner, and apply the relevant values.
-
To create assignment rules for automated tests:
-
In Settings > Test Assignment Rules, set up rules to assign automated tests that match a filter you specify to specific application modules.
-
When you save a rule, all current and future automated tests that match the filter are assigned to the selected application modules and test owner. This includes tests currently in the system, as well as new automated tests discovered in the future.
For details, see Test assignment rules.
Tip: Use the same rules to assign owners to automated tests, which can help accelerate problem resolution.
You can add assignment rules to tests when you assign tests to application modules.
To create test assignment rules from the Tests tab:
-
In the Tests tab in the Quality or Backlog modules, select the tests for which you want to assign rules.
-
Click the Assign to Application Module button .
-
(Optional) Select one or more application modules.
-
Click Assignment Rule.
-
In the Create or Edit Assignment Rule dialog box, add a new rule, or locate an existing one that you can adjust or copy.
To create a new rule based on the one you selected, change the Rule name.
To update the selected rule, leave the Rule name unchanged.
-
(Optional) Add a Test owner to assign, or one or more test fields: Test framework, Test type, Test level, and Testing tool.
-
If you selected many tests without opening an existing rule, an initial filter is created which is based on the properties of the selected tests.
Click Add filter to add conditions to the filter, or edit the existing conditions. Use these fields to create the conditions: Class name, Component, Name, and Package.
Filters can be multipart and complex and can include '
*
' as a wildcard. If necessary, click the Add filter button again to add more items to the filter.You must meet all conditions for the rule to assign the selected values to an automated test.
-
Select if the rule assigns application modules and a test owner if those fields already have values, or only if they are empty.
-
As you edit the rule, view how many currently existing tests you will change with the new rule.
-
Click Create Rule. The rule affects all current and future tests that match the filter. This includes tests currently in the system, as well as new automated tests added in the future.
To manage test assignment rules:
-
In the Tests tab select one or more tests, and click the Assign to Application Module button .
-
Select one or more application modules and click Assignment Rule.
-
In the Create or Edit Assignment Rule dialog box, click the Manage Rules link.
-
To edit a rule, click the rule ID link and modify its definitions as described above.
To sort, filter, group, delete, and export rules, use the toolbar options similar to other entities in grids.
Tip: You can also edit rules in Settings > Test Assignment Rules. For details, see Test assignment rules.
Next steps: