allure-python icon indicating copy to clipboard operation
allure-python copied to clipboard

Pytest-flaky test retries shows like test steps

Open rocketb opened this issue 9 years ago • 5 comments

I'm submitting a ...

  • [x] bug report
  • [ ] feature request
  • [ ] support request => Please do not submit support request here, see note at the top of this template.

What is the current behavior?

Test retries displayed in Execution -> Test body section.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

  1. Install flaky package - pip install flaky

  2. Create file simple_test.py with content:

import allure
from flaky import flaky

@allure.step
def step_one():
    pass

@allure.step
def step_two():
    pass

@flaky
def test_simple():
    step_one()
    step_two()
    assert 0
  1. Run test - pytest simple_test.py --alluredir=allure-results

  2. Generate allure report - allure generate --clean allure-results -o allure-results/output

  3. Open allure report - allure open allure-results/output allure report allure report 1

What is the expected behavior?

Test retries should be displayed in 'Retries' tab.

Please tell us about your environment:

rocketb avatar Aug 10 '17 12:08 rocketb

same behavior for pytest-rerunfailures plugin

dstoianov avatar Feb 20 '18 10:02 dstoianov

+1

samuraii avatar Jun 04 '18 10:06 samuraii

+1 Additional (related) issue: If you try to attach anything on teardown, you only get the attachments from the first test failure, not from the retries.

saluk avatar Jun 20 '18 23:06 saluk

@dstoianov can you test it with latest version? @rocketb it is probably fixed for pеtest-rerunfaiures, but have a chance for pytest-faky too, can you check it? @saluk can you check your case with last version?

sseliverstov avatar Jul 11 '18 13:07 sseliverstov

Still this issue occurs. can anyone provide a suggestion or workaround

aswinselva03 avatar Mar 26 '21 10:03 aswinselva03