Coded UI support
The purpose of this section is to show you how to create a simple CodedUI test.
For more information about Creating, Editing and Maintaining a Coded UI Test check out the official page in MSDN here.
For Visual Studio versions 2017 and later, please make sure that you have Installed the coded UI test component as it is not installed automatically.
The supported Visual Studio editions for coded UI tests are Microsoft Visual Studio Ultimate, Premium and Enterprise. You can also check Supported Configurations and Platforms for Coded UI Tests and Action Recordings.
Coded UI is supported up to Visual Studio 2019. Visual Studio 2022 droppped the Coded UI feature.
In order to create a CodedUI test, you need to perform the following steps:
-
Add the Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore assembly into the following directory (for 64-bit operating system):
For Microsoft Visual Studio 2010: "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\10.0\UITestExtensionPackages".
For Microsoft Visual Studio 2012: "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\11.0\UITestExtensionPackages".
For Microsoft Visual Studio 2013: "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\12.0\UITestExtensionPackages".
For Microsoft Visual Studio 2015: "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\14.0\UITestExtensionPackages" - added with version 2015 Q2 SP.
For Microsoft Visual Studio 2017: "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\15.0\UITestExtensionPackages" - added with version 2017 R1.
For Microsoft Visual Studio 2019: "%CommonProgramFiles(x86)%\Microsoft Shared\VSTT\16.0\UITestExtensionPackages" - added with version 2019 R1.
For 32-bit operating systems, the path should be "%CommonProgramFiles%\Microsoft Shared\VSTT\[Version]\UITestExtensionPackages".
You can find the Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore.dll file in the UI for WPF installation folder - usually C:\Program Files\Progress\Telerik UI for WPF [version]\Binaries\WPF40\TestTools\VS[version]\
-
The Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore assembly must be installed into the global assembly cache (GAC). You can achieve this following the next steps:
- Open Visual Studio Command Prompt.
- Navigate to path "%CommonProgramFiles(x86)%\microsoft shared\VSTT\[Version]\UITestExtensionPackages".
- Execute "gacutil /i Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore.dll".
You can also find more information on the Global Assembly Cache Tool (Gacutil.exe).
Create WPF Project with the control you want to test.
Add a new TestProject.
Add new item to TestProject - Coded UI Test. The Generate Code for Coded UI Test dialog box appears.
Select the Record actions, edit UI map or add assertions option and choose OK. For more information about the options in the dialog box, you could check the Use UI Automation To Test Your Code MSDN article.
Record a sequence of actions.
Verify the values in UI properties.
Run the test.
Below you can find information about the supported level of CodedUI tests throughout our controls.
There is Level 2 and Level 3 Coded UI test support across our controls. For exceptions see bellow.
Q2 2015
The controls that currently do not support Level 2 and Level 3 Coded UI tests are listed bellow:
Control | Level 1 | Level 2 | Level 3 |
---|---|---|---|
RadChart | No | No* | No* |
RadGanttView | Yes | No | No |
RadPivotGrid | Yes | No | No |
RadScheduleView | Yes | No | No |
Use RadChartView instead of RadChart. For more information, please go through the RadChart vs. RadChartView article.
Q2 2014
With Q2 2014 release of Telerik UI for WPF we have included Level 4 Coded UI test support for two of our controls. The following table gives more details on the controls as well as the supported actions:
Control | Action | Occurs | Action Property |
---|---|---|---|
RadComboBox | SetValueAction | On selection | SelectedItem |
RadDateTimePicker | SetValueAction | On SelectedValue changed | DateTimeText |
Q3 2012
With Q3 2012 official release we have included Level 1 Coded UI test support across all controls, except RadChart control.