Unable to run taurus tests in jenkins. Build console log says bzt command not found

1.9k views Asked by At

I am trying to run Jmeter tests with the help of taurus in jenkins with performance plugin. In my yml file I have passed the scenarios to run jmx scripts and in jenkins I am using execute shell to run my tests

 bzt test_suite.yml -report

I have also set the current directory as my workspace in jenkins. So, when I build the project in build console I get the following output

Running as SYSTEM
Building in workspace C:\Users\muhammad.taus\PycharmProjects\PerfAutomationFramework
[PerfAutomationFramework] $ sh -xe C:\Users\MUHAMM~1.TAU\AppData\Local\Temp\jenkins2737910596558040446.sh
+ bzt test_suite.yml -report
C:\Users\MUHAMM~1.TAU\AppData\Local\Temp\jenkins2737910596558040446.sh: line 2: bzt: command not found
Build step 'Execute shell' marked build as failure
Creating parser with percentiles:'0,50,90,100,' filterRegex:
Cannot detect file type because of error: Failed to copy C:\Users\muhammad.taus\PycharmProjects\PerfAutomationFramework\stats.xml to C:\Users\muhammad.taus\.jenkins\jobs\PerformanceAutomation\builds\36\temp\stats.xml
Finished: FAILURE

But previously the tests used to run fine on my host. I installed taurus using pip and in CMD When I type bzt it gets taurus, also when I type py it picks python and also I have setup JMETER_HOME and in cmd when I used jmeter it opens Jmeter. I am not sure what happened but I am not able to execute the tests anymore. The only thing I remember is changing python version from 32 bit to 64 bit, But I am sure that is not causing the problem. Please if anyone can help me in this regard it would be great.

1

There are 1 answers

1
Dmitri T On

You have some weird mix of Linux and Windows and your question doesn't contain sufficient level of details in order to troubleshoot the issue.

  1. Use the full path to python executable in your shell script

  2. Instead of bzt use /path/to/python -m bzt.cli your_config.yml

  3. If you get No module named bzt install it using pip:

    python -m pip install bzt
    
  4. If python executable is not found, try python3 instead

More information: