unit testing - Run MsTest separately from Visual Studio -


i looking tool either command line or gui copies changed assemblies solution separated folder - new build afterwards not influence test run. afterwards should executed configurable set of tests (only assemblies, filtering testcategories). when finished test results should shown.

is there tool or set of tools these tasks? mstest.exe run test not copy necessary assemblies.

using combination of mstest command line tool (or visual studio runner) in combination post-build step copy assemblies locally not good, because slow down every build, not run tests locally every time build solution. write little script copies necessary assemblies locally beforehand. hoping tool without me having write script.

copy files

to copy assemblies commandline can use standard copy command. copy "changed" assemblies harder, unless you're doing incremental builds.

xcopy, copy suffice here.

msbuild other tool can use copy files. can create post-build event or custom target doesn't run inside visual studio. run when set specific condition or call target explicitly commandline.

the handy fact msbuild @ least knows files required build files. note though, msbuild may know needed run tests. config files , dependencies of 3rd party references may needed too, not part of project.

i'm not aware of other tools. i'd opt write simple script, isn't hard , maintain.

run tests

there commandline vstest.console.exe happily run mstest based tests.

the syntax looks this:

 vstest.console.exe /testcasefilter:[ expression ] assemblyone.dll assembly2.dll 

note 1

every time run msbuild build assemblies build project, if msil generated same, assembly different, compiler assign new unique guid file.

so unless build incremental , detects there no need build file begin with, it's going generate unique files every time.

note 2

indeed, other mention, continuous integration tools or can build , run tests , create nice report you.

more advanced tools such or can run tests during deployment workflow when you're doing or better .


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -