Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ninject and multiple MSTest(s) in an test assembly #369

Open
FrederickBrier opened this issue Dec 11, 2019 · 0 comments
Open

Ninject and multiple MSTest(s) in an test assembly #369

FrederickBrier opened this issue Dec 11, 2019 · 0 comments

Comments

@FrederickBrier
Copy link

I have read lots of posts about not creating multiple Ninject kernels in a single process. We have avoided doing that even in tests. However, it appears that vstest.console.exe and Visual Studio when running [TestClass] tagged MSTest classes are running them all in the same process. Not even in separate AppDomain(s). So my tests fail when run together, and pass when run individually. So several questions. Is there a way to completely clean up all Ninject kernels in perhaps the [ClassCleanup] tagged method, so that it does not mess with the next test? Is there a technique to run multiple MSTest(s) with Ninject, such as a custom TestAdapter that implements ITestExecutor? As a sanity check, should you be able to normally run multiple MSTest(s) with Ninject kernels, and another issue is causing the tests to fail? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant