Monday 2 May 2016

Does QTP testing require in depth knowledge of VB script

You need to understand what you are trying to do with QTP. Generally, QTP testers work on three different levels -

1. User - Framework and automation test scripts are created by other people in this scenario. The user only executes the prewritten scripts and analyze the results. You will need little knowledge of vbscript in this case, just to be able to troubleshoot if something goes wrong. You should know following in VB Script - Focus on flow controls, creating methods, basic string operations, date operations, variables type, reading and writing to Excel, and commonly used VB script methods.

2. Script developer - In this case, you will need to prepare test scripts, adhering to the guidelines of the framework in your organization. You will need deeper understanding of VBScript and programming in general to play this role.

3. Framework designer/developer - This is a highly specialized role. You will need in depth knowledge of VBScript and at least another high level language, understanding of design patterns and good grasp of data structures and algorithms to play this role.

Think where you want to be in your career. In case you want to opt for #3, You should start learning VBScript.


You can visit W3Schools Online Web Tutorials and complete online tutorial on VB. 

Sunday 24 April 2016

Write Positive and Negative test cases for login page

This is one of frequent question asked by interviewer. In order to answer this question, you need to understand the difference between what a positive test case and a negative test case is.

  •       A positive test case confirms some expected functionality. E.g.: A user with a valid username and the corresponding password can log in successfully.
  •      A negative test case tests for unexpected or invalid conditions, and confirms that the code can hold up in these circumstances. 
·         Positive Test Case
               1.       Verify the Correct username, Correct password - Login Successfully.
·         Negative Test Cases
                            1.       Verify the Incorrect username, incorrect password- Can't Login
                            2.       Verify valid username and empty password. -Can't Login
                            3.       Verify empty username and valid password. - Can't Login
                            4.       Verify some password(can be a registered/unregistered)- Can't Login
                            5.       Verify case changed username /password.- Can't Login
                            6.       Verify registered user's login id and password -Can't Login
                            7.       Verify registered username and password.- Can't Login
                            8.       Verify to enter disable(Blocked) email address.- Can't Login
                    9.     Verify to unverified Email address. - Can't Login

Wednesday 13 April 2016

How To Continue With Script Even If NoSuchElement Exception is Thrown

The Problem
If you selenium script fails to find element on page by provided locator, it throws NoSuchElement exception. NoSuchElement is an exception which is basically like crashing the program into a wall. Whenever this error comes, script execution gets stopped.

A Solution
As an automation developer, I can ensure uninterrupted script execution in two ways
1.       Using try/catch block

Let’s try to implement it in an example –

NoSuchElement error without Try/Catch Handling
     public static void main(String[] args) {
                                WebDriver driver = new FirefoxDriver();

                                driver.get("http://thebuddhatree.blogspot.in/");

                                driver.findElement(By.id("name")).click();
                }

Note – This program will generate error and script execution gets stopped if element with provided locator is not on page.

NoSuchElement error with Try/Catch Block

import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class NoSuchElementError {

                public static void main(String[] args) {
                                WebDriver driver = new FirefoxDriver();
                                driver.get("http://thebuddhatree.blogspot.in/");
                                try {
                                                driver.findElement(By.id("name")).click();
                                } catch (NoSuchElementException e) {
                                                System.out.println("In Catch Block");
                                }
                                System.out.println("Outside Block, resume executing other code");
                }
}

Note – This program will generate error but script execution will continue for remaining code.

2.       Using FindElements() method
Build into Selenium is an ability to search multiple elements using single action
findElements() method behavior can be summarized as follows  -

·         On Zero Match : return an empty list
·         On One Match : returns list of one WebElement only
·         On One+ Match : returns list with all matching elements

NoSuchElement error using FindElements()
public static void main(String[] args) {
                                WebDriver driver = new FirefoxDriver();
                                driver.get("http://google.in/");
                               
                                List <WebElement> elements  =driver.findElements(By.id("name"));
                                if (elements.size() == 0){
                                                System.out.println("Element Not Found");
                                }
                }
Expected Behavior
  • ·         Open the Browser
  • ·         Load the page
  • ·         Search for an element
  • ·         Fails to find element
  • ·         Script execution continued

Conclusion
Happy Learning

Please ask questions on Testing Forum, in case of any issues or doubts or questions.

Saturday 9 April 2016

Fundamental Requirements For an Entry Level QA Engineer

There are different types of roles in Software industry - like problem-solving, problem-finding, problem-defining. As a general rule, programmers focus on solving problems, where testers or QA Engineer focus on finding and defining problems. In other words, QA Engineer focus tends to be more "did we build the right it". If you love finding & defining problems, welcome to world of QA Engineers.

That said, there are generalities I would consider for entry-level QA positions:
·         Ability to communicate and prioritize - QA people needs to create bug reports and convince others that the problems they reported need to be fixed. They are also needed to evaluate the severity of any problems they run into. You need to be good in verbal & written communication and explain defects in simple terms.
·         Fast learner - no matter what level or domain of software QA someone starts at, there's a large learning curve.
·         Any kind of programming skill is a bonus because it helps in automating tests. As of now,  most IT companies require all of their QA resources to write test automation code
·         Analytic mindset
·         Be Curios & Ability to research
·         Ability to multitask and adapt to a constantly changing environment
·         Build good rapport with Developer, it helps you understanding working of application
·         Ability to take decision, as a QA, you are need to advise the business on whether or not to release. Being a QA, I should know every part of system better than anyone else.


Having said that feel free to add skill which you feel should be added.

Friday 11 March 2016

What is the scope of software testing in India

Software testing job has same scope as software development in India. Everything that is developed is tested before it is deployed into production. It may be System Test, Integration Test, Acceptance Test, Regression Test, Automation Test, Performance Test, Network Test, and the list will go on.

An Automation tool knowledge & business domain knowledge would be very much handy to excel  in the Testing field.

Traditionally, India has been hub of back support office of global IT companies. Market is evolving day by day and lot of companies are sending software testing projects to India. This has led to companies who deals only in testing projects.


Scope is good. Learn some automation tool then it would be better. Most of the jobs in the market are more towards test automation.