Wednesday, September 28, 2016

Selenium 3.0 Beta is here and it takes a leap!!

When Selenium 2.0 was released in July 2011, it was a major leap from Selenium 1.0 (or Selenium Remote Control “RC”). It was the merger of RC and WebDriver projects and as we saw it was just the name Selenium that was retained and pretty much everything was updated to WebDriver API. Also, that release came with the announcement that the support to RC would be “soon” dropped. And then we heard the similar announcements in various Selenium conferences that RC will be dropped that year, it did’t happen though. I presume that was due to large number legacy RC user base out there. For the last six years users were advised to switch to the newer WebDriver APIs and to stop using the original RC APIs.
Now that day has at last come when the RC support has been completely dropped in Selenium 3.0.

Selenium 3 is Selenium 2 without Selenium 1.
Other major changes is for the Firefox driver.  So far Selenium has been giving preferred treatment to Firefox, there was no need to use any browser drivers like for Google Chrome, IE, Opera, Safari (previously).  Firefox always ran right out of the box, not anymore…  We now need to use Geckodriver to run Firefox marionette implementation.
Other than this there are some major changes that you should be aware of as below:
  • You’ll need to be running Java 8 to use the Java pieces of Selenium. Get it here
  • Support for Firefox is via Mozilla’s geckodriver. Get it here
  • Support for Safari is provided on macOS (Sierra or later) via Apple’s own safaridriver. Get ithere
  • Support for Edge is provided by Microsoft through their webdriver server. Get it here
  • Only versions 9 or above of IE are supported. Earlier versions may work, but are no longer supported as Microsoft no longer supports them. Remember you need to have thesesettings for IE.
Our team has been doing testing of the Selenium 3.0 beta and found inconsistencies with Firefox 49 beta version, it works find on previous versions for Firefox.  I presume this might be the same old Selenium catching up with latest version of Firefox browser.  It might be good idea to stay with one version below the latest Firefox and keep latest Selenium Jar files.
We also plan to make a big announcement on this occasion which is related to CP-SAT and CP-SAT Advanced certification roadmap and all the testers out there who want to become expect in Selenium.  Please watch out this space for more.

Wednesday, April 22, 2015

ATDD Mobile Test Automation - Integration of FitNesse with Appium - Part 1

FitNesse is a collaboration tool, some Agile enthusiasts use this tool to facilitate ATDD (Acceptance Test Driven Development) or BDD (Behaviour Driven Development).  Compared to Cucumber where the focus is on the behavioral aspect, here we also get inclined towards the test data framework.

Appium is the premier open-source tool for mobile testing.  Here is my video on integrating FitNesse with Appium.



FitNesse can be downloaded from this link --> http://www.fitnesse.org/FitNesseDownload

The prerequisite for Appium project are as below:

  • Install Android SDK
  • Install Node.js
  • Install Appium
  • Install Appium Java Client
  • Configure Appium in Eclipse (preferably maven project)
FitNesse server can be started using following command:
java -jar fitnesse-standalone.jar -p 9090

where -p gives which port to start the server.

Configure the project in eclipse with FitNesse and Appium dependencies and run the mobile test.  More details on Eclipse setup in part 2.

Tuesday, April 21, 2015

BDD Mobile Test Automation - Integration of Cucumber with Appium

Behavior Driven Development (BDD) is very popular with many Agilists out there, specially those focused on Testing. However my view is that BDD is not about Test Automation, it is about collaboration so that the expected behavior of the application can be determined. Cucumber happens to be the tool of choice to implement BDD.  While doing this for web applications, we can drive the features through WebDriver.

Lately the application development has been inclined towards mobile apps and we need to extend our exiting BDD frameworks to handle app, be it Android, iOS or Win Mobile.

Appium is a neat tool for anyone who has exposure to WebDriver, irrespective of that also it is an excellent tool for mobile testing.

Here is my video of running Appium tests for android app using Cucumber.




You can create the Maven project using the following POM.xml:

<?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?>
<project xmlns=&amp;quot;http://maven.apache.org/POM/4.0.0&amp;quot;
xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;
xsi:schemaLocation=&amp;quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&amp;quot;>
<modelVersion>4.0.0</modelVersion>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>LATEST</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.0.14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.0.14</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>


The code for JUnit test runner is as below:


1:  package com.qaagility.atacalc;
2:  import cucumber.api.CucumberOptions;
3:  import cucumber.api.junit.Cucumber;
4:  import org.junit.runner.RunWith;
5:  @RunWith(Cucumber.class)
6:  @CucumberOptions(format ="pretty", tags={"@only"}, features = "test/resources/ATA_Calc.feature", monochrome=true)
7:  public class TestRunner {
8:  }


Saturday, August 10, 2013

STIQ

http://www.qatestingtools.com/sourceforge/storytestiq

Wednesday, August 7, 2013

Selenium 2.34 is released

https://code.google.com/p/selenium/downloads/list

Wednesday, April 18, 2012

Grid2 RemoteWebdriver

public class FlipkartBackedGrid2 extends SeleneseTestCase {
private Selenium selenium;
@Parameters({"browser","port"})
@BeforeClass
public void beforeClass(String browser,String port){
DesiredCapabilities capability= new DesiredCapabilities();

capability.setBrowserName(browser);

try {
WebDriver driver= new RemoteWebDriver(new URL("http://localhost:".concat(port).concat("/wd/hub")), capability);
selenium = new WebDriverBackedSelenium(driver, "http://www.flipkart.com");
} catch (MalformedURLException e) {

e.printStackTrace();
}
}

Wednesday, March 7, 2012

IE/Chrome Driver code in Selenium 2.x

private WebDriver driver;

@Before
public void setUp() throws Exception {

DesiredCapabilities ieCapabilities = DesiredCapabilities.internetExplorer();
      ieCapabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true);
driver  = new InternetExplorerDriver(ieCapabilities);
}

--------------------


System.setProperty("webdriver.chrome.driver", "C:\\ChromeDriver\\chromedriver_win_19.0.1068.0\\chromedriver.exe");

driver = new ChromeDriver();