visual studio 2012 - Specifying results filename for vstest.console.exe -


may silly question, know how specify output filename of vstest.console.exe run? command line follows:

 vstest.console.exe [assembly] /logger:trx 

at end of run, following comes in console:

 resultsfile: somepath\testresults\{username}_{workstation} {timestamp}.trx 

i tried using .runsettings file specify output location, seems control output directory, not output file. have not found else seem control it.

i want parse trx file , generate report out of (this works, if can't specify output path of trx file, won't know pick in scripts!)

i have missing here...

nope, you're not missing anything. trx logger doesn't support parameters (unlike tfs publisher logger).

the logger assembly located in "c:\program files (x86)\microsoft visual studio 11.0\common7\ide\commonextensions\microsoft\testwindow\extensions\microsoft.visualstudio.testplatform.extensions.trxlogger.dll". if check out in favorite .net decompiler, you'll see method trxlogger.gettrxfilename. uses basic knowledge current test run produce mangled name of form {username}_{workstation} {timestamp}.trx , in no appreciable way configurable.

as far can tell, trx file created in testresults\ folder under current working directory unless otherwise configured. can is:

  • create new temporary folder
  • change current directory it
  • run test runner
  • scan folder result .trx file using favorite recursive file search method , you're done

at least in our build (msbuild, sob):

<itemgroup>   <testresult include="**\*.trx"/> </itemgroup> 

i.e, gather .trx files under current directory , stuff them @(testresult) item group further processing.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -