Create a Console Application that Utilizes the Telerik Testing Framework
I would like to create a console application that performs UI automation tasks by using the Telerik Testing Framework. This application can run without the use of a test runner. It cannot be considered a real "test," but an application that utilizes a specific API.
Solution
Note: At a minimum, the Telerik Testing Framework or Run-Time Edition must be installed on the machine where you intend to run the test.
First, create a C# or Visual Basic Console application project. The project is generated with an initial class that contains the Main function. A Console app begins executing from this function.
In order to access the Telerik Testing Framework API, add the necessary assembly references. Depending on the type of application, add the following assemblies:
-
HTML
- Telerik.Webaii.Controls.Html
- Telerik.Webaii.Controls.Html
- ArtOfTest.Webaii.Design
-
Silverlight
- Telerik.Webaii.Xaml
- ArtOfTest.Webaii
- ArtOfTest.Webaii.Design
-
WPF
- Telerik.Webaii.Xaml.WPF
- ArtOfTest.Webaii
- ArtOfTest.Webaii.Design
These assemblies can be found in Telerik's installation folder. These assemblies can be found in the following two locations on a 64-bit Windows 7 machine:
C:\Program Files (x86)\Progress\Test Studio\Bin\
C:\Program Files (x86)\Progress\Test Studio\Bin\Translators\
If you're not sure where to look for the assemblies, perform a Windows search inside the Telerik folder.
Once you've added the assembly references, change the .NET Framework version of the project to 3.5 (if not set already). Here is how to do that (go to second section: Changing the Target .NET Framework Version or Profile for an Existing Project). Now you can access the Telerik Testing Framework API from any class inside your project.
The application gets values from Yahoo! Finance and outputs them to the console screen. Here's the sole class that holds the logic for the application: