Page 1 of 1
Testing Bar Charts and Pie Charts
Posted: Tue Jun 12, 2012 12:13 pm
by nandeesh
Hi,
How to test the dynamically generated pie and bar charts in java swing application ?
and how to validate them....? I am using C# for coding.
appreciate your replies...
Thanks.
Re: Testing Bar Charts and Pie Charts
Posted: Tue Jun 12, 2012 3:59 pm
by Support Team
Hi,
You can for instance use one of our
search methods to get them during runtime.
For a more detailed answer we would need more detailed information about the dynamically generated elements and how your tests are structured.
A Ranorex Snapshot File would also be helpful.
Following link will show you how to generate a snapshot file:
Creating Ranorex Snapshot Files
Regards,
Markus
Ranorex Support Team
Re: Testing Bar Charts and Pie Charts
Posted: Wed Jun 13, 2012 8:15 am
by nandeesh
Hi Markus,
Thanks for Reply..
A Java swing app is generating pie or bar charts according user selection from the database data. I can successfully compare two static images. since i cant store dynamic images in repository, so i am comparing database data itself. but is there any option that i can validate dynamic pie or bar charts(example just graphs of any stocks).
I am trying to compare the stream of dynamically generating chart images.
Regards,
Nandeesh
Re: Testing Bar Charts and Pie Charts
Posted: Wed Jun 13, 2012 12:01 pm
by Support Team
Hi,
basically, you can capture a dynamic screenshot via user code.
So, if you have a diagram1 and a diagram2 in your repository, you can compare these diagrams with user code similar to following:
// capture image holding diagram1
Bitmap bmp = repo.form.diagram1.CaptureCompressedImage();
// create Findoptions with similarity set to 95%
Imaging.FindOptions myFindOptions = new Imaging.FindOptions(0.95);
// compare previous captured image holding diagram1 with image holding diagram2
Validate.CompareImage(repo.form.diagram1, bmp, myFindOptions);
For further detaisl about user code actions and user code modules please have a look at following chapters of our user guide:
User Code Actions
User Code Modules
Regards,
Tobias
Ranorex Team
Re: Testing Bar Charts and Pie Charts
Posted: Wed Jun 13, 2012 12:49 pm
by nandeesh
Hi Tobias,
Thanks...