jeudi 27 avril 2017

How can I run tests from a folder other than the test project's output folder, using MSTest?

Scenario:

I have multiple C# projects in my solution. Each project is built to bin\Debug\. From there, the output from all the projects is copied to a few common output folders using a post-build step. The post-build also creates some necessary files in the common output folders, to create an environment ready to run the complete application. Each project with tests only goes to one of these output folders, but some other projects end up in every output location.


The problem is that my integration tests need to run from the common output folder, because they only work as part of the whole package. (This is because of some of the files created by the post-build, as well as some dynamically loaded assemblies from other projects that are not referenced.)

I've done some reading on test deployment, such as How to: Deploy Files for Tests. That page mentions being able to run tests "in a local test deployment folder on the same machine as the build." This sounds like what I need, but I cannot find any more details on this.

What is a deployment folder? How do I configure it to use a deployment folder? Can I point it to my common output folders and tell it to load and run tests from there? If so, how? If not, is there any other way to run tests based on the complete set of output from the entire solution, rather than just the output from the test project?

Aucun commentaire:

Enregistrer un commentaire