- After you have finished your code about test, go build=>rebuild the solution. (no need to use test explorer)
- When rebuild succeeds, find the .dll file of your unit test project and copy the path of this file. (In my test, it’s UnitTestProject3.dll)
- Open the ‘developer command prompt for VS’. And then type “cd path” command to locate the file which contains the dll file. (The path is what you copy in step2)
- After that, type “vstest.console.exe UnitTestProject3.dll /logger:trx”. Then you can see the test result in the window, also you can find the sentence like this “Results file: …path\name.trx”
- That is the test result file you want, and you can convert it from xml to HTML by using third-party tools such like trxer. You can type “TrxerConsole.exe TestResultFileName.trx” in cmd to convert it to HTML using trxer.
Wednesday, June 5, 2019
Test reporting for MSunit testing
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment