I am looking at the documentation at MSDN for the "Microsoft Unit Test Framework for Managed Code" and I don't see how to run the tests from command line with VS 2015.
Is this documented by Microsoft somewhere? I have found a question that is correct for VS 2010, but I thought that in VS 2015 this stuff was rebuilt. I am currently trying to get this working for C# with a .NET 4 class library and .NET 4 framework application's code. Currently I have unit test assemblies that can only be manually run within the IDE.
I am trying to figure out if someone wants to build and run unit tests and integration tests on a build server, and those tests are built with the latest Visual Studio 2015 frameworks, if one still has to modify one's project msbuild files manually, install the entire Visual Studio tool on the CI-server/build-server in order to run the tests, and also if one has to manually edit one's MS BUILD project files to ADD command line test targets to it, which seems feeble to me. I was hoping Microsoft had improved this but it looks like the situation is as dire and lame as it was in 2010. As of 2010 era, only TFS toolking was provided, and anyone who doesn't use TFS was left out in the cold. Has this been improved in Visual Studio 2015?
Update: It looks like I can run MSTEST.exe /testcontainer:<dllname>
directly from the command line in Visual Studio 2015 developer command prompt. This works for my unit tests, but not for integration tests (which have a real data access layer). This seems easier than trying to get this working INSIDE msbuild. It looks like just like when MSTEST runs inside Visual Studio, each run produces an output folder, containing a binary copy of the .net assembly under test, and all its referenced assemblies. Maybe it's time to switch to xUnit, as MSTEST looks grotesque to me.
Aucun commentaire:
Enregistrer un commentaire