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

Add the JUnit time attribute on a failed tests. #204

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 1, 2016

  1. Add the JUnit time attribute on a failed tests.

    The Sonar JUnit parser fails if the time attribute is not present on
    failed tests. This patch adds the time attribute for these tests with a
    fixed duration of "0".
    
    Adding the real test duration was considered however it cannot be
    done easily with the current xcpretty implementation:  xcpretty parses
    Xcode output line by line whereas a failed test outputs at least 2 lines
    of log: one that shows the failed test and the cause, another that
    displays the duration (quite the same line as a passing test).
    A considered approach would be to keep a context and output a
    transformed log line only if the context is full (in the case of failed
    tests, only if the cause and the duration have been parsed).
    Philippe Bernery committed Feb 1, 2016
    Configuration menu
    Copy the full SHA
    4ad2c4e View commit details
    Browse the repository at this point in the history