We have almost 300 Ranorex test cases.
When I run all of them, the tests gets slower and slower over time. The first N tests execute at normal speed, but the (300 - N) test are executed very, very slow.
I tried different machines and the issue occurs on all of them.
Even on my machine, during the day, it gets slower after some tests executed. I have set this code to try to speed the tests up:
Mouse.DefaultMoveTime = 0;
Keyboard.DefaultKeyPressTime = 0;
Delay.SpeedFactor = 0.0;
Mouse.DefaultClickTime = 0;
When it gets slow, the mouse moves slow, the clicks take a long time to perform and so on.
Do you guys have any idea what can be happening?
Using the latest Ranorex version.
All my tests cases open Firefox, test some stuff and close Firefox (but I have tested with chrome and the same thing occurs)
If I reset the machine, all my tests run at the speed they should have. But after some time, the issue occurs again and I have to restart the machine.
Execution gets slow over time
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Execution gets slow over time
Hello,
Could you please verify if the memory usage is getting higher during your test?
Could you please verify if the CPU usage is getting higher?
Does it happen at the same test case every time?
Is it possible to get a sample application in order to analyze this issue?
Regards,
Markus (T)
Could you please verify if the memory usage is getting higher during your test?
Could you please verify if the CPU usage is getting higher?
Does it happen at the same test case every time?
Is it possible to get a sample application in order to analyze this issue?
Regards,
Markus (T)
Re: Execution gets slow over time
I just figure out what was the problem. When running my tests in debug mode it gets slow over time. Running without debugging it does not happen (ctrl + f5). Some question:
1 - Why does this happen?
2 - Is there a fix for it?
3 - Is it possible to always run without debug not having to use CTRL + F5? Maybe there is an way to set it pragmatically.
1 - Why does this happen?
2 - Is there a fix for it?
3 - Is it possible to always run without debug not having to use CTRL + F5? Maybe there is an way to set it pragmatically.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Execution gets slow over time
Hello,
Could you please provide us more information?
Which Ranorex version do you use?
Do you have Visual Studio installed on the same machine where Ranorex Studio is installed?
You could simply start your test with the EXE file of your test.
We would really need your test to reproduce your issue.
You could send it to [email protected].
Regards,
Markus (T)
Could you please provide us more information?
Which Ranorex version do you use?
Do you have Visual Studio installed on the same machine where Ranorex Studio is installed?
You could simply start your test with the EXE file of your test.
We would really need your test to reproduce your issue.
You could send it to [email protected].
Regards,
Markus (T)
Re: Execution gets slow over time
Hi,
Borrowing the thread since i've noticed the same issue.
I have like 700 iterations of one testcase and the test that took 20 s takes 40-50 s after 200 iterations.
I havent tried without debug yet, i'll get back to you when the test is done and then rerun without debug.
Is that the solution? to run without debug or from exe?
Info:
Ranorex latest 4.05
have visual studio installed
webb test on firefox browser version 22
Borrowing the thread since i've noticed the same issue.
I have like 700 iterations of one testcase and the test that took 20 s takes 40-50 s after 200 iterations.
I havent tried without debug yet, i'll get back to you when the test is done and then rerun without debug.
Is that the solution? to run without debug or from exe?
Info:
Ranorex latest 4.05
have visual studio installed
webb test on firefox browser version 22
Re: Execution gets slow over time
Well. I tried many things and nothing have worked. Besides, I am having a lot of issues with ranorex regarding page load and script load. It seems that ranorex is not able to wait until the page finishes loading and I have tried a lot of things. Because of that I gave up and I am going back to selenium.
I am sorry, but i cant help you.
I am sorry, but i cant help you.
Re: Execution gets slow over time
Thats sad, havent the support team given any solution?colutti wrote:Well. I tried many things and nothing have worked. Besides, I am having a lot of issues with ranorex regarding page load and script load. It seems that ranorex is not able to wait until the page finishes loading and I have tried a lot of things. Because of that I gave up and I am going back to selenium.
I am sorry, but i cant help you.
About your pageload issue, maybe you have tried, but for me it works fine with waituntil something arrives?
Re: Execution gets slow over time
Well, the support team tried to help me but nothing worked.
Re: Execution gets slow over time
I currently have a module in my tests that is named "WAIT_FOR_PAGE_RELOAD" that looks like:
1. 1s Delay
2. Wait For Not Exist -> WebDocumentLoading(/dom[@domain='mydomain' and @state!='complete'])
3. 0.5s Delay
4. Wait For Not Exist -> WebDocumentLoading(/dom[@domain='mydomain' and @state!='complete'])
5. Validate.Exists -> WebDocumentComplete(/dom[@domain='mydomain' and @state='complete'])
I check twice because our pages sometimes complete and then load again very quickly. This will catch that most of the time. Also, I have two /dom items in the repository so it is easier to manipulate each state separately.
Just put that in any test case right after you have a module that causes the page to reload. Or you can just copy the steps into your test modules where you need them.
Of course I keep my test modules VERY small, so a single click action on a button, for example, is a module for me. So all my actions that would cause a reload are in separate modules. I do that so non-programmer testers can drag and drop modules into test cases as if they were steps in a manual test.
1. 1s Delay
2. Wait For Not Exist -> WebDocumentLoading(/dom[@domain='mydomain' and @state!='complete'])
3. 0.5s Delay
4. Wait For Not Exist -> WebDocumentLoading(/dom[@domain='mydomain' and @state!='complete'])
5. Validate.Exists -> WebDocumentComplete(/dom[@domain='mydomain' and @state='complete'])
I check twice because our pages sometimes complete and then load again very quickly. This will catch that most of the time. Also, I have two /dom items in the repository so it is easier to manipulate each state separately.
Just put that in any test case right after you have a module that causes the page to reload. Or you can just copy the steps into your test modules where you need them.
Of course I keep my test modules VERY small, so a single click action on a button, for example, is a module for me. So all my actions that would cause a reload are in separate modules. I do that so non-programmer testers can drag and drop modules into test cases as if they were steps in a manual test.
Shortcuts usually aren't...
Re: Execution gets slow over time
That seems to be a good solution, thanks.
But my question is: Why don't the Ranorex programmers do that automatically for us? Why should I have to code simple things and spend a lot of work with something that could be avoided by them?
In Selenium all those issues simple do not exist. They handle every little detail like that for us, so we don't have to.
But my question is: Why don't the Ranorex programmers do that automatically for us? Why should I have to code simple things and spend a lot of work with something that could be avoided by them?
In Selenium all those issues simple do not exist. They handle every little detail like that for us, so we don't have to.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Execution gets slow over time
Hi,
You can do this without the need of "user code". You just need to add the specific "state" attribute to the corresponding repository item and after you added it you just need to drag it to your recording (action table) and select Validate.Exists.
Another easy way would be validating if a specific web element exists as explained in the following forum post.
This forum thread is about "Execution gets slow over time" so it would help other users to attend to the discussion if we would discuss this topic in a more proper thread, like in the following one: FEATURE REQUEST: WebDocument.WaitForComplete() .
Regards,
Markus
You can do this without the need of "user code". You just need to add the specific "state" attribute to the corresponding repository item and after you added it you just need to drag it to your recording (action table) and select Validate.Exists.
Another easy way would be validating if a specific web element exists as explained in the following forum post.
This forum thread is about "Execution gets slow over time" so it would help other users to attend to the discussion if we would discuss this topic in a more proper thread, like in the following one: FEATURE REQUEST: WebDocument.WaitForComplete() .
Regards,
Markus