Skip to content

Instantly share code, notes, and snippets.

@christhesoul
Created November 20, 2018 08:10
Show Gist options
  • Save christhesoul/f017983f55e5aa0767ed89662f241a70 to your computer and use it in GitHub Desktop.
Save christhesoul/f017983f55e5aa0767ed89662f241a70 to your computer and use it in GitHub Desktop.
Debugging a failing Circle CI container from the artifact XML
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