« NUnit "Quick and Dirty" Tutorial | Main | Ajax Support is Coming! »
May 09, 2006
The Need for Speed - ABCWebTest is now FAST!
One of the most frequent feedback comments we've received about ABCWebTest is the request to speed up it's execution. We've listened and it's now super-fast!
The main issue before was that in order to ensure that the web page was loaded properly, we had to put in many checks. What we've done since version 0.5 is created a Speed class that allows you to control the speed at which your tests are executing. Think of it like a manual transmission car, except here we only have 2 speeds: low and high. By default, the speed of ABCWebTest is as fast as possible, which should suffice for most situations. However, there will be times when you'll need to slow it down. This is usually the case right before an action opens a popup. In that case, you'd simply slow down ABCWebTest before the action that causes the popup to occur and then speed it back up right after. Here's some sample code in C#:
browser.Speed.SlowDown();
browser.Document.GetAnyButtonByName("click_me_to_open_popup").Click();
browser.Speed.SpeedUp();
Here's the same code in Java:
browser.getSpeed().slowDown();
browser.getDocument().getAnyButtonByName("click_me_to_open_popup").click();
browser.getSpeed().speedUp();
You can change the low and high speed values as you require, but by default the high speed is "0" and the low speed is "1000". This is the approximate number of milliseconds of delay. The higher the value, the larger the delay and the slower your web tests will take to run. Here's how you would change the default speed values:
C#:
browser.Speed.High = 100; //slow down high speed to 100ms instead of the default 0ms
browser.Speed.Low = 800; //speed up low speed to 800ms instead of the default 1000ms
Java:
browser.getSpeed().setHigh(100); //slow down high speed to 100ms instead of the default 0ms
browser.getSpeed().setLow(800); //speed up low speed to 800ms instead of the default 1000ms
The speed increase is available in ABCWebTest as of version 0.5.
Posted by Misha Rybalov at May 9, 2006 03:03 PM