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

Automating Silverlight charts

13 Answers 126 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Palani
Top achievements
Rank 1
Palani asked on 28 Oct 2010, 09:58 AM
Hi,

My web app is fully with Silverlight components especially charts. How can I automate charts by webUI?

Anybody used webUI to test Silverlight charts?

I'm using the internal build 2010.2.927

Thanks,
Palani.

13 Answers, 1 is accepted

Sort by
0
Keaegan
Telerik team
answered on 29 Oct 2010, 11:30 PM
Hello Palani,

Absolutely! You can use WebUI Studio to automate testing for Silverlight Charts. Many users have already begun using WebUI Studio to automate multiple types of Silverlight Controls (such as charts). The build you have supports silverlight usage.

You may need to download the additional software for using silverlight. If you haven't done so already, login to your telerik account and goto our Silverlight Demo Download Page

I am including a sample test that uses our Silverlight Demo page for you to review. Also feel free to check out our Silverlight Demo page for descriptions of the different Silverlight Controls that the software can utilize. To use this project, simply drop the folder into your WebUI Studio projects folder (located with ~/documents/WebUI Test Studio Projects for Vista and 7, or ~/My Documents/WebUI Test Studio Projects). Next open WebUI Test Studio and manually open the folder (it will not appear in your recent projects until it has been opened once).

Feel free to use this test as a launch pad for what you wanted to create. Just remember that sometimes silverlight can take a bit to load, so you may need to set verification rules to wait until something is visible to make sure that the proper amount of time for loading is allowed.

You will need to install the silverlight controls if you have not done so already.

Sincerely yours,
Keaegan
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
Palani
Top achievements
Rank 1
answered on 02 Nov 2010, 12:49 PM
Hi,
 I have seen the steps for the attached demo. Most of the steps for navigation and not for charts verification.

I'm looking forward to verify following things in charts.
1. Able to get each pie or bar or data point value
2. Able to get data tip or tooltip for each pie or bar or data point
3. To validate the color series for each object (pie or bar or line)
4. To identify each axis tick ( X, Y and Y2 axes)
5. To identify the data label (pie or bar or line)
6. To identify the mouseOver information
7. To identify font style, font size, font color for any object within chart.

Can you please confirm, is it possible to do verification for the above things?

Thanks,
Palani.
0
Keaegan
Telerik team
answered on 04 Nov 2010, 11:10 PM
Hi Palani,

You have quite a few inquiries here so I wanted to answer them one at a time:
1. Able to get each pie or bar or data point value 
We can get data from the chart regarding this to a limited degree. Can you go into more detail on what type of data you are wanting to get?

2. Able to get data tip or tooltip for each pie or bar or data point 
Can you clarify further what you mean for this (this sounds similar to 6)? We are able to read the tooltip of most UI elements displayed in the application.

3. To validate the color series for each object (pie or bar or line) 
We are able to see the background color for UI elements displayed on the screen.

4. To identify each axis tick ( X, Y and Y2 axes) 
Can you clarify what you mean for this? It sounds like you are wanting our tool to see and read each arc (all 360 degrees) of a pie chart. This is something we cannot do, as our software sees the object itself (such as a slice of the pie chart) and does not divide it into radians.

5. To identify the data label (pie or bar or line) 
Labels can be searched for and located using the Verification tool, though I would like to ask that you clarify what results you are wanting to achieve so we can determine further what you will need to do to accomplish this facet. 

6. To identify the mouseOver information 
This sounds similar in relation to your tooltip inquiry (inquiry 2) above, but I need more information on what you are wanting the product to do in order to answer this for you (such as what are you mousing over, what feedback does the site give you when you mouse over that you want WebUI to capture).

7. To identify font style, font size, font color for any object within chart.
WebUI can be setup to locate this type of data using the Verification Sentence Builder tool.

We will look for your reply with further information on the above.

Kind regards,
Keaegan
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
Palani
Top achievements
Rank 1
answered on 07 Nov 2010, 03:14 PM
Hi Keaegen,

 First of all, thanks for your response.  Few of my apps have many chart functionality.

 Given my comments below to your answer.

1. Able to get each pie or bar or data point value 
We can get data from the chart regarding this to a limited degree. Can you go into more detail on what type of data you are wanting to get?
Palani: I would like to get each pie/bar size/percentage/value and count (no of bars/pies).

2. Able to get data tip or tooltip for each pie or bar or data point 
Can you clarify further what you mean for this (this sounds similar to 6)? We are able to read the tooltip of most UI elements displayed in the application.
Palani: ToolTip is same as Point 6. In many charts, the data would be shown as separate text or text block.

4. To identify each axis tick ( X, Y and Y2 axes) 
Can you clarify what you mean for this? It sounds like you are wanting our tool to see and read each arc (all 360 degrees) of a pie chart. This is something we cannot do, as our software sees the object itself (such as a slice of the pie chart) and does not divide it into radians.
Palani: This is for Bar charts (horizontal, vertical - normal, percentage and stacked). As a tester, I would like to verify, how the chart is drawn against the given values and how optimized the chart size.

5. To identify the data label (pie or bar or line) 
Labels can be searched for and located using the Verification tool, though I would like to ask that you clarify what results you are wanting to achieve so we can determine further what you will need to do to accomplish this facet. 
Palani: Again would like to verify the right data is used and right proportion is drawn

6. To identify the mouseOver information 
This sounds similar in relation to your tooltip inquiry (inquiry 2) above, but I need more information on what you are wanting the product to do in order to answer this for you (such as what are you mousing over, what feedback does the site give you when you mouse over that you want WebUI to capture).
Palani: Similar to 2

Thanks,
Palani
0
Keaegan
Telerik team
answered on 10 Nov 2010, 03:46 AM
Hello Palani,

Thank you for your patience while we gathered the information you were looking for.

  1. I would like to get each pie/bar size/percentage/value and count (no of bars/pies).

    We are only able to handle/touch UI elements. 

  2. Able to get data tip or tooltip for each pie or bar or data point

    We have the ability to verify tooltips on UI elements. If they are HTML tooltips this is done through the application. To verify Silverlight Tooltips requires adding a step to locate the item that contains a tooltip, a step to hover over the tooltip, and then adding a coded step to confirm the tooltip (I have included an example as an attachment).

  3. I would like to verify, how the chart is drawn against the given values and how optimized the chart size.

    WebUI Studio is not able to perform the function you are requesting. The best work-around I can suggest is to have your developers input an hidden UI element with custom properties/text that you can build a verification off of.

  4. Again would like to verify the right data is used and right proportion is drawn

    This was partially covered in 2 above. MouseOver information does not exist within the silverlight app until the "mouse over" action occurs (meaning that it is not an element to find until after you mouse over the item). There are still multiple tools available for you to utilize. Perhaps we can go more into depth on this one when we have our phone call?


I will continue to look for your reply to our other thread regarding what time would work best for a phone call. Please let me know if the above is confusing or needs clarification, I'll be more than happy to assist.


Best wishes,
Keaegan
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
Palani
Top achievements
Rank 1
answered on 11 Nov 2010, 03:43 PM
Hi Keaegan,
 Thanks for your answers. My comments are in-line now.

  1. I would like to verify, how the chart is drawn against the given values and how optimized the chart size.

    WebUI Studio is not able to perform the function you are requesting. The best work-around I can suggest is to have your developers input an hidden UI element with custom properties/text that you can build a verification off of.
    Palani: I'm planning to do some kind of image verification if I didn't find any suitable solution.

  2. Again would like to verify the right data is used and right proportion is drawn

    This was partially covered in 2 above. MouseOver information does not exist within the silverlight app until the "mouse over" action occurs (meaning that it is not an element to find until after you mouse over the item). There are still multiple tools available for you to utilize. Perhaps we can go more into depth on this one when we have our phone call?
    Palani: It depends upon the implementation and tests to be verified.

    Thanks,Palani

0
Keaegan
Telerik team
answered on 11 Nov 2010, 06:50 PM

Hello Palani,

With your newly provided information I would like to re-invite the option for us to have a GoTo meeting together so that I can see your screen and you may directly show me what you are looking for in regards to the image verification steps. This way I can more readily understand your needs and find a suitable work-around for this step. It will also remove the need for you to be able to "Share" your site or project.

While we are in UTC-6 here, I can definitely do my best to work with your schedule. We usually find that, due to the distance, the best time for a GoTo Meeting would be close to the end of your shift (morning here). Is there a time close to the end of your shift that you can meet with me during?

I'll look for your reply with a time.

Best wishes,
Keaegan
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
QA
Top achievements
Rank 1
answered on 12 Apr 2011, 05:48 PM
Silverlight:

Our application here is primarily charts, After loading a chart, I am trying to drag and drop a line cursor displayed in a chart and it really doesnt seem to quiet get the co-ordinates. I  did see the magic code from Cody in another post, i am not sure how to apply it in our scenario.

Also, clicking on the line cursor should make the cursor/line go green. How do we validate these two scenario?

I can do a goto meeting if required.

QA.
0
QA
Top achievements
Rank 1
answered on 14 Apr 2011, 07:37 PM
Sentense Verification Builder:

Is that a part of the QA Edition? The previous post stated that we can use that to verify colors etc.

However the original post on this specified QA Edition hence it has confused me. Kindly clarify if this feature exists in QA Edition and how to use it.

QA
0
Stoich
Telerik team
answered on 15 Apr 2011, 09:17 AM
Hello QA,
     you can use this feature in both QA and Dev edition. In order to use it highlight an element. From the popup menu pick "Build Verification" (screenshot 1). This will bring up the Sentence Builder. From here you can build a multitude of different verifications.

Don't hesitate to contact us if you have any additional questions.
 
Kind regards,
Stoich
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
QA
Top achievements
Rank 1
answered on 15 Apr 2011, 02:20 PM
I am unable to do a proper test of drag and drop feature in the QA Edition. Any help? I did not see a reply to that post hence asking again.

Thanks!
0
QA
Top achievements
Rank 1
answered on 15 Apr 2011, 05:39 PM
Hello,

I have an exact similar request where are out software is primarily charts. I am having a tough time trying to get my verification points to work.

I have the same questions as the person who opened this thread. I absolutely cannot see where we can test the font color, I see style and other options in the Sentense Verification Builder.

We have  PO for this tool already. I would appreciate a quick reply.

Would it be more easier to do a net meeting perhaps? I cant verify things like the Y axis that is stacked, or the horizontal and vertical lines that are displayed on the chart etc.

Thanks,
Sanjana
0
Cody
Telerik team
answered on 19 Apr 2011, 10:43 PM
Hello QA,

Are we talking about a Silverlight application here? Verifying the Foreground color of a Silverlight element requires a little bit of code. Here's a sample:

Dictionary<string, string> props = Pages.TelerikTreeViewFor.SilverlightApp.InstallerTextblock.GetProperties();
Assert.IsTrue(props.ContainsKey("Text"));
 
Log.WriteLine("Text = " + Pages.TelerikTreeViewFor.SilverlightApp.InstallerTextblock.TextContent);
 
ArtOfTest.WebAii.Silverlight.UI.Brush textblockBrush = (Brush)Pages.TelerikTreeViewFor.SilverlightApp.InstallerTextblock.GetProperty(new AutomationProperty("Foreground", typeof(Brush)));
if (textblockBrush is SolidColorBrush)
{
    Color actualColor = ((SolidColorBrush)textblockBrush).Color;
    Assert.AreEqual<Byte>(255, actualColor.A, "Error: alpha color does not match expected.");
    Assert.AreEqual<Byte>(105, actualColor.B, "Error: red color does not match expected.");
    Assert.AreEqual<Byte>(72, actualColor.G, "Error: green color does not match expected.");
    Assert.AreEqual<Byte>(40, actualColor.R, "Error: blue color does not match expected.");
}
else
{
    // If it's not a SolidColorBrush what is it? How do we handle it?
    throw new ApplicationException("Expecting a SolidColorBrush, but got a " + textblockBrush.GetType().ToString());
}

I am not sure if we can verify the Y axis in the way that you want. Remember that the tool just sees a set of UI elements. It doesn't understand the concept of a "Chart" or "Axis". It just see's things like an image, a text block, a combox, a radio button, etc. Assuming your chart is being drawn as an image in your Silverlight application, the best we can do is verify it's size and maybe compare it's contents to a another known image. The tool cannot break down an image into the different parts within the image.

Greetings,
Cody
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
Tags
General Discussions
Asked by
Palani
Top achievements
Rank 1
Answers by
Keaegan
Telerik team
Palani
Top achievements
Rank 1
QA
Top achievements
Rank 1
Stoich
Telerik team
Cody
Telerik team
Share this question
or