Trigger automated test runs in your testing framework (technical preview)

This topic explains how to integrate ALM Octane with your testing framework. You can then select automated tests from your testing framework in ALM Octane, and run them in the context of a test suite.

Testing framework integration overview

This integration enables ALM Octane to run tests in your testing framework via your CI server.

This is useful in a number of scenarios. For example, suppose your CI server ran automated nightly tests and the ALM Octane pipeline shows that a specific test failed. After pushing a fix you can run the specific test directly from ALM Octane, rather than running the full pipeline which can be time-consuming.

The ALM Octane-testing framework integration includes the following steps:

  1. Create a job in your CI server. To set up the integration, create a job on your CI server to run tests on your testing framework.

  2. Create a test runner in ALM Octane. Within ALM Octane settings, create a test runner entity that corresponds to this job on your CI server.

  3. Run tests. In ALM Octane, create a test suite that includes tests that you want to run in your testing framework, and run the suite. ALM Octane triggers the test runs via the job in the CI server.

  4. Analyze release and product quality. Track the test results as part of the overall data in the backlog, quality, and dashboard modules.

Back to top

Prerequisites

  • You must have a CI server connected to ALM Octane. For details, see Set up CI servers.

  • Within ALM Octane, create a pipeline to inject tests from your testing framework via your CI server. For details, see Create and configure pipelines.

  • Out-of-the-box, the integration supports JUnit and TestNG tests via Jenkins or Bamboo. If you want to use a different test framework or CI server, you need to create a function that converts the testsToRun parameter sent by ALM Octane to a format recognized by your test framework.

Back to top

Create a job on your CI server to run tests in your testing framework

On your CI server, create a job that can run tests on JUnit or TestNG. You can access a test runner template here: https://github.com/MicroFocus/test-runner-templates.

Note: This section describes how to set up the integration with JUnit or TestNG using Jenkins. If you want to use a different test engine or CI server, create a job that can convert the testsToRun parameter as described below.

The job must include the following:

  • testsToRun parameter. This parameter receives a lists of tests from ALM Octane that the job will then run. The parameter uses the following syntax: v1:package name|class name|test name;package name|class name|test name.

    Note that v1 refers to the current version of the testsToRun format, which may change in the future.

  • Repository URL and credentials. This is not mandatory, but you will usually need the repository URL and credentials so that your job can get the latest version of the tests to the CI local file system.

  • Micro Focus ALM Octane testing framework converter build step/task, that converts the testToRun raw data to your relevant framework format. To help you do this, you can use the Micro Focus ALM Octane testing framework converter in the Jenkins plugin version 5.5.2 or later, or in the Bamboo plugin version 1.6 or later. Alternatively, you can write your own conversion function.

    Note that the test converter step must be run before the test execution step.

  • Publish JUnit test result report post-build action.

Back to top

Create a test runner in ALM Octane

  1. In ALM Octane, click Settings , select Spaces and select a workspace.

  2. Select the DevOps > Test Runners tab.

  3. Click + Test Runner.

  4. Define a name for the test runner, for example JUnit Runner.

  5. Select your testing framework, for example JUnit.

  6. Select your CI server.

  7. Select the job that you created in the CI server to run the tests in your testing framework. The list displays the jobs that have the testsToRun parameter.

  8. Click Save.

ALM Octane creates a test runner to trigger the job that runs your tests.

    Note:
  • You can only pair one test runner per job.

  • You can create multiple test runners. However, you can only create one UFT test runner per workspace.

Run tests from ALM Octane

Assign test runners to tests in the Quality module. You can then add the tests to test suites, and run them from ALM Octane.

ALM Octane triggers test runs via the job in the CI server that is specified in the test runner. After planning a suite you can also modify test runs and select a different test runner for a test.

A suite can include automated tests using multiple test runners. When a suite includes both manual tests and automated tests, the automated tests run in the background while you perform the manual tests.

When you run a test, its status in ALM Octane is Planned until the test runner starts to run the tests in the CI server. The test's status changes to In Progress, until the test results are returned to ALM Octane.

Back to top

Next steps: