Home > Testing > Silverlight testing framework support in the Unit Testing Service

Silverlight testing framework support in the Unit Testing Service

August 16th, 2011

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:

CodeRush New Silverlight Testing Project dialog

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:

CodeRush New Silverlight test case in the code editor

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:

CodeRush Silverlight test case with testing icon

When you run a test case, the CodeRush Silverlight TestRunner window appears. It uses native support for running Silverlight unit test cases:

DevExpress CodeRush Silverlight Test Runner

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

Similar Posts:

  1. No comments yet. Be the first and leave a comment!