[GitHub] maven-surefire pull request #143: maven-surefire-parser: add new method isEr...

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] maven-surefire pull request #143: maven-surefire-parser: add new method isEr...

Tibor17-2
GitHub user surli opened a pull request:

    https://github.com/apache/maven-surefire/pull/143

    maven-surefire-parser: add new method isError in ReportTestCase

    There is currently no way after parsing test cases to know if the test case is a failure or an error. I added a boolean `isError` in ReportTestCase and associated getter and setter and I set it up in the TestSuiteXmlParser.
   
    I need this feature for an automation repair project: if there is another way with existing tooling, just tell me about it!


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/surli/maven-surefire surefire-parser-feature-error-status

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/maven-surefire/pull/143.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #143
   
----
commit 2b97d46d5a5adf660a0231a7128cbae3839845b8
Author: Simon Urli <[hidden email]>
Date:   2017-02-08T16:57:30Z

    Change ReportTestCase to add a new isError method to detect if it's a failure or an error. Change parser and tests accordingly.

commit 36f724a0371e6cf9a565dfcef0b9d3953ddd56f1
Author: Simon Urli <[hidden email]>
Date:   2017-02-08T17:43:58Z

    Fix checkstyle issue.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] maven-surefire pull request #143: maven-surefire-parser: add new method isEr...

Tibor17-2
Github user Tibor17 commented on a diff in the pull request:

    https://github.com/apache/maven-surefire/pull/143#discussion_r108779823
 
    --- Diff: surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java ---
    @@ -156,6 +158,15 @@ public boolean hasFailure()
             return hasFailure;
         }
     
    +    public boolean isError() {
    --- End diff --
   
    You are not calling the getter in `SurefireReportGenerator`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] maven-surefire pull request #143: maven-surefire-parser: add new method isEr...

Tibor17-2
In reply to this post by Tibor17-2
Github user Tibor17 commented on a diff in the pull request:

    https://github.com/apache/maven-surefire/pull/143#discussion_r108780826
 
    --- Diff: surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java ---
    @@ -196,7 +196,8 @@ else if ( "failure".equals( qName ) )
                     }
                     else if ( "error".equals( qName ) )
                     {
    -                    testCase.setFailure( attributes.getValue( "message" ), attributes.getValue( "type" ) );
    +                    testCase.setFailure( attributes.getValue( "message" ), attributes.getValue( "type" ) )
    --- End diff --
   
    If having an error, then failure and error are set both. Why?
    See Line 235. Maybe you should introduce `setErrorDetail` similar to what is `setFailureDetail`, and show the detail in HTML report and thus distinguish between these two.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[GitHub] maven-surefire issue #143: maven-surefire-parser: add new method isError in ...

Tibor17-2
In reply to this post by Tibor17-2
Github user surli commented on the issue:

    https://github.com/apache/maven-surefire/pull/143
 
    Hi @Tibor17 sorry I missed your previous review, I'll make changes in the coming days and open the issue on JIRA


---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]