The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

Mock Load Builder Plugin

step([$class: 'MockLoadBuilder']): Mock Load

Generates load on the Jenkins build node and over the remoting channel. There will be a random number of build artifacts created matching the file name pattern mock-artifact-*.txt. There will be a JUnit test report with the file name mock-junit.xml. Approximately 5% of the time, the build will "fail" its tests and thus no artifacts will be generated.
  • averageDuration : long
    The average duration that the build should take. The actual duration of each step will be randomly selected where with an expected standard deviation equal to the square root of the expected average duration.

withMockLoad: Mock load with separate sh command

Generates load on the Jenkins build node and over the remoting channel. There will be a random number of build artifacts created matching the file name pattern mock-artifact-*.txt. There will be a JUnit test report with the file name mock-junit.xml. Approximately 5% of the time, the build will "fail" its tests and thus no artifacts will be generated unless testFailureIgnore was specified.

Unlike the mockLoad step, this step does not itself run the load command. Instead, it copies the program into the workspace and prepares a command for you to run yourself. Usage:

withMockLoad(averageDuration: 300, testFailureIgnore: true) {
  sh MOCK_LOAD_COMMAND
}
junit 'mock-junit.xml'
archiveArtifacts artifacts: 'mock-artifact-*.txt', fingerprint: true
  • averageDuration : long (optional)
    The average duration that the build should take. The actual duration of each step will be randomly selected where with an expected standard deviation equal to the square root of the expected average duration.
  • testFailureIgnore : boolean (optional)
    If selected, failing tests will not cause the command itself to return a nonzero exit status. Normally used in conjunction with the junit step to mark the build as unstable. Similar to the Maven option.

Was this page helpful?

Please submit your feedback about this page through this quick form.

Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

    


See existing feedback here.