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 configurable `include_filename?` setting to allow <testcase>s to include the test file path. #37

Closed danadaldos closed 4 years ago

danadaldos commented 4 years ago

Hello! I'm submitting this PR because I ran into an issue on CircleCI where their split-by=timings option required the ingested JUnit XML to include a filename. I have tested the generated XML on my forked branch, and it does fix the CircleCI timings problem for Elixir.

However, I didn't want to force it to be true by default here because I found a few issues where including the file attribute caused issues with the XML parser.

Let me know if you find any issues with the code.

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.2%) to 98.039% when pulling 0cf2f4e19a74d57fbc1dfdfab40981d9070ef27d on danadaldos:master into dd24a87e2d795ccb60250ec7d1b7d8116c271e5b on victorolinasc:master.

victorolinasc commented 4 years ago

This is the old case pictured perfectly by xkcd... https://xkcd.com/927/

I am okay with the approach of this not being default. What worries me a bit (but not much) is the extensive configuration we are having in this project =/

But I am fine with the implementation. Would like to test it a bit more on umbrella projects though. I'll try to find some time this week to do so.

Thanks a lot for your contribution! I'll merge/comment as soon as I can test it locally.

danadaldos commented 4 years ago

This is the old case pictured perfectly by xkcd... https://xkcd.com/927/

😀

I'll try to find some time this week to do so.

👍

Thanks a lot for your contribution! I'll merge/comment as soon as I can test it locally.

Thank you! I look forward to any feedback you have.

victorolinasc commented 4 years ago

Everything seems fine :) I will merge and release now!

danadaldos commented 4 years ago

@victorolinasc Thanks for merging it, this will save some future CircleCI users some frustration.

🎉 Woo! My first contribution to an open source project! 🎉

victorolinasc commented 4 years ago

Published as 3.1.0.

Thanks for your contribution.