How to run the neoload test using Jenkins through pipeline project.They asked to create groovy script to run the test.please provide me any example
pipeline {
agent { label 'neoload-controller' } //inhouse docker template pulling dockerhub controller + openjdk + git into the build
stages {
stage('Pull NL Project') {
steps {
dir('neoload_project') {
git(branch:'master', url: 'https://bitbucket.<companyURL>.com/scm/qap/some_api...;, credentialsId: '****')
}
}
}
stage('Run the test') {
steps {
script {
dir('neoload_project') {
neoloadRun executable: '/home/neoload/neoload/bin/NeoLoadCmd',
project: "$WORKSPACE/neoload_project/some_api_test.nlp",
scenario: "test",
testName: "First Test (build ${BUILD_NUMBER})",
testDescription: "A short, small load test",
autoArchive: 'true',
sharedLicense: [
server: 'neoload_license',
duration: 1,
vuCount: 10
],
commandLineOption: " -nlweb -nlwebAPIURL https://<OnPremURL>:8080 -nlwebToken <token>"+
}
}
}
}
}
post {
always {
junit allowEmptyResults: true, testResults: "${WORKSPACE}/neoload_project/neoload-report/junit*.xml" //archives to master
}
failure {
mail to: 'my@email.com',
subject: "Failed Pipeline: ${currentBuild.fullDisplayName}",
body: "Something is wrong with ${env.BUILD_URL}"
}
}
}
Heidi answered
Srinivasan posted a new question