How can I run all unit tests in different sessions?

In Resharper I have an ability to start each unit test in different session.
It will be very useful if i can do that for all unit my unit tests in one time by some way.
Can I do this via some interface or by writing my own plugin for resharper?
P.S. If resharper can run any one unot test in new session and can run all unit tests so I thoght this is possible in theory to start all unit tests in its own sessions
P.P.S Desirable result is to run all tests parallel and do no spent time for delays in tests.

Comment actions Permalink

You can write a plugin that creates new test sessions and adds unit test elements, and you should also be able to run these sessions. I'm not sure if ReSharper supports running multiple sessions in parallel. I'm also not sure this would help speed up test runs. Creating and managing too many sessions might create more of an overhead, and take longer than simply running the tests serially (each session will cause a new process to run that hosts the test assembly and runs the tests. It also usually shadow copies the test assemblies. Too many sessions running would cause lots of activity trying to create all of the shadow copy directories. This activity might actually slow things down).

One thing you can do is to run your test assemblies in parallel. This means ReSharper will run tests in more than one assembly at the same time. I believe this is disabled by default (ReSharper cannot be certain that you aren't doing something crazy in your tests with shared state that each of your assemblies is trying to look at - e.g. a shared database). You can set it up in the ReSharper -> Options -> Unit Testing options dialog.


Comment actions Permalink

We try that way


Please sign in to leave a comment.