Search This Blog

Friday, September 8, 2017

Difference between Smoke and Sanity?

Smoke and Sanity are two most confusing statements, hard to understand for beginners in the field of Software Testing.

Smoke Testing is done to make sure that all critical functionalities end to end are functioning properly so that QA Team can further proceed with more vigorous tests developed in Test Suite. Smoke is basic check at initial builds of a product where QA Team needs to be decisive: Whether to accept the build for QA or reject it? As there is no point driving a wheel-less vehicle, there is no point testing any code with missing critical functionalities. For Example: If Homepage of a website is not opening at all, build should be rejected and sent back to Development team instead of wasting time and accepting such builds.

Sanity Testing is done to make sure that all major new functionalities and bug-fixes are working fine. Sanity is done mostly at later builds / enhancements when the product is almost stable. For example: If the design of a website is to be changed and QA finds out that previous design is still coming, there can be some code merge issues or the services might not have been restarted or it might be cached somewhere, the Sanity test failure will stop QA Team to proceed further as the functionality that was to be tested is not at all testable.

Smoke Testing is usually scripted, automated or documented in most of the organisations, where as Sanity isn't (for an incomplete product).

Once a Web application is live running on production server, Sanity tests can be automated to check health of website daily at regular intervals. For an e-commerce website, sanity test cases may include:
  • Sign In & Sign Out
  • Homepage Components
  • My Account
  • Product Search
  • Product filters
  • Category Mapping
  • Checkout (Both Guest & Logged In)
  • Thank you page
But, for websites having frequent changes on basic functionalities, Automating Sanity is not suggested as the cost of maintaining the test suite would be quite expensive.

Thursday, August 31, 2017

Airtel/Wynk Automation Testing Interview Question with Solution. (Java)

Hello World!
 
Recently I appeared for an interview at Airtel Wynk office, Gurgaon for the role of Automation Test Engineer. Here is the Automation testing interview question with free solution:

Question: Suppose you have an Integer "4296"
Step 1: Find smallest digit in integer i.e. '2' in "4296"
Step 2: Subtract smallest digit from all digits of the integer i.e. "New Integer" becomes: (4-2)(2-2)(9-2)(6-2) = "2074"
Step3: Now, Add all digits of New integer and print the sum i.e. 2+0+7+4 = "13"

Here is the Solution:

Java Program to Reverse a String / Integer

Hello World! Below program will reverse any String or Integer. Happy Coding!

Thursday, August 3, 2017

eCommerce website: Components and Testing

eCommerce is rapidly increasing day by day worldwide. Electronic commerce includes selling/buying products online over the world wide web. A tester deployed in eCommerce domain needs to know these basic components and technologies involved in testing eCommerce web applications.

Basic components of an e-commerce website:

Homepage: It's basically the very 1st page of an eCommerce website having banners, links to various categories, popular products, login/logout, Promotions, widgets etc.

My Account page: This page appears for a logged in user only. It contains saved addresses, saved bank card details, previous orders etc.

Search Page: This page contains the result set after a user enters a search string and searches for a particular product.

Product Page: This page contains the product and it's description along with product specifications like price, attributes like size, color etc.

Sunday, July 30, 2017

Locators in Selenium

In simple words, Locators are similar to tracking the location of your Ola/Uber Cab on road. 

Once a web page loads on your browser there are several elements on the webpage for user to perform action on. There can be Input boxes such as username/password, Submit buttons, Dropdown lists, Texts, Radio buttons etc.

In order to perform action on any element on a webpage, selenium webdriver needs to know the location of the webelement. There are 8 distinct locators that are used to access webelements via Selenium webdriver:

1. Id | example: WebElement We = driver.findElement(By.id("username"));

2. Name | example: WebElement We = driver.findElement(By.name("submit"));

3. Linktext | example: WebElement We = driver.findElement(By.linkText("link Text"));

4. Partial Linktext | example: WebElement We = driver.findElement(By.PartialLinkText("link Text"));

5. Tag Name | example: Select se = new Select(driver.findElement(By.tagName("menu"))); select.selectByVisibleText("Jan");

6. Class Name | example: WebElement We=driver.findElement(By.className(“test”));

7. CSS | example: WebElement We = driver.findElements(By.cssSelector("input[id=password']"));

8. Xpath