FAQ / knapsack_pro / Queue Mode problems & solutions for knapsack_pro gem

How to find seed in RSpec output when I use Queue Mode for RSpec?

In output for RSpec in knapsack_pro Queue Mode you may see message:

> INFO -- : [knapsack_pro] To retry in development the subset of tests fetched from API queue please run below command on your machine. If you use --order random then remember to add proper --seed 123 that you will find at the end of rspec command.
>
> INFO -- : [knapsack_pro] bundle exec rspec --default-path spec "spec/a_spec.rb" "spec/b_spec.rb"

The seed number is used by RSpec only when you tell it, you need to provide argument --order random:


bundle exec rake "knapsack_pro:queue:rspec[--order random]"

then in RSpec output you will see something like:

Randomized with seed 11055

You can use the seed number to run tests in development:


bundle exec rspec --seed 11055 --default-path spec "spec/a_spec.rb" "spec/b_spec.rb"

If you don't use RSpec argument --order random then you don't need to provide --seed number when you want to reproduce tests in development.

# Queue Mode problems & solutions for knapsack_pro gem
See questions outside of this category

Start using Knapsack Pro

Sign up and speed up your tests.