Integrate Silverlight Unit Testing with Visual Studio 2008 Test Results Panel? - unit-testing

I would like to run my Silverlight Unit Tests from Visual Studio instead of opening a new instance of my Silverlight Test App in the browser.
Apparently it is possible (http://www.jeff.wilcox.name/2008/09/rc0-new-test-features/ - search for "Visual Studio Team Test log provider output")....but I don't understand how you enable this, does anyone know how?
Would be great if these tests would run from the "Run All Tests in Solution" button (Ctrl+R, A).

The blog post you referenced clearly states that this is output only and does not integrate Silverlight UT with Visual Studio Team Testing System. It will simply output into a TRX format that can then be opened in that window within Visual Studio. You still cannot run your Silverlight tests from a vsmdi, you will need to run them from within the web browser test harness.
I agree it would be great if the tests would run from the "Run All Tests in Solution" button, but that is not possible with the current tools today.

I have written a blog post about how to get the Silverlight Testing Framework to output the Visual Studio "TestResults.trx" log files. I couldn't find anything about how to do this anywhere else.

Related

Troubles with executions of automation tests with Test Explorer in Visual Studio and MSTest

I use in my project SpecFlow to provide automation testing of web-site(with Selenium). I want create end-to-end test suite for provide full checking of project according to BDD. When I create tests playlist in test explorer in Visual Studio and start all tests in playlist all my tests launch according to their alphabetic name. But when I restart project and start this playlist newly all my tests launch in the wrong order. I think, that this problem may be because of rebuild playlist file, but I'm not sure. Could You help me, please?
TestRunner - MSTest

Angular (Typescript) Unit Testing - ASP.Net Core MVC SPA

I am developing a project which started life as an ASP.Net Core MVC SPA Template in Visual Studio 2015. I used the Visual Studio Karma Test Adapter with no problems for my Angular (Typescript) unit testing, but no matter what I tried I could not get NUnit to recognise my C# unit tests for the Web API and early Domain Model code. I tried to add a separate Test Project with no success and I also created unit test files within the same, single, project with no success.
At some point I knew I should migrate the code to Visual Studio 2017, as I feel that the new IDE will prove to be beneficial as the project develops, so I thought I would do it now and see if it solves my unit testing problems. Visual Studio's migration process didn't go well so I decided to start from scratch again.
I ran dotnet new angular to create a clean solution which I opened in VS 2017. It appears that the Visual Studio Karma Test Adapter does not work with VS 2017 yet, so for the Typescript (Jasmine) testing that left me with Chutzpah. No matter what I try I cannot write the simplest of Jasmine tests and have the Visual Studio Test Explorer recognise it (let alone run the test). I haven't even begun to look at the C# Unit Testing yet.
Can anyone else get a Jasmine Unit Test to be recognised and run in the VS Test Explorer from a clean dotnet new angular solution, I would be very grateful for some advise.

Why can't I run Nunit tests from Visual Studio when colleague can?

My code has NUnit tests. My colleague is able to run the tests from within Visual Studio on their desktop, however I can't run them on mine. When I try to use Test Explorer and "Run All", it just builds the project. Other options, such as Run Tests and Debug Tests also give the same result.
I have NUnit referenced in my project, why can't I run the tests from within Visual Studio?
Out of the box, Visual Studio doesn't have support for running tests built for the NUnit framework. As has been said in the the comments, your colleague probably has some kind of add-in like Resharper installed which adds in support for running Nunit tests.
If you don't have a license for whatever tool they're using, then you can still have visual studio integrated support for running/debugging NUnit tests by installing the NUnit Test Adapter. This is a free plugin that you can install into your solution via NuGet.
He may also be running the MS test adapter which you can get from the nunit site

How can I continuously run unit tests in Visual Studio 2012 Professional?

Visual Studio 2012 added a "Run tests after build" button in the Unit Test Explorer, but it seems that option is not available in the Professional edition. In fact, my "Unit Test Explorer" is just called "Test Explorer", and doesn't have that button at all:
Are there any extensions which can replace this missing feature? Something that integrates with the existing test explorer UI would be ideal. (Free options are also preferred, since if I could convince my corporate overlords to shell out for VS Ultimate/Premium, this wouldn't be an issue anyway)
I remapped my F6 key to TestExplorer.RunAllTests instead of the default of Build.BuildSolution
Build.BuildSolution gets remapped to Ctrl-Shift-B when you do that.
It works well because now my F6 reflex RunAllTests saves any modified files, builds my solution and runs my unit tests.
The only thing I had to change is my window layout so that I can see the Test Explorer Window, that way I know if any tests failed.
Updating the answer with a link to a blog I wrote about this
The "Run Tests After Build" and "Profile Test" features are available in Premimum and Ultimate editions of Visual Studio 2012.
NCrunch is not free but it's well worth the money and superior to any and all test running features in Visual Studio, regardless of edition.
You could also have a look at http://www.continuoustests.com/ aka Mighty Moose.
It's not quite as slick as NCrunch, but it is free.

How to write unit test for Visual studio package

I am now working on a visual studio package project, currently all our tests just simulates the way we interact with visual studio with windows open and close, menus selection, button click and so on.I think these tests can be classified as integrated test and they highly depends on the devenv.exe process. For pure unit test, I just want to test one of my business logic and mock other dependencies.Although visual studio SDK contains a test library under the path VisualStudioIntegration\Common\Source\CSharp\UnitTest in SDK folder, I found it a too simple project, too young to be used in my project. When I tried to write unit test from scratch, I got a lot of problems with mocking VSX interfaces. Also there is so little resources about VSX unit test, Can anyone give me some hints or links about this? Any help is appreciated.
In my case, I needed to launch and control Visual Studio from a control program to run some developer studies.
Basically, why not just have your tests run your plugin in the experimental hive on a programmatic instance?
This was a helpful resource for launching an instance of Visual Studio through COM:
http://blogs.msdn.com/b/kirillosenkov/archive/2009/03/03/how-to-start-visual-studio-programmatically.aspx