Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Soatestcli Groovy script extension tool shell command call throws Permission Denied.

joy34
joy34 Posts: 4
edited May 2017 in SOAtest

I've a groovy external tool script setup to call the python command from shell. Code is "python test.py" .execute().
Which is working fine in my local machine. Now I have Jenkins instance running in a server from where I'm running the same test case with soatestcli and it gives me permission denied for Calling python. I can call "ls".execute() without any issues but any process like python or java gives me permission denied. It would be really great if someone could help me here.

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭

    This sounds like an environment issue. I'd recommend verifying which user the Jenkins jobs is running as. This would be the user the Jenkins slave process is running as. Perhaps that user doesn't have permission.

  • OmarR
    OmarR Posts: 233 admin

    Hi joy34,

    Have you tried starting SOAtest with admin privileges and running your test/script?
    You can also try using the external tool to invoke your python script.

  • joy34
    joy34 Posts: 4

    Can you help me find out the user for jenkins? I'm using the groovy code sample from this post:
    https://forums.parasoft.com/discussion/2847/how-to-execute-jar-file-using-jython-or-groovy-script-via-extension-tool#latest

  • joy34
    joy34 Posts: 4

    Hi OmarR , the jenkins is hosted on a client linux box, I don't have admin rights there.

  • joy34
    joy34 Posts: 4

    Also one additional note is that if I run python dirrctly from Jenkins shell , that works fine too.

  • Billy McMullin
    Billy McMullin Posts: 64 admin
    edited June 2017

    Hi joy34,

    You can find the user that Jenkins is using in the Manage Jenkins ->System Information, it will be listed under "user.name". If you did not modify the user and used "apt-get" to install Jenkins, by default the installation will create a "Jenkins" user to run the jobs under and that is usually the user that is executing the jobs. Another way you can find out the user is you can create a Jenkins job and make it execute a batch script with the command:

    whoami

    and this will output the current user that is running the job.