I’m really stuck on generating a report from my pytest runs.
This the pipeline script (linked to Github):
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_*.py'
}
}
stage('Test') {
steps {
sh 'python3 -m pytest'
}
}
stage('Publish junit report') {
steps {
junit allowEmptyResults: true, testResults: 'result.xml', skipPublishingChecks: true, skipMarkingBuildUnstable: true
}
}
stage('reports')
{
steps {
script {
allure([
includeProperties: false,
jdk: '',
properties: [],
reportBuildPolicy: 'ALWAYS',
results: [[path: '**/target/allure-results']]
])
}
}
}
}
}
I have installed JUnit, HTML Publishing, Allure, however, I do not how to get a report by JUnit neither Allure. Please, could you guide me? Thanks in advance.