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

Automated testing of RadChart?

4 Answers 32 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Duncan Bayne
Top achievements
Rank 1
Duncan Bayne asked on 07 May 2010, 12:47 AM
Hi,

I am investigating the Telerik RadChart as an alternative to the chart control provided in the Silverlight Toolkit.  I have found that the RadChart is much more feature-rich, and is easier to work with. 

However, I cannot see how to produce an automated UI test for the chart that tests the presence of individual data points.  I have created a web page that contains a RadChart:

http://img25.imageshack.us/i/telerikscreenshot.png/

When I investigate the page in UI Spy, I can't see any of the data points:

http://img9.imageshack.us/i/uispyscreenshot.png/

It is vitally important that I am able to automate chart UI tests using something like the White testing framework or something similar; the application I am building performs complicated statistical analysis on raw data, and we need to be able to verify that the chart is displaying the correct values.

Is it possible to do this with the RadChart using White?  If not, is there another testing framework I can use?

Yours,
Duncan Bayne

4 Answers, 1 is accepted

Sort by
0
Jim Daly
Top achievements
Rank 1
answered on 07 May 2010, 07:56 PM
You may want to download a trial version of Telerik's WebUI Test Studio. It will allow you to 'record' functional tests for Silverlight and ASP.NET applications.
0
Duncan Bayne
Top achievements
Rank 1
answered on 09 May 2010, 11:58 PM
Jim,

Thanks for the suggestion but I've found that tests created with recording applications are less useful than those written in a good test harness.  E.g. in our existing chart testing harness we can write something like this:

using (var page = GoToMeasurementPage()
{
  using (var series = page.MeasurementSeries)
  {
    Ensure(series)
      .AllPoints.CenterColourIs(ChartColours.SeriesCenterColour)
      .And.FillsPlotArea()
      .And.NoPointIsSelected();
    }
}

Testing in this fashion allows us to produce very robust tests.  E.g., should the means by which the user navigates to the Measurement Page change, we simply have to modify one function and the tests continue to run as they did.

It is very important  that any tool we use be programatically testable in this fashion.
0
Nikolay
Telerik team
answered on 10 May 2010, 01:54 PM
Hello Duncan Bayne,

Telerik's WebUI Test Studio does not only provide support for recording of functional tests, but allows you to write your own code, using the WebAii testing framework, compatible with Visual Studio.You may find it useful to review the sample tests and videos provided, please, refer to this page, where you can find more information on this subject.

As for a tool for spying on Silverlight applications,you may find Silverlight spy pretty useful.

All the best,
Nikolay
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Jim Daly
Top achievements
Rank 1
answered on 10 May 2010, 05:07 PM
I was going to mention that too. Any step in a 'recorded' step in WebUI Test Studio can be converted to a 'coded' step, so it may serve as a good starting point.
Tags
Chart
Asked by
Duncan Bayne
Top achievements
Rank 1
Answers by
Jim Daly
Top achievements
Rank 1
Duncan Bayne
Top achievements
Rank 1
Nikolay
Telerik team
Share this question
or