-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add extension points to the test runner to support user defined behaviour #2225
Comments
Relates, in part, to my request here as well. |
In case it helps focus the discussion, feel free to use this PyTest config from one of my open source projects as an example. Some of the most notable features here are:
|
It is also worth noting that, for each of these hooks and extension points PyTest passes relevant contextual information to each callback so you can make informed decisions based on the current / active state of the runner. Like, being able to see not only a complete list of all tests in the suite, but also which tests are enabled/disabled, which are selected / filtered for the current run, etc. This information is invaluable to being able to take full advantage of the various hooks. |
Coming from a Python background where I have made extensive use of the
pytest
library, I became accustomed to the level of customizability the library offered. One of the most powerful / useful features of it are it's extensible fixtures. These allow users to heavily customize the mechanics of the test runner via a set of hooks / extension points, allowing custom behaviour to be "injected" into various parts of the runner sequencing. Some of the most notable features are:These are just a few examples of the kinds of extension points that I haven't been able to find comparables for in the Dart testing framework. I did notice that there were some plans to add support for plugins to the test runner, but I'm not sure the tasks I found there offer nearly the same level of customization that other test frameworks like PyTest offer. In particular, the ones that allow for scoping of test fixtures to different levels, and hooking into specific stages with the test orchestration pipeline. Such features greatly enhance the ability of developers to customize the behaviour for unique workflows.
Below are some workflows that I've used personally in other test suites that would benefit greatly from having this flexibility:
I know this enhancement request is intentionally open ended, but I thought it might be good to create a starting point for discussion on various options for adding extension points like what I've just described and then maybe branch it off to more specific line items depending on which ones are most feasible.
The text was updated successfully, but these errors were encountered: