stages { stage('Test') { steps { script{ writeFile file: 'result.junit.xml', text: ''' ''' junit allowEmptyResults: false, keepLongStdio: true, testResults: "*.junit.xml" } } } }