Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allure report not displayed in BDD format (with given/when/then steps) when generated on Jenkins #334

Open
vlad230 opened this issue Sep 5, 2023 · 1 comment
Labels

Comments

@vlad230
Copy link

vlad230 commented Sep 5, 2023

Jenkins and plugins versions report

Environment
Jenkins allure plugin version: allure-jenkins-plugin:2.30.3
Jenkins Allure cmd line version: 2.23.1 (same version on my local machine)

What Operating System are you using (both controller, and any agents involved in the problem)?

This Jenkins pipeline is running inside AKS, I use Mac OS on my local machine.

Reproduction steps

  1. I execute the tests with python + poetry + pytest-bdd inside Jenkins with cmd: python -m poetry run pytest -ra -q --cucumber-json=test.json --alluredir allure-dir (same cmd as on my local machine)
  2. The output is stored inside allure-dir
  3. The plugin executes: allure generate -c -o allure-dir allure-report

Local execution: local-exec

Jenkins execution: jenkins-exec

Expected Results

The generated report is the same as the one generated on my local machine, with BDD type steps like Given, When Then inside the Suites -> Test Item -> Overview Tab -> Test Body.

Actual Results

The report is generated but it's not in a BDD style, it just displays Scenario name from the .feature file inside Suites -> Test Item -> Overview Tab -> Description

Anything else?

How can I see this report in a BDD style on Jenkins using the plugin?
This is the pipeline code I use:
allure([ includeProperties: false, jdk: '', properties: [], reportBuildPolicy: 'ALWAYS', results: [[path: 'allure-dir']]

@vlad230 vlad230 added the bug label Sep 5, 2023
@vlad230
Copy link
Author

vlad230 commented Oct 13, 2023

Found a solution to this problem, in case anyone still has it:
You need to use allure-pytest-bdd python library in order for the report to show up in BDD format. The problem for us was that someone installed allure-pytest manually inside the docker image and it was using that one instead of the correct one listed inside our dependencies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant