Skip to content

Time parsing is incorrect #141

Description

@asaf-kali

In my company, we run tests in parallel.

Pytest exports the test suite with a (correct) time tag:

<?xml version="1.0" encoding="utf-8"?>
<testsuites>
    <testsuite name="pytest" errors="0" failures="14" skipped="0" tests="76" time="4005.821" timestamp="...." hostname="....">
        <testcase classname="...." name="...." time="661.025"/>

Indeed, tests took about an hour.

The time provided by TestSuite.time was 23406 seconds, which is the accumeltated time of all the tests.
It seems the logic in TestSuite.update_statistics does not take into account such cases, so I suggest the following logic change:
If time tag already exists on the element, skip the sum logic, and use the tag value as value for time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions