mardi 22 mars 2022

Get tests affected by changes in C#

I have a slow running test suite that is under constant development from multiple developers. Every time a change is made to the codebase all tests are rerun. The suite uses XUnit.

I want it so when a change is made to a function, that multiple tests use, we get a list of all the tests affected and run just those tests.

Potential solutions:

  • Switch the testing framework to Microsoft's (MSTest) which has this feature built in, though I am unsure if I can export the affected tests to a playlist.
  • Use reflection and calculate myself what tests need to be run based upon changes though I feel I would need a before and after of the whole codebase to calculate that.

Is it worth the switch to MSTest, calculating myself, or is there another solution I am unaware of.





Aucun commentaire:

Enregistrer un commentaire