Monday, 4 August 2014

GUI Automation Tools

Following are some of the open source GUI automation tools in the market:

ProductLicensed UnderURL
AutoHotkeyGPLhttp://www.autohotkey.com/
SeleniumApachehttp://docs.seleniumhq.org/
SikuliMIThttp://sikuli.org
Robot FrameworkApachewww.robotframework.org
watirBSDhttp://www.watir.com/
Dojo ToolkitBSDhttp://dojotoolkit.org/

Following are some of the Commercial GUI automation tools in the market.

ProductVendorURL
AutoITAutoIThttp://www.autoitscript.com/site/autoit/
EggPlantTestPlantwww.testplant.com
QTPHphttp://www8.hp.com/us/en/software-solutions/
Rational Functional TesterIBMhttp://www-03.ibm.com/software/products/us/en/functional
InfragisticsInfragisticswww.infragistics.com
iMacrosiOpushttp://www.iopus.com/iMacros/
CodedUIMicrosofthttp://www.microsoft.com/visualstudio/
SikuliMicro Focus Internationalhttp://www.microfocus.com/

What is GUI Software Testing?

GUI testing is a testing technique in which the application's user interface is tested whether the application performs as expected with respect to user interface behaviour.
GUI Testing includes the application behaviour towards keyboard and mouse movements and how different GUI objects such as toolbars, buttons, menubars, dialog boxes, edit fields, lists, behavior to the user input.

Wednesday, 21 May 2014

Alert handling in Selenium WebDriver

try {
        Alert alert = webDriver.switchTo().alert();

        // check if alert exists
        // TODO find better way
        alert.getText();

        // alert handling
        log().info("Alert detected: {}" + alert.getText());
        alert.accept();
    } catch (Exception e) {
    }

The problem is that if there is no alert on the current state of the web page, it waits for a specific amount of time until the timeout is reached, then throws an exception and therefore the performance is really bad.
 public void checkAlert() {
    try {
        WebDriverWait wait = new WebDriverWait(driver, 2);
        wait.until(ExpectedConditions.alertIsPresent());
        Alert alert = driver.switchTo().alert();
        alert.accept();
    } catch (Exception e) {
        //exception handling
    }
}

Saturday, 10 May 2014

What is the difference between Thread.Sleep() and Selenium.setSpeed()?

Selenium.setSpeed:
1. takes a single argument in string format
ex: selenium.setSpeed(“2000″) – will wait for 2 seconds
2. Runs each command in after setSpeed delay by the number of milliseconds mentioned in setSpeed.
Thread.sleep:
1. takes a single argument in integer format
ex: thread.sleep(2000) – will wait for 2 seconds
2. Waits for only once at the command given at sleep.

Is it possible to use Selenium for multi-user Load Testing?

Yes, but it requires a LOT of hardware. We recommend you check out BrowserMob, which does load testing with real browsers and is powered by Selenium.

Thursday, 8 May 2014

What are the features of TestNG?

 What are the features of TestNG?
TestNG is a testing framework designed to simplify a broad range of testing needs, from unit testing (testing a class in isolation of the others) to integration testing (testing entire systems made of several classes, several packages and even several external frameworks, such as application servers). You can use test suite,annotations, automatically generation of report and much more.