Closed mengdaming closed 5 months ago
When running tests with some tests marked as skipped (using @tag :skip), these skipped tests don't show up in the generated junit XML test report.
I'm getting a report that looks like the following:
<testsuite errors="0" failures="1" name="xxx" tests="2" time="...">
While I would expect to see somthing like this (with 1 test case marked as skipped):
<testsuite errors="0" failures="1" skipped="1" name="xxx" tests="3" time="...">
I did a bit of investigation and from what I could see ExUnit changed in version 1.7.0 their state type to use :skipped atom instead of :skip when marking skipped tests. Cf. the 2 links below:
:skipped
:skip
So I guess updating this line in junit-formatter could fix the problem. WDYT?
We could add something like:
def handle_cast({:test_finished, %ExUnit.Test{state: {tag, _}} = test}, config) when tag in [:skip, :skipped] do
PRs are most welcome!
When running tests with some tests marked as skipped (using @tag :skip), these skipped tests don't show up in the generated junit XML test report.
I'm getting a report that looks like the following:
While I would expect to see somthing like this (with 1 test case marked as skipped):
I did a bit of investigation and from what I could see ExUnit changed in version 1.7.0 their state type to use
:skipped
atom instead of:skip
when marking skipped tests. Cf. the 2 links below:So I guess updating this line in junit-formatter could fix the problem. WDYT?