Total number of steps executed in test suite

Best practices, code snippets for common functionality, examples, and guidelines.
gowthamp
Posts: 16
Joined: Fri Feb 05, 2016 7:19 pm

Total number of steps executed in test suite

Post by gowthamp » Fri Jul 22, 2016 10:16 pm

Hello,

I want to count total number of Ranorex Actions (Mouse click or wait or delay or validation) performed in test suite.

I want this information for stats purpose.
I am using Ranorex 6.0.1 in Windows 8.1.

Thanks.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Total number of steps executed in test suite

Post by asdf » Mon Jul 25, 2016 12:31 pm

Hi Gowthamp,

I think that your intention is nearly not feasible, since every action in Ranorex calls a various quantity of methods.
For example:
A simple log message action has only one call.
ReportLogCode.png
ReportLogCode.png (1.91 KiB) Viewed 609 times
A "MouseClick" action has 3 calls.
MouseClickCode.png
MouseClickCode.png (5.73 KiB) Viewed 609 times
I hope this helps.

Best regards,
asdf

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Total number of steps executed in test suite

Post by krstcs » Mon Jul 25, 2016 2:32 pm

As asdf said, it is not possible with the current design of Ranorex to do this out-of-the-box.

It is only going to be really feasible if you break each and every Ranorex action out into its own recording module. So a mouse-click would have its own module and a delay would have its own module. You would have to do this for EVERY SINGLE ACTION. I do this for each ATOMIC action group, not for each individual Ranorex action. It works well, but you really have to start out that way.

If you do this, then in each module you can add an action/method call that does your counting at the end.


But, in my opinion, this is not worth the time as any statistics you get from it are probably not going to mean much. On top of that, these types of statistics are not what functional UI testing (which is what Ranorex is designed for) is about. You really want to do UI load testing or some other type of statistical testing for that.
Shortcuts usually aren't...

gowthamp
Posts: 16
Joined: Fri Feb 05, 2016 7:19 pm

Re: Total number of steps executed in test suite

Post by gowthamp » Mon Jul 25, 2016 3:47 pm

Thanks for your response asdf and krstcs.

One day in scrum, my manager asked "how many steps are we executing in regression testing?".
I am stunned and the obvious response is "don't know" [we do have 10+ modules and dont know number of steps in them].

I would like to know "How can I count all steps reported in Ranorex report?".

As asdf mentioned there would be various quantity of methods in action, but there should be only one Report.log action for any step.

asdf
Posts: 174
Joined: Mon Mar 21, 2016 3:16 pm

Re: Total number of steps executed in test suite

Post by asdf » Fri Jul 29, 2016 11:57 am

Hi Gow,

You could create a counter in C# which iterates through all recording.cs files and if there is a Report.Log message in it, then the counter should increase by one.

Hope this helps.

Kind regards,
asdf