mardi 27 janvier 2015

Invoke-MsTest.psm1 not running tests

I'm trying to automate my C# Unit Tests via Powershell. I pulled down the Invoke-MsTest.psm1 from:


http://ift.tt/1v048mA


Is this outdated? I had to tweak the MSTest location as it was pointing to the wrong location. I've found that it doesn't locate all of my unit tests and includes two random dlls and the command that is supposed to start the tests doesn't do anything as far as I can tell.


This is the command generated (with some snipps in file paths.



/k " "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\MsTest.exe"
/testcontainer:C:\PROJECTPATH.UnitTests\bin\Debug\PROJECTNAME.dll
/testcontainer:C:\PROJECTPATH.UnitTesting\bin\Debug\TheJoyOfCode.QualityTools.dll
/testcontainer:C:\PROJECTPATH.UnitTesting\bin\Debug\TheJoyOfCode.QualityTools.dll
/resultsfile:"C:\Temp\InvokeMsTestResults 2015-01-27 04_25_11.trx" & Exit"


TheJoyOfCode.QualityTools.dll is not one of our unit test projects but I do find the dll at the indicated locations. I notice the script is looking for that dll.


Test is the project includes the unit test class



if ([Bool]($ProjectXml.SelectNodes('//dns:Project/dns:ItemGroup/dns:Reference', $ns) |
Where {$_.Include -match 'Microsoft.VisualStudio.QualityTools.UnitTestFramework'}))


I just don't understand why.


Before I waste any more time trying to debug this script, am I doing something wrong or is this script just outdated and should be discarded?


Using VS 2013.


Aucun commentaire:

Enregistrer un commentaire