TeamCity MSTest and TestList?

不羁岁月 提交于 2019-12-07 15:20:12

问题


In order to automate unit tests on TeamCity I had to create a test list in my vsmdi configuration file indicating that every test is part of a list I called CompleteCoverage. I dislike this a lot because in order to auto-run new tests I'll have to remember to include them on this list.

Is there some way to run every test in the solution using TeamCity and MSBuild (other than explicitly referencing the path to the output test assembly)?

Should I just drop MSTest and go for NUnit?


回答1:


I'm using NUnit instead of MSTest, but this should work for you, too:

I've named all my test assemblies to include .NUnit in their name, e.g. Basic.NUnit.dll. In the build step performing the tests, I've declared **/*.NUnit.dll as the assemblies to run. To make sure that they are run in the right location, I've added **/obj/**/*.NUnit.dll to the exclude list. Together with test categories to in- or exclude, I've got perfect control over which tests to run on a purely declarative level without to name the individual tests.



来源:https://stackoverflow.com/questions/9746917/teamcity-mstest-and-testlist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!