vineet singh
vineet singh

Reputation: 159

Jenkins freestyle build run with allure report

I'm running a jenkins freestyle build for all tests that contain pytest marker "jenkins_run" and after build run, i want allure report for my tests. what i tried is:

cd C:\Users\Administrator\Perforce\depot2\Cloud\TestAutomation\framework

python -m pytest --alluredir="reportpath" -rf -m jenkins_run

What's happening is that tests are running fine but allure is not able to pick test result from the specified path (attaching screenshot for reference).

Build command:

enter image description here

Post build actions for allure

enter image description here

Upvotes: 1

Views: 1239

Answers (1)

itay zohar
itay zohar

Reputation: 187

i've struggled with this as well. for me, the issue was that the path in "--alluredir" parameter didn't match one of the allure plugin.

make sure the path of --alluredir is:

  1. must be folder called exactly 'allure-result' (at least for my version the configuration of the allure jenkins plugin is a lie)
  2. relative to jenkins workspace and to your specific build folder inside the workspace

so, it should look something like:

--alluredir "path/of/jenkins/workspace/build_name/target/allure-result"

Upvotes: 2

Related Questions