Refresh NeoLoad trends in Pipeline

The "neoloadRefreshTrends" step in the Jenkins Snippet Generator makes it possible to refresh NeoLoad trends without running NeoLoad.

Once the Jenkins project is selected, the Snippet Generator is accessible with a click on the Pipeline Syntax link.

NL-pipelinesyntax

NL-neoloadrefreshtrends

Sample Step: The list box allows selecting the "neoloadRefreshTrends" step.

Default NeoLoad Trend Graphs

AVG: When the facing check box is ticked, a trend graph of the average response time for all pages is displayed. Note that the build artifacts must include XML results from NeoLoad for the graph to be displayed.

Errors: When the facing check box is ticked, a trend graph of the error rate of the most recent runs is included on the job page. Note that the build artifacts must include XML results from NeoLoad for the graph to be displayed.

Define NeoLoad Trend Graphs

Graphs

A click on the Add Graph button allows adding as many graphs as necessary.

Name: The field must be filled in with a name that identifies the graph to create.

A click on the Add a Curve button allows adding as many curves as necessary.

Curve: The way to define a curve depends on what you want to display:

Statistic: The list box allows selecting the statistic you want to apply on each curve of the graph.

Limit the number of points in trend charts: To ensure visibility, the number of points un trend charts can be limited by entering the required value in the field. Enter "0" for unlimited charts.

Once the step is configured, a click on the Generate Pipeline Script button generates the script.

NL-RefreshtrendsGenerateScript

The script generated can now be inserted in a Pipeline. Below is an example:

properties([parameters([booleanParam(defaultValue: false, description: '', name: 'RefreshGraphOnly')])])
node{
  stage('Preparation [Git]'){
      checkout scm
  }
  stage('Build [MAVEN'){
      sh 'maven install'
  }
...    
  stage('Load Testing [NEOLOAD]'){
      def graphs=[[name: 'My graph', curve: ['BrowserUser_Create_report>Actions>/'], statistic: 'error'], 'AvgResponseTime', 'ErrorRate']
      if(params.RefreshGraphOnly){
             neloadRefresh trendGraphs: graphs
      }else{
             git branch: '100VuForProject', url: 'ssh://mygit/LoadTest'
             neoloadRun project: 'LoadTest100VuForProject.nlp', scenario: 'Test for CD', trendGraphs: graphs
       }
  }
  stage('Deploy [AWS-ECS'){
  ...
  }
}