Testing Out-of-Browser Silverlight Applications - Overview

Applies to TestComplete 14.30, last modified on November 21, 2019

This topic contains general information about testing out-of-browser Silverlight applications via the Microsoft UI Automation technology:

Basic Concepts

Silverlight applications are Rich Internet Applications (RIA) which are executed in web browsers. In-browser mode is the essential and most common way to use them, however Silverlight applications can also be launched in out-of-browser mode. In this mode the application is wrapped in a special utility (sllauncher.exe) and behaves like an ordinary desktop application.

When a Silverlight application is running in the browser, TestComplete treats it as Open Application and provides scripting access to native objects properties, fields and methods.

Unfortunately, out-of-browser Silverlight applications cannot be tested in this way. To test out-of-browser Silverlight applications, you can use the UI Automation technology. Using the UI Automation engine, TestComplete can simulate user actions over application controls, such as mouse clicks, keyboard input, and so on (see Simulating User Actions). However, this technology only partially exposes controls of Silverlight applications and does not provide full access to them.

TestComplete does not support Silverlight applications that are loaded by wrapper web pages directly from XAML files (.xaml) containing the applications’ source code. Due to some specifics of such applications, TestComplete cannot recognize the applications’ internal objects and does not provide access to them for testing. Thus, in order for a Silverlight application to be tested with TestComplete, the application must be compiled and packed to a .xap file from which a wrapper web page will load the application to run it.

Preparing the Testing Environment

In order to test a Silverlight application via UI Automation, you need to properly configure your testing environment. For detailed information about the required actions, read the Preparing Test Projects for Testing Out-of-Browser Silverlight Applications topic.

The Testing Process

You can create an automated test for a Silverlight application by recording interactions with the application and then modify the test if necessary, or you can create a test from scratch. For more information about creating and editing tests, see the following sections:

For easier control over your tested Silverlight application, you can add it to the Tested Applications collection of your test project (to learn how to do this, see Preparing Test Projects for Testing Out-of-Browser Silverlight Applications). This will allow you to quickly launch the application from the TestComplete IDE and from your tests. You can also command TestComplete to automatically open your Silverlight application when you start recording a test. For more information, see Running Tested Applications.

You can extend your tests by adding various checkpoints for verifying the application’s objects and state, parameterizing values and reading test data from external files. For more information, see:

When a test is running, TestComplete performs test operations and logs the result of each operation. You can run a single test, as well as a series of tests one after another. Tests can be run from the TestComplete IDE or from the command line. See Running Tests.

For complete information about the testing process, see Working With TestComplete.

What Silverlight Methods and Properties Are Available for Testing

When testing your out-of-browser Silverlight application using the UI Automation engine, you can recognize visual objects and the objects obtained from UI Automation providers.

Details

See Also

Testing Out-of-Browser Silverlight Applications
Supported Development Tools
Testing Out-of-Browser Silverlight Applications - Requirements

Highlight search results