knapsack icon indicating copy to clipboard operation
knapsack copied to clipboard

Cucumber split by scenario and not feature

Open juggy opened this issue 3 years ago • 1 comments

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?

juggy avatar Jan 11 '22 01:01 juggy

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?

ArturT avatar Jan 18 '22 19:01 ArturT