box / flaky

Plugin for nose or pytest that automatically reruns flaky tests.
Apache License 2.0
381 stars 59 forks source link

flaky with pytest outputs multiple copies of <testcase> in xml result #136

Open iamnrupesh opened 6 years ago

iamnrupesh commented 6 years ago

When I am using flaky with pytest, I see multiple copies of <testcase> element in the XML output for the same test if it was reran by flaky.

<?xml version="1.0" encoding="utf-8"?>
<testsuite errors="0" failures="1" name="pytest" skips="0" tests="1" time="144.256">
      <testcase classname="TestDemo" file="tests/functional/test_demo.py" line="168" name="test_demo_stuff" time="78.72701597213745"></testcase>
      <testcase classname="TestDemo" file="tests/functional/test_demo.py" line="168" name="test_demo_stuff" time="52.58129286766052">
            <failure message="AssertionError: Demo button is displayed!
                   assert True is False
                   +  where True = ............"
            </failure>
      </testcase>
</testsuite>