knapsack
knapsack copied to clipboard
Cucumber split by scenario and not feature
I created a report for my cucumber tests and it was broken down to the feature and not the scenario.
When running the tests in parallel, There seem to be a big difference between the fastest running node (14m) vs the slowest (35m). I think this is because some features are really big and some are not that much and since the splitting occurs on a feature level, it fails to split them correctly. That 35m one is actually a single feature.
Can you configure knapsack to generate a report and split cucumbers by scenario instead of features?
since the splitting occurs on a feature level, it fails to split them correctly
Tests are split based on the test file paths in the knapsack gem.
In the case of RSpec, it's possible to split based on test cases in knapsack_pro gem.
For Cucumber it's not possible yet. I'm not sure if Cucumber allows running individual test cases (a single scenario) from a given test file path like it does RSpec. In RSpec you can do bundle exec rspec spec/models/user_spec.rb:123
in order to run the test case from line 123. Do you know if Cucumber allows for something like that?