Is 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 🙂
Thanks