I installed rspec_junit_formatter gem as prompted by the message in my builds but Circle still reports that it cannot collect metadata. I’m using rspec. Does anyone have a similar problem?
I don’t know ruby. so I’m not 100% sure where this goes, but I believe you have to also call it, something like this in your Rakefile:
require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |t| t.fail_on_error = false t.rspec_opts = "--no-drb -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/junit.xml" end
Does the Artifacts tab show the presence of the XML files with the test results? If it does, can you post one of the XML files here?
Thank you, this solved my problem! Changed my circleci.yml to the following
test: override: - RAILS_ENV=test bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml
Would be cool if this was included in official documentation.
I’m also seeing this…
- We have a
.rspecthat looks like:
--profile --color --format documentation
0.2.3, in both
- Test step is not overriden
- …and then the command that gets run under the “Parallel RSpec” section is:
bundle exec rspec 'bunch of spec files....' --format progress
…and afterwards the fails aren’t collected - they also don’t show up in the artifacts.
The Test Summary says “Help us provide better insight around your tests and failures. Set up your test runner to output in JUnit-style XML, so we can:”
Doing this results in all 16 containers running all the tests!