Is there a Test Impact Analysis (TIA) framework/tool/extension for Python? E.g. an equivalent to JAVAs Test Impact Analysis Plugin for jQAssistant?
1 Answer
There are a few libraries out there you could try. Here are some entrypoints:
python-tia
- this is my preference- "Potential Alternatives" page in
pytest-tia
's docs. You can use this as a starting point to comparing alternatives.
Note that TIA is rarely perfect (especially imperfect in dynamic languages), so use with caution.
One pattern to consider is to use a mixed approach. I like to use TIA to exclude some slow tests on branches until they have a merge-request. So master, tags, and merge-requests run full suite. I'm using GitLabCI for this (only: ['merge_requests']
) but you can do it with some other tools too.
Lastly here are some reading materials.