-
Notifications
You must be signed in to change notification settings - Fork 681
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
Functional JUnit reporter #1454
Conversation
75d375c
to
7cabd42
Compare
Is there any SOP for digging deeper here on the travis build? not seeing the same failure when running functional tests on the macbook |
no change, rerun, different failure 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome improvement @jkerry Could you please rebase on latest master?
@@ -748,13 +748,73 @@ def status_type(example) | |||
end | |||
end | |||
|
|||
class InspecRspecJUnit < RSpecJUnitFormatter | |||
class InspecRspecJUnit < InspecRspecJson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is so good to see that this is now based on our InSpec JSON generator. Awesome @jkerry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small misspelling. otherwise, approved :)
lib/inspec/rspec_json_formatter.rb
Outdated
end | ||
|
||
def build_result_xml(xml, control, result) | ||
test_class = control[:title].nil? ? 'Anonymnous' : control[:id] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Anonymous" is misspelled here.
7cabd42
to
8a5ccdc
Compare
Added! one peculiarity I noticed while developing this is if a case is explicitly skipped with a guard it won't show up in the json output as 'skipped'. It is simply omitted from the output. Is that a feature or a bug? A case that describes, say, a file that isn't present shows in the output as skipped. |
Doh, rebase busted the tests. I'll get this handled today |
@chris-rock I don't believe it's related to the rb-readline issues because we'd be seeing a bunch of
|
…test node as a result
…nctional tests Signed-off-by: jkerry <[email protected]>
Signed-off-by: John Kerry <[email protected]>
8a5ccdc
to
e0ae7eb
Compare
Yeah, this was on me. I ran a rebase and force push off of a stale local repo. I can't run functional tests on a windows development box so the real source of truth was on the macbook. |
@chris-rock @adamleff technically this was a history rewrite so you might want to revisit the code review just in case |
Thank you for the additional effort @jkerry |
Thank you, @jkerry - this looks great. We greatly appreciate your contribution! |
Woot! @jkerry thanks so much! |
In #1454, we welcomed a newly-revamped JUnit formatter which has a dependency on Nokogiri. Unfortunately, this had led us to problems getting InSpec included in Chef omnibus builds (see chef/chef#5937) because Chef is using Ruby 2.4.1 and the Nokogiri maintainers have not yet released a windows binary gem that supports Ruby 2.4.x. This has led to breaking builds in Chef's CI platform and would block the acceptance of chef/chef#5937. This change replaces Nokogiri use with REXML instead. While REXML can be slower than Nokogiri, it does not require native extensions and is supported on all Chef platforms. Signed-off-by: Adam Leff <[email protected]>
resolves #1438 by removing the gem based junit reporter and manually rolling up JUnit formatted XML based on the JSON reporter's @output_hash.
Some minor ancillary changes: