Skip to content

Instantly share code, notes, and snippets.

@ArturT
Created March 20, 2023 18:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ArturT/bd13bf65ad43d1d7b6b24f66f86cfa57 to your computer and use it in GitHub Desktop.
Save ArturT/bd13bf65ad43d1d7b6b24f66f86cfa57 to your computer and use it in GitHub Desktop.
Preview executed tests in Knapsack Pro Queue Mode for RSpec
KnapsackPro::Hooks::Queue.after_subset_queue do |queue_id, subset_queue_id|
puts '\\'*100
puts 'Executed tests for a batch of tests fetched from Queue API'
Dir.glob(".knapsack_pro/queue/#{queue_id}/*.json").each do |file|
report = JSON.parse(File.read(file))
puts report.inspect
end
puts '/'*100
end
KnapsackPro::Hooks::Queue.after_queue do |queue_id|
puts '\\'*100
puts 'Summary of all executed tests'
Dir.glob(".knapsack_pro/queue/#{queue_id}/*.json").each do |file|
report = JSON.parse(File.read(file))
puts report.inspect
end
puts '/'*100
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment