To start using a LoadView Load Test Scenario to test your build in Jenkins, you must have an active Dotcom-Monitor account and a configured Test Scenario.
Adding Integration Unique Identifier
To set up an integration with Jenkins, you need to provide a Unique Identifier to use as a LoadView Security Token:
1. Log into the Dotcom-Monitor LoadView account.
2. In LoadView, create an integration UID under Manage > Integrations > New Integration. Copy the integration UID to use in Jenkins.
Test Scenario ID in LoadView
Each test in LoadView has a unique ID. Using the test ID you can call a specific scenario while configuring LoadView integration (e.g., for Jenkins or CircleCl builds).
The Test ID can be found on the test page.
Configuring LoadView Plugin in Jenkins
To configure the LoadView plugin:
1. Log into your Jenkins account.
2. In Jenkins, go to Credentials > Add Credentials > LoadView Security Token (UID). Configure and validate the credentials:
- Kind: LoadView Security Token (UID).
- Scope: select Global.
- ID: leave the default or specify a unique ID.
- Description: specify a unique description to distinguish the credentials.
- UID: paste the Load Testing Web API UID from your LoadView account. Once the UID has been added, click Validate UID to make sure Jenkins can access the LoadView API.
3. Next, select a job and click Configure.
4. Go to Build > Post-build Actions > Add post-build action > LoadView-Run load test scenario. Specify LoadView Stress Test settings for the build:
- Credentials: select the API key using the description.
- Scenario ID: paste the test scenario ID you want to use in the build. Copy the ID from the scenario page in LoadView.
- Error Threshold: specify an acceptable percentage of sessions with errors that occurred while testing (failed to access the target resource, no keywords/image found, etc.). If the percentage of error sessions is greater than the specified value, the build will be marked as a failure in Jenkins.
- Average Time: specify a limit for an average response time measured during test execution. If the limit is reached, the build will be marked as a failure in Jenkins.
5. Click Save.
View Test Results
When a stress test is running, the status is displayed in the Jenkins Console Output in real-time mode.
Once the test has finished, the summarized results can be found under LoadView Results in the Jenkins build menu. To review more comprehensive LoadView reports regarding the test execution details, select More Details.