This is a migrated thread and some comments may be shown as answers.

Getting started with Test Framework and Silverlight

1 Answer 82 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
James asked on 04 Sep 2015, 04:11 PM
I've been using the built in facility in Visual studio 2010 for creating unit tests in Silverlight. 
(Microsoft.Silverlight.Testing.dll and Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll)

I now want to use Telerik Testing Framework for scipted UK testing

I've installed TTF

Various libraries are installed in C:\Program Files\Telerik\Test Studio\Bin\  but only 
artoftest.SL.Extension and 
can be added to my project, as they seem to be the only ones compiled in the Silverlight Library

So how to get started?

I can't follow your youtube example by Jim Holmes as that's not for Silverlight.

The first reference I can find to Silverlight in the documentation is at
However this only lists a method, and excludes the class, namespace and "using" statements.

It starts:
        public void SLDemo()
            //Enable Silverlight
            Settings.Current.Web.EnableSilverlight = true;

and it fails on Settings as there is no context for it.


I put this as a basic header for it:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ArtOfTest.WebAii.Silverlight;
using ArtOfTest.WebAii.Silverlight.UI;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace ViewsTests
    public class TelerikVSUnitTest1 


Another alternative I tried was to use the templates.  Using Test > TelerikTestingFramework>Web>VsUnit  gives me a template which includes the following:

using ArtOfTest.WebAii.Controls.HtmlControls;
using ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts;
using ArtOfTest.WebAii.Core;
using ArtOfTest.WebAii.ObjectModel;
using ArtOfTest.WebAii.TestAttributes;
using ArtOfTest.WebAii.TestTemplates;
using ArtOfTest.WebAii.Win32.Dialogs;
none of which compile.

Could you point me in the right direction to make some progress.

Many thanks.

1 Answer, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 04 Sep 2015, 04:54 PM

Sorted.  Well, at least I know where I was going wildly wrong!

I've been used to adding test classes in the Silverlight projects of the solution for unit testing.  I see now - the TTF runs the browser, so it can't be in a Silverlight project!  Friday afternoon programming - sorry!


General Discussions
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Share this question