Integrate with CI/CD systems
LoadRunner Developer 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 use LoadRunner Developer to 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. LoadRunner Developer supports 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.
Determining SLA results
You can use LoadRunner Developer to 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 of how to use DevWeb to monitor your SLA.
- Define SLA rules for your performance script.
- Add a step in your CI job.
- Execute the performance script using DevWeb. At the end of the step, DevWeb generates a report, for example a JUnit report.
- Add a second step in your CI job to archive the results as unit tests.
- (Optional) Fail or Pass your CI job based on the SLA results.
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' } }
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
See also: