Unanswered question

How to fix 'scenario is mandatory' when running 'neoloadRun' from Jenkinsfile?

In the attached image, a 'service is mandatory' error occurs when running neoloadRun from the Neoload Jenkins Plugin in the Jenkinsfile. Below is the pipeline code in the Jenkinsfile:

pipeline {
agent any
stages {
stage('test') {
steps {
neoloadRun(scenarioName: 'scenario1', executable: '<absolute_path_to_NeoloadCmd>', sharedProjectServer: [uniqueID: '<a_unique_id>', url: 'http://localhost:9090', loginUser: 'admin', loginPassword: '<password>', label: ''], licenseServer: [uniqueID: '<a_unique_id>', url: 'http://localhost:9090', loginUser: 'admin', loginPassword: '<password>', label: '', collabPath: '/repository_1', licenseID: ''], displayGUI: true)
}
}

}
}

I would like to know why this happens, and how to fix it. Am I missing some parameters?

John Aaron A.
John Aaron A.

John Aaron A.

Level
0
2 / 100
points

Answers

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

Your neoloadRun syntax is incorrect, did you use the pipeline syntax builder to create it?

Neil W.
Neil W.

Neil W.

Level
4
5000 / 5000
points
Team

See my example, I have parameterised some of the values but notice its scenario: not scenarioName:

neoloadRun executable: '/usr/local/Neoload6.8/bin/NeoLoadCmd', project: "${WORKSPACE}/GitDemo_v680.nlp", testName: 'Result of Jenkins (v6.8) Pipeline Scenario $Date{hh:mm - dd MMM yyyy} (build ${BUILD_NUMBER})', testDescription: 'My jenkins pipeline run...on v6.8', commandLineOption: "-project ${WORKSPACE}/generated_scen.yaml -nlweb -nlwebAPIURL http://ubuntu-sandpit:8080 -nlwebToken xxxxxxxxxx -variables sla_failure=${SLA} -loadGenerators /root/neoload_projects/Mine_v680/custom-resources/dynamic_loadgens.yaml -exitCodeFailIgnore", scenario: '${Scenario}', sharedLicense: [server: 'My Unsecured NTS', duration: 2, vuCount: "${Users}"], trendGraphs: [[name: 'Average Duration Across Builds', curve: ['Jenkins Demo>Actions>transaction_filler'], statistic: 'average'], 'AvgResponseTime', 'ErrorRate'], autoArchive: 'false'
neoloadRefreshTrends(trendGraphs: [[name: 'Average Duration Across Builds', curve: ['Jenkins Demo>Actions>transaction_filler'], statistic: 'average'], 'AvgResponseTime', 'ErrorRate'])