I have a pipeline which execute pytest tests, however, I would like to export the results in a xml file saved in Github (in the same location as the pytests).
pipeline {
agent any
stages {
stage('Checkout') {
steps {
checkout scmGit(branches: [[name: '*/main']], extensions: [], userRemoteConfigs: [[url: 'https://github.com/raul-parada/Python-Selenium.git']])
}
}
stage('Build') {
steps {
git branch: 'main', url: 'https://github.com/raul-parada/Python-Selenium.git'
sh 'python3 test_calculator.py'
}
}
stage('Test') {
steps {
sh 'python3 -m pytest'
}
}
stage('Publish test results') {
steps {
junit 'https://github.com/raul-parada/Python-Selenium/*.xml'
}
}
}
}
I got this error:
I have installed Junit plugin (by default).