Skip to content

Add after subset queue hook and example how to use JUnit formatter in Queue Mode#41

Merged
ArturT merged 8 commits intomasterfrom
queue-hooks
May 26, 2017
Merged

Add after subset queue hook and example how to use JUnit formatter in Queue Mode#41
ArturT merged 8 commits intomasterfrom
queue-hooks

Conversation

@ArturT
Copy link
Copy Markdown
Member

@ArturT ArturT commented May 22, 2017

Related to issue: #40

Here is example of hook usage: KnapsackPro/rails-app-with-knapsack_pro#6


def after_subset_queue(&block)
@after_subset_queue ||= block
end
Copy link
Copy Markdown

@bobbytables bobbytables May 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution would at least allow us to rename the file that we output the results to. So I think this is actually a fine solution. Because in our spec_helper.rb we can do:

KnapsackPro::Hooks::Queue.after_subset_queue do |queue_id, subset_queue_id|
  FileUtils.mv('tmp/rspec.xml', "tmp/rspec_#{SecureRandom.hex(10)}.xml")
end

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, I tried that here https://github.com/KnapsackPro/rails-app-with-knapsack_pro/pull/6/files but there is another problem described here #40 (comment)

@ArturT ArturT changed the title Add after subset queue hook Add after subset queue hook and example how to use JUnit formatter in Queue Mode May 26, 2017
@ArturT ArturT merged commit d41ffae into master May 26, 2017
@ArturT ArturT deleted the queue-hooks branch May 26, 2017 11:27
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

Successfully merging this pull request may close these issues.

2 participants