jstemmer / go-junit-report

Convert Go test output to JUnit XML
MIT License
764 stars 222 forks source link

Distinguish between test errors and failures. #105

Closed pokstad closed 2 years ago

pokstad commented 4 years ago

Currently, a test "error" is classified the same as a test "failure". A failure occurs when the Go test framework concludes that the test fails and prints "FAIL" to STDOUT. A test error can happen when an incorrectly written test is able to escape the test framework. One example of this is when a test exits early. Tests that exit early will interrupt the current test, and any remaining tests in the same package from running. go-junit-report will interpret these tests as failures, when in fact they are neither a success nor failure.

Relates to #101

jstemmer commented 2 years ago

Starting from v2.0.0-beta1, go-junit-report creates errors for build and runtime errors and failures for failing tests.