Instrumentation seems to not work intermittently

Class library usage, coding and language questions.
bhoppe
Posts: 14
Joined: Thu Sep 08, 2011 10:34 pm

Instrumentation seems to not work intermittently

Post by bhoppe » Thu Jan 03, 2013 10:11 pm

I have a test that uses the Ranorex API to test a Flex website. This test runs automatically from a VM. Every so often, the test will fail to recognize any Flex object. The failure will occur at the same point in the test when the first Flex object is required to be acted on.

My latest attempt to solve this issue was I created a VM with only Ranorex 4.0 installed. So no flash and it has not be instrumented. When I run the test, the VM is restored to the this base state and then I run the instrumentation from the command line with this command:

C:\Program Files (x86)\Ranorex 4.0\Bin\Ranorex.Instrumentation.exe /p:flex /pl /ie /o:false /ft

This way I guarantee that the instrumentation and flash installation is good and not corrupted by a VM snapshot restore operation. My test then runs after this.

This works for the most part. I run this test several times a day automatically. Every 4th or 5th time the test runs it will fail to find any Flex object. The test behaves as if the instrumentation didn't run at all. Each test run has a video recording of the test so I can tell that the instrumentation was ran and I see the output from the command line window that the instrumentation is ran in and I do not see any errors.

Any ideas?

Thanks,
Brandon

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

Re: Instrumentation seems to not work intermittently

Post by Support Team » Fri Jan 04, 2013 2:01 pm

Hi,

Could you send us such a video, the report file and a Ranorex snapshot file of the
Flex website when the test failed?
The Flash/Flex log file would be also very helpful, you will find it here: "C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs".
In order to create a snapshot automatically you could for instance add a Report Snapshot action to the first Recording as first "Action", as "Repository Item" you could select the root dom element of your website. This will ensure that a snapshot of the whole website (including the Flex part) will be created.
If you do not want to post the files here you could also send it to our support mail address: [email protected].

Regards,
Markus
.
Image

bhoppe
Posts: 14
Joined: Thu Sep 08, 2011 10:34 pm

Re: Instrumentation seems to not work intermittently

Post by bhoppe » Fri Jan 04, 2013 6:43 pm

Is there an API to record a snapshot?

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

Re: Instrumentation seems to not work intermittently

Post by Support Team » Fri Jan 04, 2013 9:37 pm

Hi,

Sorry I missed to post the links.
Here are two links where it is described how to create a snapshot with Spy and how to create it in code:
Creating Ranorex Snapshot Files, Create Snapshot of Element Module.
I hope this helps!

Regards,
Markus
.
Image

bhoppe
Posts: 14
Joined: Thu Sep 08, 2011 10:34 pm

Re: Instrumentation seems to not work intermittently

Post by bhoppe » Mon Jan 07, 2013 11:22 pm

Hi,

I've sent the video, snapshot and flash log file by email.

Thanks,
Brandon

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

Re: Instrumentation seems to not work intermittently

Post by Support Team » Tue Jan 08, 2013 2:00 pm

Hi,

Thanks for sending us the files!
We will analyze them and we will get back to you as soon as possible!

Regards,
Markus
.
Image