Created
November 20, 2018 08:10
-
-
Save christhesoul/f017983f55e5aa0767ed89662f241a70 to your computer and use it in GitHub Desktop.
Debugging a failing Circle CI container from the artifact XML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'pry' | |
path_to_xml = "xml/3.xml" | |
xml = File.open(path_to_xml) { |f| Nokogiri::XML(f) } | |
seed = xml.xpath('//property').attr('value') | |
tests = xml.xpath('//testcase').each_with_object([]) do |testcase, tests| | |
tests << testcase.attr('file') | |
end | |
puts "bin/rspec #{tests.uniq.join(' ')} --seed #{seed}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment