Integrate with CI/CD systems

Tests can be integrated with your Jenkins, Azure Pipelines, or other continuous integration (CI/CD) tools, to provide reports and SLA analysis on the test run results.

Integrating with CI systems

You can run automated test executions after the software build or deployment, and include tests in your automated regression testing.

You can also trigger build failures based on SLA rule definitions. You can use JUnit reporting, enabling easy access to test run reports in your CI tool. Using the JUnit report, you can view a real-time indication of success or failure. The CI can also be directed to archive the JUnit test reports for reference.

Tip: Check out the video on Support in Microsoft Azure.

Back to top

Determining SLA results

You can run automated tests through your CI/CD tool to trigger build failures based on SLA rule definitions.

As each CI tool may have different steps, the following provides a general overview.

How to monitor your SLA:

  1. Define SLA rules for your performance script. For details, see SLA rules.
  2. Add a step in your CI job.
  3. Execute the performance script using OpenText Performance Engineering for Developers. At the end of the step, a report is generated, for example a JUnit report.
  4. Add a second step in your CI job to archive the results as unit tests.
  5. (Optional) Fail or Pass your CI job based on the SLA results.

Back to top

Jenkins example

The following example illustrates running a DevWeb script with Jenkinsfile pipeline. SLA noncompliance is marked as a failure.

// Jenkinsfile - scripted pipeline

node(“executingAgent”) {
	  
	  // Checkout our new repository
	  checkout scm
	
	  // Execute DevWeb in the current directory
	  bat "\"%DEVWEB_PATH%\\DevWeb.exe\" ."
	
	  // Archive the results of the SLA
	  junit '*.xml'
	
	  // If the JUnit sets the execution to unstable set it to failure
	  if (currentBuild.result == 'UNSTABLE') {
	    currentBuild.result = 'FAILURE'
	  }
	}

Back to top

Azure Pipelines example

The following example illustrates running a DevWeb script with Azure Pipelines. SLA noncompliance is marked as a failure.

pool: default
steps:
#   Checkout our new repository
-   checkout: self
#   Execute DevWeb in the current directory
-   script: "\"%DEVWEB_PATH%\\DevWeb.exe\" ."
#   Archive the results of the SLA
- task: PublishTestResults@2
  inputs:
    testResultsFormat: 'JUnit'
    testResultsFiles: '*.xml'
    failTaskOnFailedTests: true

Back to top

See also: