Tutorial :TestDriven.NET runner not working with Silverlight 3 and MSTest



Question:

I am currently working on a project in Visual Studio 2010 that uses MSTest for Silverlight. I had recently converted this project from Visual Studio 2008 where the Silverlight-based tests ran without issue. However, when I try to run the unit tests at a test class scope (or beyond, i.e. "run all tests") in VS 2010 with TestDriven.NET I get the following error:

The target type doesn't contain tests from a known test framework or a 'Main' method.

If a test doesn't require any setup method or constructor, TestDriven.NET will run an individual test. It would appear to me that for some reason it isn't executing [TestInitialize] decorated test method.

Any thoughts?


Solution:1

What do you mean by "MSTest for Silverlight"?

1

You cant use traditional unit testing frameworks, because they are not built against Silverlight libraries (e.g. the VS2010 Test project)
That's the reason why Microsoft came up with the "Silverlight Unit Test Framework"

2

Tests in "Silverlight Unit Testing Framework" can run only in a browser, not the Testdriven .NET runner


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »