Forum Discussion
- pgp4 years agoNew Contributor
I'm running it on a Jenkins Pipeline.
I'm using the following testrunner: https://support.smartbear.com/readyapi/docs/integrations/docker/soapui.html
And I'm running it in Jenkins like defined here and the script itself the one I wrote on my first post: https://www.jenkins.io/doc/book/pipeline/docker/
Without Jenkins I succeeded but when I'm running it within a Jenkins Pipeline I can't manage to make the testrunner to find the xml with the testsuite.
That's why I'm wondering whether I'm doing something wrong or perhaps I may be missing something here or may be this is not even possible to do.
- nmrao4 years agoChampion Level 3
Without Jenkins I succeededWhat command did you use in above case?
but when I'm running it within a Jenkins Pipeline I can't manage to make the testrunner to find the xml with the testsuite.What command are using in this case in the pipe line?
- pgp4 years agoNew Contributor
nmrao wrote:
Without Jenkins I succeededWhat command did you use in above case?
docker run -v="${HOME}/Projects/hello_rest/test":/project -v="${HOME}/Projects/hello_rest/test":/reports -e LICENSE_SERVER="XXX.XXX.XXX.XXX:XXXX" -e COMMAND_LINE="-f/project -FHTML 'project/hello_rest_test.xml'" smartbear/ready-api-soapui-testrunner:3.3.0
With the above command, given that I'm using macOS 10.15.7, it succeed, it receives the activation license from the floating license server and it also finds the xml with the test suite.
nmrao wrote:
but when I'm running it within a Jenkins Pipeline I can't manage to make the testrunner to find the xml with the testsuite.What command are using in this case in the pipe line?
In the pipeline I set it like follows:
stage('Test') { steps { script { def image = docker.image('smartbear/ready-api-soapui-testrunner:3.3.0') .withRun('-v=\"${WORKSPACE}\":/project -v=\"${WORKSPACE}\":/reports -e LICENSE_SERVER="XXX.XXX.XXX.XXX:XXXX" -e COMMAND_LINE="-f/project/test/reports -FHTML \'/project/test/hello_rest_test.xml\'"') {c-> sh "docker logs ${c.id} -f" } } }
However, the test suite xml it is not found as the runner output the following in the log:
docker run -d -The specified project file "/project/test/hello_rest_test.xml" does not exist.
In the Jenkins, if I look, the file is definitely located under:
${WORKSPACE}/test/hello_rest_test.xml
where ${WORKSPACE} is equivalent to: /var/jenkins_home/workspace/SimpleRESTAPI, which in my local environment, due to Jenkins itself is running on docker image too, is mounted to a directory in the host system, my macOS, as:
-v ${HOME}/jenkins/jenkins_home:/var/jenkins_home
It looks to me that Jenkins is not correctly mounting, in the pipeline script, the job workspace as volume to the readyapi test runner docker image. But I can't see how can I make it right nor what I'm missing here. Perhaps what I'm trying to do it is not even technically possible to do?
Thanks
Cheers Pablo
Related Content
- 4 years ago
- 12 months ago
Recent Discussions
- 2 days ago