-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CircleCI --split-by=timings
issue with Elixir's junit-formatter
#9
Comments
@danadaldos Thanks for your thorough report and investigation. Without going deeply into the My hunch is that this problem occurs between the formatter library being used here, and not the CLI. But I'm open to keeping this issue around in case anyone else has ideas. Thanks again! ❤️ |
@zzak I forked the I didn't want this to be an intrusive addition to Thank you! |
@danadaldos Thanks so much for your contribution!
Sounds good, please feel free anytime if you'd like to add or change anything in our example apps or docs. |
@zzak Okay, the owner of |
Hey all,
I'm wanting to signal-boost an issue I have reported on CircleCI's forums (https://discuss.circleci.com/t/split-by-timings-on-elixir-project-fails-to-find-stored-timings-possibly-missing-file-names-in-junit-xml/34813)
Long story short, with the understanding that this demo project is NOT using the
split-by=timings
it seems like Elixir'sjunit-formatter
does not include afile
orfilename
attribute that other JUnit formatters for other languages do, and that that attribute might be required by CircleCI'ssplit --split-by=timings
utility.Here is a copy of the forum post:
Hey all,
I am trying to get
--split-by=timings
to work on an Elixir project but I keep getting the following error:When I SSH into a container, here's what the very end of
.circleci-task-data/circle-test-results/results.json
look like:Note that all of the test cases in that file have
"file":null
.("files" seems to be an aggregation from the 4 containers I'm running (
parallelism: 4
)I have compared notes with someone running a Ruby project, and the JSON in his test container looks like:
And, as noted in the sample, all of his test cases have a file name.
Now, I assume that
results.json
is created out of the JUnit formatter results that get saved as part of thestore_test_results
step in the build. Looking into the XML that gets stored after a build, and comparing notes again with the Ruby project, it appears that for Ruby/Rspec projects,RspecJunitFormatter
outputs XML that includes afile
attribute, whereas the XML outputted from Elixir's JUnit Formatter (https://github.com/victorolinasc/junit-formatter) does NOT have that field. Compare:rspec.xml
VS.
exunit.xml
Okay, so one includes file names, the other does not. CircleCI's
split
function has a--timings-type
flag that can be passed-in to tell the splitter to either look forfilename
orclassname
. However, adding--timings-type=classname
to the command does not fix the issue, instead, it causes a new error:Which leads me to believe that CircleCI's
split
utility requires a file name in the JUnit XML, which currently is not available in Elixir'sjunit-formatter
.Can someone confirm this or not? Am I missing something in my configuration?
Config.yml
For thoroughness, here are the relevant parts of my config file:
Other knowns:
Additionally, I would draw your attention to a comment made in the RspecJunitFormatter repo:
sj26/rspec_junit_formatter#70
Specifically the comment:
The text was updated successfully, but these errors were encountered: