visual studio - Forcing MSTest to use a single thread -


given test fixture:

[testclass] public class mstestthreads {     [testmethod]     public void test1()     {         trace.writeline(thread.currentthread.managedthreadid);     }      [testmethod]     public void test2()     {         trace.writeline(thread.currentthread.managedthreadid);     } } 

running test mstest through visual studio or command line prints 2 different thread numbers (yet run sequentially anyway).

is there way force mstest run them using single thread?

i've fought endless hours make mstest run in single threaded mode on large project made heavy use of nhibernate , it's not-thread-safe (not problem, it's not) isession.

we ended more time writing code support multi-threaded nature of mstest because -to best of , teams knowledge - not possible run mstest in single threaded mode.


Comments

Popular posts from this blog

jQuery clickable div with working mailto link inside -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -

java - Getting corefrences with Standard corenlp package -