Skip to content
  • ZipCode Api
  • Blog
  • About RedLine13
RedLine13
RedLine13
Primary Navigation Menu
Menu
  • Start Testing
  • Demo
  • Pricing
  • JMeter
  • Partners
  • Docs
    • Documentation Home
    • AWS Set Up for load testing
    • AWS Approval for Large Tests
    • PHP, NodeJS, Python Load Tests
    • Scalability
    • Jenkins Plugin Setup
    • Premium Features
    • Knowledge Base

RedLine13 Jenkins Plugin 2.0 with Pipeline

By: RedLine13

We have released version 2.0(beta) of our Jenkins RedLine13 plugin including support for Jenkins Pipelines.  The following is available in Pipeline or FreeStyle project form.

  • redlineJMeter – Launch JMeter tests
  • redlineGatling – Launch Gatling tests
  • redlineCustom – Launch Custom tests in PHP, NodeJS, and Python
  • redlineScenario – Launches tests marked Jenkins Templates on RedLine13.

All types include support for Thresholds marking a build as unstable or failed based on criteria,

  • Success Ratio – Percentage of tests/virtual users passed
  • Response Time – Average overall response time

Generating Pipeline code can be achieved

  • Directly in Jenkins Snippet Generator
  • From RedLine13.com load tests

RedLine13 pipeline tasks can be built inline or in a Jenkinsfile stored with your code.

  • Examples are available on github.com.

Generating Pipeline Snippets

Pipeline snippets can be generated on the completion page of a load test.  Each load test now has a ‘Pipeline’ button on test completion page.
loadtesting-pipeline-generator

Clicking pipeline will open a modal with the snippet you can copy and paste.

loadtesting-pipeline-snippet

 

Pipeline Snippets are also available in the Pipeline Syntax Snippet Generator in Jenkins.  Open the syntax editor, and you can create Snippets directly or via build step.

  • As a built-in step

jenkins-snippet-generator

  • Through, a build-step

jenkins-snippet-generator-build-step

  • Then scroll down and Generate the pipeline code.

jenkins-snippet-generator-groovy

 

Configuring Pipeline and FreeStyle build steps

Pipeline and Freestyle tests have the same configuration options. Freestyle projects are built visually. Pipeline projects are achieved through code.

General Settings

These settings are required for JMeter, Gatling, and Custom tests.

name: 'MyPipelineTest',  // name - name of load tests
desc: 'Started from the pipeline project', // desc - optional descriptoin
storeOutput: true, // storeOutput - if result files should be stored

RedlineJMeter

// Files are relative to the workspace

            masterFile: 'Test Plan WordPress.jmx' , 
            version: '3.0',
            opts: '',
            jvm_args: '',
            extraFiles: [  [extraFile: 'my.csv'], [extraFile: 'or-some.list']]

RedlineGatling

// Files are relative to the workspace
            masterFile: 'Test Plan WordPress.scala' , 
            version: '2.2.0',
            opts: '',
            extraFiles: [  [extraFile: 'my.csv'], [extraFile: 'or-some.list']]

RedlineCustom

// Files are relative to workspace
// Language can be php, nodejs, or python
            masterFile: 'myCustomTest.js',
            language: 'nodejs'

Configuring test size

Defines the cloud configuration for the tests, defined as array of Servers

  • These are not used for Scenario tests, those are predefined on RedLine13.com
  • Custom tests have an extra server parameter usersPerServer to define # of users to simulate on a test server.
  • Cloud settings are detailed at https://www.redline13.com/ApiDoc/LoadTest/Post#cloud
// Servers is an array object
            servers: 
            [
                [
                    location: 'us-east-1', 
                    numberServers: 1,
                    size: 'm3.medium', 
                    subnetId: '', 
                    securityGroupIds: '', 
                    useSpot: false, 
                    volumeSize: 8,
                    associatePublicIpAddress: true
                ]
            ]

Setting thresholds

Define the thresholds to use for marking build failed or unstable.

thresholds: 
[
    errorFailedThreshold: 0, 
    errorUnstableThreshold: 0, 
    responseTimeFailedThreshold: 0, 
    responseTimeUnstableThreshold: 0
]

FreeStyle Example

All the load tests mentioned above can also be added directly as build steps inside Jenkins FreeStyle projects.

freestyle-build-steps

This will add the build step where all properties will be available for customization.

freestyle-build-ui

Configuring RedLine13 Scenario

Redline13 Scenario will allow you to run specific load tests from RedLine13 over and over again. These type of tests do not allow customization or overrides but keep the assets required stored on RedLine13.com. Scenario tests are available as Freestyle or Pipeline.

To make a test available to scenario testing, you must save it as a template on RedLine13.com

On test completion page, select ‘Jenkins’

scenario-jenkins

On test page, ‘Save as Jenkins’

scenario-jenkins-save-as-template

Now you have a Scenario available to the 2.0 Jenkins Plugin

scenario-jenkins-templatized

Freestyle

Freestyle project, just add the ‘Redline13 Scenario’ build step and select the Scenario to test.

scenario-jenkins-select-scenario

Pipeline

To build as a pipeline we only need a few simple properties

redlineScenario( 
    templateId: '8b62c419fdadbde4fe4d53d81b00aa73',
    thresholds: 
    [
        errorFailedThreshold: 0, 
        errorUnstableThreshold: 0, 
        responseTimeFailedThreshold: 0, 
        responseTimeUnstableThreshold: 0
    ]
)

 Other Helpful Resources

Jenkins Plugin Setup

Jenkins Support

2016-11-10
Previous Post: Support For UBIK Load Pack Video Streaming Plugin Version 3.0.0 (Formerly HLS Plugin)
Next Post: Load Testing Any Postman Collection on RedLine13

Recent Posts

  • Guest Post – IoT Load Testing
  • Load Testing Users in India
  • Load Testing in India
  • Troubleshooting Common Issues with Selenium Tests on RedLine13
  • Extracting Metadata from Load Generator Instances

Related

  • Load Testing Users in India
  • Guest Post – IoT Load Testing
  • Guest Post: Load Testing with Locust and JMeter on RedLine13
  • Run Your RedLine13 Load Tests from Hyderabad, Jakarta and Melbourne
  • Load Testing in India
  • Selenium Basics for Load Testing
  • Pitfalls of Selenium Load Testing
  • Troubleshooting Common Issues with Selenium Tests on RedLine13
  • Extracting Metadata from Load Generator Instances
  • Case Study: iCIMS, The Talent Acquisition Software Experts

© RedLine13, LLC | Privacy Policy | Contract
Contact Us: info@redline13.com

Designed using Responsive Brix. Powered by WordPress.