- Jenkins 2.386
- Pipeline plugin 590.v6a_d052e5a_a_b_5
- Robot Framework plugin 3.3.0
- Python3.9.2
- robotframework 6.0.2
- robotframework-assertion-engine 1.0.0
- robotframework-browser 15.1.0
- robotframework-pythonlibcore 4.0.0
Screenshots are not nested in log
Robot Publisher copies results to specific build
Using "otherFiles" option copies PNG images and Browser Library directories structure
Clicking the icon of missing image in Robot log redirects to screenshot properly.
I work on Jenkins master node - I don't use slaves.
Here is my Jenkinsfile:
pipeline {
agent any
stages {
stage('Test') {
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
sh 'robot -d results Scripts/My_Test_Suite.robot'
}
}
}
stage('Results') {
steps {
step([
$class: 'RobotPublisher',
outputPath: 'results',
outputFileName: '*.xml',
otherFiles: '**/*.png',
])
}
}
}
}
Update:
Before I faced described problem I configured CSP just like here: https://stackoverflow.com/a/37524992/6639428. That means I used following configuration and according to https://content-security-policy.com/img-src/ it should work, but it doesn't...
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts; default-src 'none'; img-src 'self' data: ; style-src 'self' 'unsafe-inline' data: ; script-src 'self' 'unsafe-inline' 'unsafe-eval' ;")