Codify runner feature support#441
Conversation
60ba449 to
328c672
Compare
| // Splitting files by example is only supported for rspec, cucumber, and pytest runners | ||
| if runner.Name() != "RSpec" && runner.Name() != "Cucumber" && runner.Name() != "pytest" { | ||
| // Short circuit here if the runner doesn't support split by example | ||
| if !runner.SupportedFeatures().SplitByExample { |
aefc81d to
fbeccf3
Compare
fbeccf3 to
27aca7e
Compare
27aca7e to
a824a76
Compare
| | Feature | RSpec | Jest | Playwright | Cypress | pytest | pytest-pants | gotest | Cucumber | NUnit | Custom test runner | | ||
| | --- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | ||
| | Split tests by file[^1] | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | ✅ | ✅ | | ||
| | [Split slow files by individual test example](https://github.com/buildkite/test-engine-client/blob/main/docs/rspec.md#split-slow-files-by-individual-test-example) | ✅ | ❌ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ | ❌ | ❌ | |
There was a problem hiding this comment.
The table has been updated with the output from go run util/supported_features/main.go
The diff of the 2 tables can be inspected visually with the "Display the rich diff" button in the file header.
The only differences in content are slight changes in the runner names in the header, and "Split by example" is corrected from false to true for Playwright.
There was a problem hiding this comment.
That can be replaced with runner.SupportedFeatures().FilterTestsByTag
There was a problem hiding this comment.
I've tried to keep the touch and time to merge minimal with this PR by just including one cleanup example, and intend on following up over time with others.
I can try and clean everything up in this single PR if you like, LMK.
This is a proof of concept of embedding the features supported by each runner in the runner implementation.
Aim here is to solve a few problems:
request_param.go. There are others but I haven't implemented all of them in this WIP.README.mdfrom code. This has accumulated some drift over time in the past and required manual fixups. To prove the point there is fix for drift included in this PR :)Fixes TE-5965