I'm trying to run xunit and I keep seeing examples with only "step" like this:
step([$class : 'XUnitPublisher', testTimeMargin: '3000', thresholdMode: 1,
thresholds: [
[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '0'],
[$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']
],
tools : [[$class: 'MSTestJunitHudsonTestType', deleteOutputFiles: true, failIfNotNew: false, pattern: "TestResults\\*.trx", skipNoTestFiles: false, stopProcessingIfError: true]]
])But I want to run multiple "steps" inside a stage. I don't understand step vs steps.
For example this isn't working:
stage('Test') {
steps {
bat "\"${tool 'VSTestRunner'}\" %WORKSPACE%\\MyApp\\bin\\Debug\\MyAppTest.dll /logger:trx",
step([$class : 'XUnitPublisher',
testTimeMargin: '3000',
thresholdMode: 1,
thresholds: [
[$class: 'FailedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '0'],
[$class: 'SkippedThreshold', failureNewThreshold: '', failureThreshold: '', unstableNewThreshold: '', unstableThreshold: '']
],
tools : [[$class: 'MSTestJunitHudsonTestType',
deleteOutputFiles: true,
failIfNotNew: false,
pattern: "TestResults\\*.trx",
skipNoTestFiles: false,
stopProcessingIfError: true
]]
])
}
}