Skip to content
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

JUnit XML dumping fails #1383

Closed
quulah opened this issue Dec 29, 2016 · 4 comments
Closed

JUnit XML dumping fails #1383

quulah opened this issue Dec 29, 2016 · 4 comments

Comments

@quulah
Copy link

quulah commented Dec 29, 2016

Description

I'm a bit unsure where to file this bug. I use test-kitchen to run InSpec tests on our Chef cookbooks using Bamboo. The verifier's output is set to JUnit. Every now and then the tests fail.

29-Dec-2016 10:14:30	>>>>>> ------Exception-------
29-Dec-2016 10:14:30	>>>>>> Class: Kitchen::ActionFailed
29-Dec-2016 10:14:30	>>>>>> Message: 1 actions failed.
29-Dec-2016 10:14:30	>>>>>>     Failed to complete #verify action: [undefined method `xml_dump_' for #<InspecRspecJUnit:0x0000000379dcd8>] on $suite1-$platform1
29-Dec-2016 10:14:30	>>>>>> ----------------------
29-Dec-2016 10:14:30	>>>>>> Please see .kitchen/logs/kitchen.log for more details
29-Dec-2016 10:14:30	>>>>>> Also try running `kitchen diagnose --all` for configuration
29-Dec-2016 10:14:31	Failed to parse test result file bamboo_$platform1_$suite2_inspec.xml
29-Dec-2016 10:14:31	Failed to parse test result file bamboo_$platform1_$suite1_inspec.xml

I modified the output a bit to get just the relevant stuff. The "failed to parse test result" lines are from Bamboo's JUnit parser.

The reason it fails is that, suite1's XML is empty and suite2's XML will have suite1's test results twice.

Possibly related to this sj26/rspec_junit_formatter#45

Might be a bit hard to replicate, as this doesn't happen on every run. Could be a concurrency issue of some sort, as the timestamps on the two XML files are the same.

InSpec and Platform Version

Running on CentOS 7 with:

inspec (1.7.2)
kitchen-inspec (0.17.0)
rspec_junit_formatter (0.2.3)
test-kitchen (1.14.2)
rspec (3.5.0)
rspec-core (3.5.4)

@chris-rock
Copy link
Contributor

Are you running kitchen-inspec with multiple suites in parallel?

@quulah
Copy link
Author

quulah commented Jan 2, 2017

Yeah, I had concurrency set to 3. After filing the bug, I set it to 1 after realizing that might be it.

Since then the problem hasn't popped up.

@chris-rock
Copy link
Contributor

This issue is related to inspec/kitchen-inspec#119. I expect it to be a general problem in kitchen inspec and not related to our junit reporter. If it is okay for you, lets track this in inspec/kitchen-inspec#119

@quulah
Copy link
Author

quulah commented Jan 2, 2017

Sure, let's do that.

@quulah quulah closed this as completed Jan 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants