Thursday, 25 August 2016

TestNG for Automation testing

Why TestNG ?
How does it help for automation testing
JUnit v/s TestNG

To be continued...

What is TestNG ?



TestNG is a Unit testing framework for Java. Its open source. NG statnds for Next Generation. It has very rich features for automation testing . For ex : Groups, test dependency etc. It is inspired by Junit/NUnit but does not extend it.


Created by Dr. Cédric Beust (of Google).

Next

ALM Integration with Selenium

There are 2 ways to achieve the ALM Integration with any of the automation frameworks.

1. OTA
2. REST APIs

OTA

Pros for :
1. stable
2. all the ALM functionalities have been exposed through OTA

Cons :
1. Runs only on windows server.
2. needs alm sever on same machine

REST APIs

Pros :
1. Platform Independent.
2. No need of ALM server to be on the same machine or server from where you are making the rest calls.

Cons :

1. REST APIs may go under changes.
2.Not all functionalities have been yet exposed through REST calls.

To be continued.....

Parallel Testing with JUnit 4

With increasing demand for parallel testing (saves executions time tremendously) , here is an article from #saucelabs for which explains how it can be achived with Junit 4 and Selenium

http://sauceio.com/index.php/2010/10/parallel-junit-4-and-selenium-part-three-parallelism-and-ondemand/


Tuesday, 3 May 2016

Top 50 linux interview Questions and answers

https://www.linkedin.com/pulse/top-50-linux-interview-questions-abhinav-kumar?trk=hb_ntf_MEGAPHONE_ARTICLE_POST

Monday, 5 May 2014

Scrolling the Webpage in Selenium Webdriver


There are 3 ways to scroll a webpage using Selenium Webdriver.
·         Using JavascriptExecutor
·         Using Actions class.
·         Using simple sendKeys() function.

Using JavascriptExecutor
import org.openqa.selenium.JavascriptExecutor;
WebDriver driver = new FirefoxDriver();
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("scroll(0, 250)"); //y value '250' can be altered

Using Actions class.

               import org.openqa.selenium.interactions.Actions
 Actions action=new Actions(driver);
 action.sendKeys(Keys.DOWN).perform();
 action.sendKeys(Keys.DOWN).perform();
 action.sendKeys(Keys.DOWN).perform();
 action.sendKeys(Keys.DOWN).perform();

Using simple sendKeys() function.

for ( int i=0 ; i<10 ; i++ ) {
                             driver.findElement(By.tagName("body")).sendKeys(Keys.DOWN);
                    }