[英]Is it possible to install vstest.console.exe 2013 with vstudio 2019?
[英]VS 2019 Automating Build and Test with MSBuild.exe and VSTest.console.exe
我的家庭自动化如下(我使用bash shell):
cd c:/tmp
rm -rf myproj
git clone <repo-url>/myproj -b releaseX
cd myproj
// Get the NuGet packages
msbuild.exe -t:restore
wait
// Build my Release Version
msbuild.exe myproj.sln -t:Rebuild -p:Configuration=Release
wait
// Run my Unit Tests that I keep in a UnitTest dir
vstest.console.exe UnitTests/bin/Release/netcoreapp2.2/UnitTests.dll
wait
除了具有一些硬编码的目录名或项目名之外,这是VSTest环境自动化的有效方法吗? 我的目标是每晚实现一个简洁的构建和测试环境。
您的方法没有错,它将起作用。
我对您的建议:
dotnet test
,而不必直接调用vstest.console.exe。 这样可以避免必须指定二进制文件的确切路径, dotnet
命令dotnet
它们的位置。 dotnet restore
和dotnet build
来代替msbuild
等效项。 除了变得更“现代”之外,这样做没有太大的好处。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.