zi663227 发表于 2018-1-7 20:34:52

Jenkins With SVN MSBuild MSTest StyleCope

  It’s really a big problem to run MSTest with app.config in the Jenkins for the MSTest plug-in will run the cmd with the parameter /noisolate and you can not get the app.config at all.
MSTest Noisolate Issure
  You can google this question and find many guys meet these issure too but I can not find the solution at all.
  There are so many suggestions but they all can not work at all.
Run MSTest by Command
  At last, I realize that just run a bat to excute the MSTest.exe with the parameters we want.
  del "C:\Program Files (x86)\Jenkins\jobs\aa\workspace\result.xml"
  cd "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\"
  mstest /testcontainer:"C:\Program Files (x86)\Jenkins\jobs\aa\workspace\aa\AA_UnitTest\bin\Release\AA_UnitTest.dll" /resultsfile:"C:\Program Files (x86)\Jenkins\jobs\AA\workspace\result.xml"
  Note:
  You must delete the result.xml first before you excute the new MSTest or you can always create a new one.
  You must create the result.xml, otherwise you can not excute the MSTest.
  Hope you enjoy it!
页: [1]
查看完整版本: Jenkins With SVN MSBuild MSTest StyleCope