Silverlight testing framework support in the Unit Testing Service
The CodeRush Unit Test Runner supports running tests from the Silverlight Unit Test Framework which is a part of Silverlight Toolkit now, so it’s easy to test your Silverlight applications.
Once you install the Silverlight Unit Test Framework, you are able to create the Silverlight Unit Test Application project. Here is what the Add Project dialog looks with the Silverlight tab highlighted:
If you create this type of a project, you will get the source file containing a single test case. If you ever worked with Microsoft unit testing in Visual Studio, you will find the API quite familiar, including all key classes, attributes and namespaces: the TestClass attribute identifies the class that contains unit tests. The TestMethod attribute identifies methods that represent a single unit test case. Description attribute data will be shown in a runner UI when unit tests are run. You can see the testing icons appeared immediately over the test case:
The test case is ready to run – you don’t have to install any other assemblies or tweak any testing settings. All you need is justto click an icon and choose whether to run or debug the test case:
When you run a test case, the CodeRush Silverlight TestRunner window appears. It uses native support for running Silverlight unit test cases:
After tests are run, the Silverlight Test Runner will be automatically closed, and you can see the test run summary in the Visual Studio output window, inside the Unit Test Runner tool window or right in the code editor.
—– Products: CodeRush Pro Versions: 12.1 and up VS IDEs: any Updated: Oct/29/2012 ID: C120