Page 1 of 1

Test progress

Posted: Mon Mar 02, 2015 9:06 am
by Tstr
How can I determine the total number of activities that will be handled by
ActivityStack.Instance.BeginActivity
*before* (or while) the TestSuite is executed?

Background:
I want to implement a progress indicator that does not rely on the number of test cases (TestCaseActivity) but on a more fine granular classification.
Please, let me know, if there is any other (better) method achiveving this.

Re: Test progress

Posted: Tue Mar 03, 2015 2:16 pm
by Support Team
Hello,

I don't know what exactly you want to do, but you can try the following method.
Ranorex.Core.Reporting.ActivityStack.Instance.VisitAll()
An example can also be found in the following forum post:
http://www.ranorex.com/forum/timestamps ... tml#p25108
Please note that this is an not official documented method which can be changed in future versions.

Regards,
Bernhard

Re: Test progress

Posted: Tue Mar 03, 2015 3:42 pm
by Tstr
Thank you for your reply.
Unfortunately, your suggested method does not work for me.


My progress indicator should show something like:
Progress: <activities_begun> / <total_activities>

I intend to increment activities_begun in the BeginActivity event handler.

Given the KeePassTestSuite setup shown in the attached picture, BeginActivity is fired 26 times.

Ideally, total_activites is equal to activities_begun at the end of the testrun :-)

How can I get this number beforehand?

Re: Test progress

Posted: Thu Mar 05, 2015 5:54 pm
by Support Team
Hello Tstr,

That's correct, the problem is that the total count of the activities is not available at the beginning.
I am not sure why this is necessary for your test, but I am afraid that this would require a lot of internal API methods which cannot be posted into the forum.
Maybe it is better to search for another approach. You could, for example iterate through the test suite XML file in order to get the needed information.

Regards,
Bernhard

Re: Test progress

Posted: Mon Jun 01, 2015 6:49 am
by helmonferk
I had gone through the posts. Can you please provide me some more information about that.

Re: Test progress

Posted: Wed Jun 03, 2015 9:10 am
by RobinHood42
Hi,

Please explain in more detail which information do you need and what exactly do you want to do?

Cheers,
Robin