README.md in knapsack_pro-0.26.0 vs README.md in knapsack_pro-0.27.0
- old
+ new
@@ -106,10 +106,12 @@
- [How to make knapsack_pro works for forked repositories of my project?](#how-to-make-knapsack_pro-works-for-forked-repositories-of-my-project)
- [Questions around data usage and security](#questions-around-data-usage-and-security)
- [What data is sent to your servers?](#what-data-is-sent-to-your-servers)
- [How is that data secured?](#how-is-that-data-secured)
- [Who has access to the data?](#who-has-access-to-the-data)
+ - [Why when I use Queue Mode for RSpec and test fails then I see multiple times info about failed test in RSpec result?](#why-when-i-use-queue-mode-for-rspec-and-test-fails-then-i-see-multiple-times-info-about-failed-test-in-rspec-result)
+ - [Does in Queue Mode the RSpec is initialized many times that causes Rails load over and over again?](#does-in-queue-mode-the-rspec-is-initialized-many-times-that-causes-rails-load-over-and-over-again)
- [Gem tests](#gem-tests)
- [Spec](#spec)
- [Contributing](#contributing)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@@ -323,12 +325,14 @@
On the Knapsack Pro API side, there is test files queue generated for your CI build. Each of CI node dynamically asks the Knapsack Pro API for test files
that should be executed. Thanks to that each CI node will finish tests at the same time.
### How to use queue mode?
-Please use this command to run queue mode:
+Please use different API token for queue mode than for regular mode.
+Use this command to run queue mode:
+
bundle exec rake knapsack_pro:queue:rspec
If above command fails then you may need to explicitly pass an argument to require `rails_helper` file or `spec_helper` in case you are not doing this in some of your test files:
bundle exec rake "knapsack_pro:queue:rspec[--require rails_helper]"
@@ -336,10 +340,13 @@
Note if you will run queue mode command for the first time it might be slower.
The second build should have better optimal test suite split.
### Additional info about queue mode
+* You should use different API token for queue mode than for regular mode to avoid problem with test suite split in case you would like to go back to regular mode.
+There might be some cached test suite splits for git commits you run in past for API token you used in queue mode because of the [flag `KNAPSACK_PRO_FIXED_TEST_SUITE_SPLIT=true` for regular mode which is default](#knapsack_pro_fixed_test_suite_splite-test-suite-split-based-on-seed).
+
* If you are not using one of [supported CI providers](#supported-ci-providers) then please note that knapsack_pro gem doesn't know what is CI build ID in order to generated queue for particular CI build. This may result in two different CI builds taking tests from the same queue when CI builds are running at the same time against the same git commit.
To avoid this you can specify unique `KNAPSACK_PRO_CI_NODE_BUILD_ID` environment variable for each CI build. This mean that each CI node that is part of particular CI build should have the same value for `KNAPSACK_PRO_CI_NODE_BUILD_ID`.
* Note that in the Queue Mode by default you cannot retry the failed CI node with exactly the same subset of tests that were run on the CI node in the first place. It's possible in regular mode ([read more](#knapsack_pro_fixed_test_suite_splite-test-suite-split-based-on-seed)). If you want to have similar behavior in Queue Mode you need to explicitly [enable it](#knapsack_pro_fixed_queue_split-remember-queue-split-on-retry-ci-node).
@@ -817,9 +824,20 @@
I’m the only admin so I can preview data in case you need help with debugging some problem etc. I’m not able to decrypt them without knowing the salt.
When you sign in to your user dashboard then you can preview data for recent 100 builds on CI. If the test file paths are encrypted then you only see hashes for test file paths.
You need to [decrypt](#how-to-debug-test-file-names) them locally on your machine to find out what each test file hash is.
+
+### Why when I use Queue Mode for RSpec and test fails then I see multiple times info about failed test in RSpec result?
+
+RSpec collects information about failed tests and presents it at the end of RSpec result.
+When you use Queue Mode then knapack_pro does multiple requests to Knapsack Pro API and fetches a few test files to execute.
+This means RSpec will remember failed tests so far and it will present them at the end of each executed test subset.
+You can see the list of all failed test files at the end of knapack_pro queue mode command.
+
+### Does in Queue Mode the RSpec is initialized many times that causes Rails load over and over again?
+
+No. In Queue Mode the RSpec configuration is updated every time when knapsack_pro gem gets a new set of test files from the Knapsack Pro API and it looks in knapsack_pro output like RSpec was loaded many times but in fact, it loads your project environment only once.
## Gem tests
### Spec