Executing dependent and independent recordings easily

Best practices, code snippets for common functionality, examples, and guidelines.
User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Executing dependent and independent recordings easily

Post by Support Team » Thu Jun 17, 2010 1:05 pm

Hi all,

The Recording Invoker class provides the functionality to execute dependent and independent Ranorex Recordings.

Use the “StartIndependentRecordings” method to execute your recordings and continue the test even if one of the recordings fails.
For example:
RecordingInvoker.StartIndependentRecordings(
                Recording_Fail.Start, Recording_Success.Start)
Use the “StartDependentRecordings” method to execute your recordings and abort the execution if one of your recordings fails.
For example:
RecordingInvoker.StartDependentRecordings(
                Recording_Fail.Start, Recording_Success.Start)
Attached you will find a sample project and the RecordingInvoker class.

Regards,
Peter
Ranorex Support Team
RanorexInvokerProject.zip
RecordingInvoker.cs
You do not have the required permissions to view the files attached to this post.

farhanzom
Posts: 12
Joined: Mon Jul 26, 2010 12:58 pm

Re: Executing dependent and independent recordings easily

Post by farhanzom » Tue Sep 14, 2010 9:48 am

Hi,

I've been trying to use this since past couple of days but unsuccessful so far. I also looked into the invoker sample project.

My query is how do I use this code? I have separate executables for different scenarios, I need to run them all together, sequentially, as in batch mode. Also, I need to continue running the scenarios even if one of them fails.

Do I need to use this code in each project I've created or can I use your invoker project and call the executables from within that?

Please help.

Cheers,
Farhan

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Executing dependent and independent recordings easily

Post by Support Team » Tue Sep 14, 2010 1:51 pm

Hi,

The RecordingInvoker is only for one Project. There a different ways to use it. I would suggest you to create a Project named, for example "RunAll", and add refer all other projects to the "RunAll" project. Now you can use all methods of all Projects inside the "RunAll" and it should be possible to use the methods even for the RecordingInvoker Class. Or as you suggested, you use in all Projects the RecordingInvoker.

Regards,
Peter
Ranorex Team