Jenkins: Cannot run program "/Users/user/.jenkins/workspace/jenkinsjob/taurus-venv/bin/bzt error=2

386 views Asked by At

I've started to try this tutorial: https://dzone.com/articles/how-to-use-the-jenkins-performance-plugin, but I am facing issues with my local jenkins (after Step 7). Looks like there is some issue with jenkins not being able to run bzt inside my virtual env.

Started by user user
Running as SYSTEM
Building in workspace /Users/user/.jenkins/workspace/jenkinsjob
Performance test: Checking global bzt installation...
[jenkinsjob] $ bzt --help
Performance test: You don't have global bzt installed on this Jenkins host. Installing it globally will speed up job. Run 'sudo pip install bzt' to install it.
Performance test: Checking virtualenv tool availability...
[jenkinsjob] $ /usr/local/bin/virtualenv --help
Performance test: Found virtualenv tool.
Performance test: Creating virtualev at 'taurus-venv'...
[jenkinsjob] $ /usr/local/bin/virtualenv --clear --system-site-packages taurus-venv
Performance test: Done creating virtualenv.
Performance test: Installing bzt into 'taurus-venv'
[jenkinsjob] $ /Users/user/.jenkins/workspace/jenkinsjob/taurus-venv/bin/pip install bzt
Performance test: bzt installed successfully.
Performance test: Checking installed bzt...
[jenkinsjob] $ /Users/user/.jenkins/workspace/jenkinsjob/taurus-venv/bin/bzt --help
Performance test: Failed to run bzt inside virtualenv.
Cannot run program "/Users/user/.jenkins/workspace/jenkinsjob/taurus-venv/bin/bzt" (in directory "/Users/user/.jenkins/workspace/jenkinsjob"): error=2, No such file or directoryBuild step 'Run Performance Test' changed build result to FAILURE
Finished: FAILURE

Has someone faced and fixed this issue? Could you help me on it, pls? Thank you very much.

2

There are 2 answers

0
Maria On BEST ANSWER

As a solution I set a different (from that one installed globally) version for bzt: enter image description here

1
Dmitri T On

I cannot reproduce your issue using latest Jenkins and Performance Plugin

enter image description here

Most probably Taurus installation into virtualenv failed somewhere somehow, I would try the following:

  1. Run /Users/user/.jenkins/workspace/jenkinsjob/taurus-venv/bin/pip install bzt command in your Terminal and check the output
  2. Run /Users/user/.jenkins/workspace/jenkinsjob/taurus-venv/bin/bzt --help command and check the output

Also as Jenkins suggests you could install Taurus globally (for all users) running the following command:

sudo pip install bzt

and untick Always use virtualenv box in your build configuration:

enter image description here

In general you don't need Taurus to run a JMeter test and parse the results using Performance Plugin, you can run JMeter in command-line non-GUI mode via normal Jenkins Execute shell build step and then use Publish performance test result report post-build action to generate the performance test reports and trend charts.