victorolinasc / junit-formatter

A JUnit XML report exporter for Elixir's ExUnit
https://hexdocs.pm/junit_formatter/
Apache License 2.0
111 stars 37 forks source link

Add handling of :skipped atom when using ExUnit >= 1.7.0 #50

Closed mengdaming closed 8 months ago

mengdaming commented 1 year ago

Cf. issue #49 for details.

lukad commented 8 months ago

Any chance this can be merged? :) It would be nice to have the infos about skipped tests available in our CI pipeline.

dbuls commented 8 months ago

@mengdaming I think an additional change needs to be made in order for the skipped="<nr>" property to be set on the <testsuite> element. In generate_testsuite_xml() function on lines 208-212 skipped tests property needs to be added, e.g.,

[
  ...
  skipped: stats.skipped,
  ...
],
dbuls commented 8 months ago

@victorolinasc any chance we could get this PR reviewed and merged in?

victorolinasc commented 8 months ago

I will review this as this is simple enough.

I wonder if the specs say anything about the proper way to tag skipped tests. Do you guys have any links to see this through?

victorolinasc commented 8 months ago

Nevermind... just remembered this is on the Elixir side of things... sorry!

Will take a look now

victorolinasc commented 8 months ago

I will merge this and clean it up on main. I am upping the elixir version requirement to at least 1.7 (though I think we could go straight to 1.10 or something...)

victorolinasc commented 8 months ago

Thanks everyone for the contribution! Test now pass and we have proper skipped counting. Version 3.4.0 is now published.

Have a great day you all!

dbuls commented 8 months ago

@victorolinasc thanks for the review and @mengdaming for the PR!