Create custom Pie-Chart?

Ask general questions here.
mw-tw
Posts: 17
Joined: Tue Jan 03, 2017 11:29 am

Create custom Pie-Chart?

Post by mw-tw » Tue May 16, 2017 1:22 pm

Hi,

i want to save values while executing a testcase. And with these values i want to create a custom pie-chart, showing all the stored values (example: [a,a,b,a,c,b]). Showing a pie with these results.

Is this possible? Can you give me a hint how to do this?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Create custom Pie-Chart?

Post by Support Team » Wed May 17, 2017 6:35 pm

Hello mw-tw,

Thank you for posting your question about custom reports.

Lesson 4 of the user guide talks about data, variables, global parameters, and the test solution. You will want to read up on global parameters:

https://www.ranorex.com/support/user-gu ... html#c3018

Programmatically in code you will want to continuously update the value stored in the global parameters to be updated as your test suite executes. For instance you may want to increase the count of test cases included in a run configuration, and do this dynamically because the test cases ran might change from run to run, then you will set up a GlobalParameter type variable, and increase the value inside your recording module with the following code:

Code: Select all

TotalCasesRunSoFar = TotalCasesRunSoFar + 1;
Everywhere that code snippet runs will increase the TotalCasesRunSoFar count by 1.

If you right click the test suite in the test suite view, then you will get a window with "General", "Global Parameters", and "Report" tabs. You will want to familiarize yourself with the "Global Parameters" tab, but also use the "Reports" tab to activate custom reports.

Personally I would likely just output the data from the global parameters to the normal Ranorex styled report with a line like this:

Code: Select all

Report.Log(ReportLevel.Info, "Total test cases run: " + TotalCasesRunSoFar);
I would also output the data to a database server, and then I could create a web page or application that displays the data in a pie chart.

Alternatively you can turn on custom reports in the "Reports" tab of the open window (described above), and then you will have the custom report files added to your solution in the project view. If you browse into the custom report folder you will find a ".css" style sheet file, a ".xsl" (xml translation) file, and the logo ".png" file which can all be changed to modify the report. When a test is run both a ".rxlog" report file, and ".rxlog.data" file are created. These two report files contain the specific report information, and they reference the .css and .xsl files above to understand how they are supposed to show the data. If you have modified the .css and .xsl files, then how that data is displayed depends on the changes you made to the display of the reports. This is where you will set up your pie chart to display data that you supply. This operation of modifying the existing reports is pretty complicated, and unfortunately it is impossible for us to support the changes that you can make to these files, so we do not support it. You will, however, be able to find custom report help in the forums.

I hope this information is helpful to you, and I look forward to your response.

Sincerely,

-- M. Kendall McIntosh
Automation Support Engineer
.
Image

lupacexi
Posts: 2
Joined: Sat Aug 05, 2017 5:16 pm

Re: Create custom Pie-Chart?

Post by lupacexi » Mon Aug 07, 2017 8:16 pm

Thanks! I have same problem

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Create custom Pie-Chart?

Post by Support Team » Fri Aug 11, 2017 9:57 pm

Hello lupacexi,

Thank you for posting in the Ranorex forum!

Please remember that if you run into any serious roadblocks, then we are happy to help in support! Please email [email protected] (Europe and Worldwide), or [email protected] (USA).

I look forward to your response.

Sincerely,

- M. Kendall McIntosh
Automation Support Engineer
.
Image