Testing WPF Applications

Applies to TestComplete 15.47, last modified on January 20, 2023

With TestComplete, you can test your 32-bit and 64-bit WPF applications. You can record and replay various interactions with WPF applications, such as navigation through the application’s screens, filling out forms, running menu commands. To ensure that the application under test functions properly, you can insert various checkpoints for verifying data, GUI element states and other items.

This section contains information specific to WPF application testing. For general information about creating and running automated tests for .NET-based applications with TestComplete, refer to the Working With TestComplete and Testing .NET Applications sections.

Note: Since WPF applications are .NET applications, basic concepts and features of testing .NET applications apply to WPF applications as well. So, we recommend that you read the Testing .NET Applications section before you proceed.

Basic Information and Requirements

About Testing WPF Applications

Explains basics of creating and recording tests for WPF applications, WPF object identification, Name Mapping and other concepts.

Supported WPF Technologies

Describes WPF application languages, compilers and .NET Framework versions supported by TestComplete.

Requirements for Testing WPF Applications

Describes plugins and settings required to test WPF applications.

Preparing XAML Browser Applications (XBAPs) for Testing

Describes security settings that XAML browser applications (XBAPs) must have in order to enable automated testing.

Creating Tests for WPF Applications

Addressing Objects in WPF Applications

Explains how to refer to the tested application’s GUI objects from tests using Name Mapping and without using Name Mapping.

Support for WPF Applications' Controls

Describes TestComplete automated testing support for WPF GUI objects.

Accessing Native Properties and Methods of WPF Objects

Explains how to get and set native properties of .NET objects and call native object methods in your tests.

Support for WPF Control Templates

Describes how to get access to elements of WPF control templates and item templates.

Specifics of Testing XAML Browser Applications (XBAPs)

Describes specifics of automating tests for XAML browser applications (XBAPs).

Related Topics of Interest

Testing .NET Applications

Provides general information about testing .NET applications with TestComplete.

Accessing Native Properties and Methods of .NET Objects

Explains how to get and set native properties of WPF objects and call native object methods in your tests.

Accessing Non-Visual Objects in .NET Applications

Explains how to get and set native properties of WPF objects and call native object methods in your tests.

Creating Instances of .NET Classes Defined in Applications

Explains how you can create .NET objects of classes used in your tested application, for example, to use them as parameters of native method calls.

Calling Functions From .NET Assemblies

Describes how to call functions defined in .NET assemblies directly from TestComplete scripts.

Working With TestComplete

Provides detailed information about automated testing of applications with TestComplete: creating, running and debugging automated tests, using checkpoints, analyzing test results and so on.

Working With Application Objects and Controls

Explains how to automate common operations on applications, windows and controls.

Classic Web Testing

Provides information about testing ASP.NET web applications with TestComplete.

Testing Silverlight Applications

Provides information about testing Silverlight applications with TestComplete.

Testing ClickOnce Applications

Provides information about testing of ClickOnce deployed WPF applications with TestComplete.

Samples

TestComplete includes a number of sample WPF applications and test projects for them. You can examine these samples to better understand how to implement some common automated testing scenarios.

Sample Location Description
<TestComplete Samples>\Desktop\Orders\WPF General-purpose testing sample for a sample C# WPF application, Orders.
<TestComplete Samples>\Desktop\Orders\WPF3D Example of testing a C# WPF application that uses customized controls and visualizations.

For information about sample applications and test projects included in TestComplete, see TestComplete Samples.

See Also

Desktop Application Testing
Applications Testing

Highlight search results