How do I run (device) examinations in various folders/projects independently in Visual Studio?

I require some suggestions regarding just how I conveniently can divide trial run for device examinations and also integration examination in Visual Studio. Usually, or constantly, I structure the remedy as offered in the above image : different tasks for device examinations and also integration examinations. The device examines is run really regularly while the integration examinations normally is run when the context is appropriately straightened.

My objective is to in some way be able configure which examines (or examination folders) to run when I make use of a key-board faster way. The examinations need to ideally be run by a visual examination jogger (ReSharpers). So as an example

  • Alt+1 runs the examinations in task BLL.Test,
  • Alt+2 runs the examinations in task DAL.Tests,
  • Alt+3 runs them both (i.e. all the examinations in the [Tests ] folder, and also
  • Alt+4 runs the examinations in folder [Tests.Integration ]. have an alternative of running simply the examination in the picked folder or task by appropriate - clicking it and also select Run Test (s). Having the ability to do this, yet using a key-board command and also with a visual examination jogger would certainly be outstanding.

Currently I make use of VS2008, ReSharper 4 and also nUnit. Yet suggestions for an arrangement in the basic is certainly additionally valued.

2019-12-02 02:51:32
Source Share
Answers: 3

You can make use of a VS macro to parse the XML documents and afterwards call nunit.exe with the/ component command line argument to define which courses to run or create an option conserve documents and also run nunit making use of that.

2019-12-04 04:07:37

This is a little fiddly remedy, yet you can set up some external tools for each and every of team of examinations you intend to run. I'm not exactly sure if you'll have the ability to release the ReSharper examination jogger in this manner, yet you can run the console variation of nunit. As soon as you have of those devices arrangement, you can appointed keyboard faster ways to the commands "Tools.ExternalCommand1", "Tools.ExternalCommand2", etc

This will not actually range quite possibly, and also it is unpleasant to transform - yet it will certainly offer you keyboard faster ways for running your examinations. It does seem like there need to be a much less complex means of doing this.

2019-12-03 04:16:39

I in fact located sort of a remedy for this on my very own by utilizing key-board command bound to a macro. The macro was videotaped from the food selection Tools > Macros > Record TemporaryMacro. While videotaping I picked my [Tests ] folder and also ran ReSharpers UnitTest.ContextRun. This caused the adhering to macro,

Sub TemporaryMacro()
End Sub

which was after that bound to it is very own key-board command in Tools > Options > Environment > Keyboard.

Nonetheless, what would certainly be a lot more outstanding is an extra basic remedy where I can set up specifically which projects/folders/classes to run and also when. As an example by the methods of an xml documents. This can after that conveniently be signed in to variation control and also dispersed to every person that collaborates with the task.

2019-12-03 04:15:50