Question:
What could I try for doing Test Impact Analysis for Python projects?
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.
copied from my answer here to help me remember it