获取受 C# 更改影响的测试
我有一个运行缓慢的测试套件,正在由多个开发人员不断开发。每次对代码库进行更改时,所有测试都会重新运行。该套件使用 XUnit。
我希望这样,当对多个测试使用的函数进行更改时,我们会得到所有受影响的测试的列表,并只运行这些测试。
潜在的解决方案:
- 将测试框架切换到内置此功能的微软(MSTest),尽管我不确定是否可以将受影响的测试导出到播放列表。
- 使用反射并自己计算需要根据更改运行哪些测试,尽管我觉得我需要整个代码库的前后来计算它。
是否值得切换到 MSTest,自己计算,或者是否有其他我不知道的解决方案。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论