Contributions
Re: Is it possible to execute ReadyAPI testrunner in a <containerized> jenkins?
nmraowrote: Without Jenkins I succeeded What 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. nmraowrote: 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 Pablo3 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.3KViews0likes1CommentRe: Is it possible to execute ReadyAPI testrunner in a <containerized> jenkins?
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.3 years agoPlace ReadyAPI QuestionsReadyAPI Questions1.4KViews0likes3CommentsIs it possible to execute ReadyAPI testrunner in a <containerized> jenkins?
Hi, I've been trying to run in a dev environment the docker ReadyAPI testrunner in a Jenkins pipeline. Goal: ->Execute testsuite without the need of a readyapi plugin. This restriction is unfortunately given. Due to our license server we can't use a newer version than 3.3.0 So far I tried as follow: stage('Test') { steps { sh 'docker run -v="${WORKSPACE}/test":/project -v="${WORKSPACE}/test":/reports -e LICENSE_SERVER="xxx.xxx.xxx.xxx:xxx" -e COMMAND_LINE="-fproject/ -FHTML \'project/hello_rest_test.xml\'" smartbear/ready-api-soapui-testrunner:3.3.0' } } The runner reaches the license server correctly and it gets activated. The problem is that it seems that it does not find the project file as I get the following message: The specified project file "project/hello_rest_test.xml" does not exist. I've tried different approach like the one as follows: stage('Test') { steps { script { def image = docker.image('smartbear/ready-api-soapui-testrunner:3.3.0') .withRun('-v="${WORKSPACE}/test":"/project" -v="${WORKSPACE}/test":"/reports" -e LICENSE_SERVER="xxx.xxx.xxx.xxx:xxxx" -e COMMAND_LINE="-fproject/ -FHTML \'project/hello_rest_test.xml\'"') {c-> sh "docker logs ${c.id} -f" } } } } Logs are similar, the runner gets activated but it does not find the test file. So my first question is, is it what I'm trying to do possible? Because may be I'm just trying to do something that it is not. For instance, if I run it out of Jenkins then it works. I noticed that Jenkins runs the docker container with '-w' parameter establishing the actual Jenkins Workspace as the testrunner container workdir, could it be that this breaks the testrunner container? Looking forward any kind of hint you may provide even if the answer is that this is not possible to do it is fine too at least I'll know I'm on a dead end 🙂 Thanks1.4KViews0likes5Comments