Jenkins Plugin

 

Usage:

The build runner will appear as "Apica Loadtest" in the list of build runners in Jenkins.

You will need to know the following values in order to insert an Apica Loadtest build runner:

Prerequisites

Comment/Screenshot

Prerequisites

Comment/Screenshot

The ALT API endpoint that the plugin will communicate with during the load test. You can find this information under the 'API' menu of the Apica Loadtest Portal

Example: https://api-ltp.apicasystem.com/v1

The ALT web base URL

https://loadtest.apicasystem.com

Your LTP authentication token: you can find this under Setup -> User Settings within the Loadtest Portal. Locate and copy the value of "LTP API Auth Ticket"

The preset name includes the load test parameters such as duration, user count, etc. You can save your presets under New Test in LTP. Copy the name of the preset as it is, e.g. "my Apica plugin preset"

The load test file name: the name of the load test file that you would like to execute, e.g. "mytest.class" or "test_package.zip"

You'll see various exception messages in case the values cannot be validated. If that happens then review the values and retest.

Installation

  • Deploy package: ApicaLoadtest.hpi

  • Current version: 1.4

  • Tested with Jenkins 2.164.2

Download Sites

Instructions/Comments

Screenshot

Instructions/Comments

Screenshot

For installation through the UI you'll first need to go to the Jenkins plugin manager page:

 

The attached HPI file can be uploaded under the Advanced tab.

Upload the .hpi package on the Advanced tab: 

Jenkins must be restarted after the package upload

Build Runner setup

Instructions/Comments

Screenshot

Instructions/Comments

Screenshot

The plugin is a build runner and can be added to a project on the project's configuration page

The Apica load test plugin is a Build Step and can be selected from the Build plugins list

 

You'll then see the build runner options

You can use the buttons next to the API and Web base URL text fields to fill in the default product SaaS endpoints. Otherwise, you can provide your on-premise environment endpoints.

 

Set your ALT environment endpoints, the ALT API authentication token, the preset name, and the load test scenario file name. You can use the Test settings button to test your inputs.
If all properties are correct, when you do a Test Settings you'll see an “All set” confirmation:

Here are some example error messages in case some property is not correct:

  • Exception while checking preset: The authentication ticket is not well-formatted.

  • No such preset found: short test2

  • The preset is not linked to a valid test instance. Please check in ALT if you have selected an existing test instance for the preset.

  • The load test file name must be either a .class or .zip file.

  • No such load test file found: cldemo_start2.class

  • Invalid ALT API base URL: unknown protocol: 'dgdfg'

  • Invalid ALT Web base URL: no protocol: /loadtesapicasystemcom

Note that Jenkins won't block the user from saving a build runner despite validation errors. The settings are additionally rechecked before a test starts.

Thresholds

Optionally you can enter thresholds to mark a test as failed. E.g. if the average response time was below 5000ms then you can mark the test as failed. If you don't set any thresholds then the test will be marked as failed in case of an exception otherwise it will pass.

Instructions/Comments

Screenshot

Instructions/Comments

Screenshot

Set/Add/Remove appropriate thresholds to the test.

When the active threshold(s) is crossed, the test can be marked as "failed"

Two thresholds are provided:

  • Average response time per page (in seconds)

  • Failed Loops Rate (Percentage)

Thresholds can be

  • Greater Than

  • Less Than

  • Save your setup:

 

Running the Apica Build Runner/Execution:

You'll be able to follow the job progress in the usual Jenkins build messages.

Instructions/Comments

Screenshot

Instructions/Comments

Screenshot

You can start the build runner like you would start any other runner in Jenkins. The simplest way is to start a build on the UI:

 

 

You can monitor the build progress by clicking on the build number and opening the Console output link:

You can check the detailed build log for messages. They are similar to what people see in the live stats window of ALT:

 

The runner checks the job status every 10 seconds.

At the end of the job the log shows some basic statistics and the thresholds are evaluated:

Result Presentation/Statistics:

You can view a set of job statistics under the Apica Load Test Summary tab in a tabular format. You can also view a trend chart under the Apica Load Test Trends tab which shows a Continuous Integration page from the Loadtest Portal

Instructions/Comments

Screenshot

Instructions/Comments

Screenshot

Refresh the build page after a successful job if it doesn't refresh itself automatically. You'll see two links on the left-hand panel:

Apica load test summary presents the key statistics in tabular format:x

Following the Link to Details “Click here to view the results in ALT” will open up the Result Details view in your ALT Portal.

The Apica load test trends tab shows a custom CI page in an iframe:

 

Cannot find what you're looking for? Send an E-mail to support@apica.io.