Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
10 views223 pages

ST Notes

Software testing Note

Uploaded by

mohammed.shohel9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views223 pages

ST Notes

Software testing Note

Uploaded by

mohammed.shohel9
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 223

Table of Contents

1. Software Testing....................................................................................................................................................2
1.1 What is mean by Testing?..............................................................................................................................2
1.2 Disadvantages of Manual Testing...................................................................................................................2
1.3 Automation....................................................................................................................................................2
1.4 Advantages:....................................................................................................................................................2
1.5 Disadvantages of Automation Testing............................................................................................................3
1.6 Functional Testing tools.................................................................................................................................3
1.7 Selenium vs. QTP............................................................................................................................................3
2. Selenium IDE..........................................................................................................................................................4
2.1 Introduction...................................................................................................................................................4
2.2 History of selenium........................................................................................................................................4
2.3 Selenium Components...................................................................................................................................4
2.4 Advantages.....................................................................................................................................................4
2.5 Disadvantages................................................................................................................................................4
2.6 Installation.....................................................................................................................................................5
2.7 Recording.......................................................................................................................................................8
2.8 Challenges in Selenium IDE............................................................................................................................8
3. Requirements of Selenium Webdriver...................................................................................................................9
3.1 HTML..............................................................................................................................................................9
3.2 Java..............................................................................................................................................................13
4. Web Driver...........................................................................................................................................................13
4.1 Element identification in selenium...............................................................................................................13
4.2 Element identification using Css selectors:..................................................................................................14
4.3 Element identification using Xpath:.............................................................................................................15
4.3.1 X-path position (absolute Xpath):.........................................................................................................15
4.3.2 Xpath Attributes(relative Xpath):.........................................................................................................16
5. WebDriver............................................................................................................................................................18
5.1 Checkpoints verification in automation:......................................................................................................21
5.2 Element Check points...................................................................................................................................22

1
5.3 WORKING WITH SELECT DROPDOWNS........................................................................................................23
5.4 TO FIND THE VALUE ATRIBUTE OF AN ELEMENT..........................................................................................26
5.5 WORKING WITH MULTIPLE ELEMENTS:.......................................................................................................26

1. Software Testing
1.1 What is mean by Testing?
 The process of exercising software to verify that it satisfies specified requirements and to
detect errors.
 The process of analyzing a software item to detect the differences between existing and
required conditions (that is, bugs), and to evaluate the features of the software item.
 The process of operating a system or component under specified conditions, observing or
recording the results, and making an evaluation of some aspect of the system or
component.

1.2 Disadvantages of Manual Testing

 Manual tests can be very time consuming


 For every release you must rerun the same set of tests which can be time consuming.
 Requires heavy investment.
 Requires more number of human resources

1.3 Automation

Automation Testing: Testing which is done by any other third party tool.

Test automation is the use of software to control the execution of tests, the comparison of
actual outcomes to predicted outcomes, the setting up of test preconditions, and other test
control and test reporting functions. Commonly, test automation involves automating a manual
process already in place that uses a formalized testing process.

1.4 Advantages:

Reliable: Tests perform precisely the same operations each time they are run, thereby
eliminating human error
Repeatable: You can test how the software reacts under repeated execution of the same

2
operations. Programmable: You can program sophisticated tests that bring out hidden
information from the application.
Comprehensive: You can build a suite of tests that covers every feature in your application.
Reusable: You can reuse tests on different versions of an application, even if the user interfaces
changes.
Better Quality Software: Because you can run more tests in less time with fewer resources
Fast: Automated Tools run tests significantly faster than human users.
Cost Reduction: As the number of resources for regression test are reduced.
Reporting: Customized reporting of application defects.

1.5 Disadvantages of Automation Testing


Proficiency is required to write the automation test scripts.
Debugging the test script is major issue. If any error is present in the test script, sometimes it
may lead to deadly consequences.
Test maintenance is costly in case of playback methods. Even though a minor change occurs in
the GUI, the test script has to be rerecorded or replaced by a new test script.
Maintenance of test data files is difficult, if the test script tests more screens.

1.6 Functional Testing tools

Functional Testing Tools


Open Source Commercial
Selenium-1.0 QTP
Web driver 2.0 Test Partner
Sahi Test complete
Bad Boy RFT
Ruby Silk
Watir

1.7 Selenium vs. QTP

Selenium QTP
Open source Paid tool
Works on all OS (Windows, OS X, Linux, Solaris) Works on Windows
Tests only Web applications Tests web and desktop applications
Works on almost all browsers(IE, Firefox, Safari, Works on Firefox 3.5.x and IE
Opera)
Code can be made in any one of languages VB Script
such as Java, C#, Ruby, Python, pearl, php etc
Html ID, Xpath, CSS, DOM, Link text Object properties, Repository objects
There is no option, can record script in GUI Spy
Selenium IDE, can spy objects using IE
developer tool bar, Firebug and also using

3
http://saucelabs.com/builder
IDE sometimes does not record some events Recording is a little reliable
Set of Libraries, around 20MB (Need to include Around 1.5GB
other supporting software)
Saucelabs.com, Element34 , Commercial From HP
Support

2. Selenium IDE
2.1 Introduction
The selenium IDE is the tool you use to develop your selenium test cases by using record and play back.

2.2 History of selenium

 In 2004 invented by Jason Huggins and team


 Originally name is JavaScript Functional Tester (JSFT)
 Open source browser based integration framework built originally by Thought Works
 100% JavaScript and HTML
 Web Testing Tool
 That supports testing web 2.0 applications
 Supports for cross –Browser testing (On Multiple browsers)
 Supports multiple operating systems

2.3 Selenium Components

 Selenium IDE (Integrated Development Environment) - Record & Play back


 Selenium Core –Runs the test suits on the web server where the web application is deployed
 Selenium RC 1.0 – Server /Client (Selenium. Start /Selenium. Stop)
 Selenium Grid – Performance Tool
 Selenium 2.0 (Known as selenium Web Driver)

2.4 Advantages
 It’s an easy –to-use
 It’s just Firefox plug in and is generally the most efficient way to develop test cases
 Very useful tool for beginners
 Firefox extension which allows record/Play testing paradigm
 Creates the simplest possible locator based on selenes
 Look at various possible commands in the dropdown
 Records a test at HTML file
 We can export the test as Java /Ruby etc...

2.5 Disadvantages
Selenium-IDE does not directly support:
 Condition statements
 Iteration or looping
 Logging and reporting of test results
 Error handling, particularly unexpected errors
 Database testing

4
 Test case grouping
 Re-execution of failed tests
 Test case dependency
 Capture screenshots on test failures
 Results Report generations

2.6 Installation
 Open Mozilla firefox browser and type http://seleniumhq.org/download in the url and hit enter.
 The following window appears.

 Click on the latest version link in Selenium IDE section as shown above. The follow pop up appears as shown
below. Click on the Allow pop up.

5
 Click on the Allow pop up and the following window appears.

 Click on Install Now button

6
 Restart Firefox
 Navigate to -> tools option here we can find IDE

Selenium IDE looks like below

7
2.7 Recording

 Recording user actions with respect to user objects


 In selenium we have two types of recording options

2.8 Challenges in Selenium IDE.


 How to record a simple test case.
 How to prepare a test suite.
 How to run a test case and a test suite.
 Data Base connectivity links.
 How to write the scripts on your own.
 How to run from the middle of the script.
 How to insert the statements in the middle of the scripts.
 How to verify the text on the pop up.
 Difference between verify and assert.
 Why Selenium IDE is using in industries still.
 Converting of code.
 Purpose of all the buttons.
 Align the test cases in test suite.
 Aligning of statements in script.

3. Requirements of Selenium Webdriver.


3.1 HTML
To start automating any web application it is required to have a web application. This topic explains how to
create a small webpage in our own machine.

Let is create a web page which has the following elements in it.

i. User name Text box.


ii. Password Text box.
iii. Login button.
iv. Reports check box.
v. Two radio buttons- Male and female.
vi. One link named google – If link is clicked it should redirect to Google page.
vii. One image.
viii.
ix. One image with the link – If clicked on the image it should redirect to flipkart.
x. Single select drop down.
xi. Multi-select drop down.
xii. Text area.
xiii.Browse button.

The page should appear as follows.

8
This is the required web page. The HTML code should be as follows.

<html>

<head>

<title>Welcome to html</title>

</head>

<body>

Username:<input type="text" name="uname"/>

Password:<input type="password" name="pwd"/>

<input type="button" id="but" value="Login"/>

<input type="checkbox" id="rep"/>Reports

<table >

<tr>

<td><input type="radio" name="gender" id="female"/> Female</td>

<td><input type="radio" name="gender" id="male"/> Male</td>

9
</tr>

</table>

<table >

<tr>

<td><a href="http://google.com" class="myclass">Google </a></td>

</tr>

</table>

<table >

<tr>

<td><img src="mobile.jpg"/></td>

</tr>

<tr>

<td><a href="http://flipkart.com" >

<img src="flip.jpg"/></a></td>

</tr>

</table>

<table>

<tr>

<td><select name="city">

<option value="1">Bangalore</option>

<option value="2">Chennai</option>

<option value="3">Kolkatta</option>

<option value="4">Delhi</option>

</select></td>

<td><select name="city-multiple" multiple="">

<option value="1">Bangalore</option>

10
<option value="2">Chennai</option>

<option value="3">Kolkatta</option>

<option value="4">Delhi</option>

</select></td>

</tr>

</table>

<table >

<tr>

<td><textarea name="description"></textarea></td>

<td><input type="file" name="browse"/></td>

</tr>

</table>

</body>

</html>

Write the above code in Note pad and save as filename.html. Double click on the file where it is saved. The required
html is obtained.

The given below shows the detailed html tags.

Mandatory Additional
Sl.no Element HTML Tag Property Value property Value
1 Text box input type text Name/ID User defined

2 Password Box input type password Name/ID User defined


3 Button input type submit/button Name/ID User defined
4 Checkbox input type checkbox Name/ID User defined
Name and
5 Radio button input type radio ID User defined
6 Link a href internal/external
path of the
7 Image img src image
Single select
8 Combo Box select Name/ID User defined
Multi Select
9 Combo Box select multiple TRUE Name/ID User defined
10 Text area textarea Name/ID User defined

11
11 File Browser input type file Name/ID User defined

3.2 Java

4. Web Driver
There are only two actions performed in any automation tool.

i. Element identification
ii. Performing action on the particular element.

There are 8 different element locators. They are as follows.

1. ID.
2. Name.
3. Link text.
4. CSS Selectors.
5. XPath.
6. Partial Link text.
7. Class name
8. Tag name.

4.1 Element identification in selenium.


If any element has name or id property we can use the value of id or name property to identify the
element. If the element is a link we can use the link text to identify it. If the element does not have id or
name property and if it is not a link then we need to write either Css selector or Xpath expression.

Elements are generally identified by its html tag, its properties and values. To identify an element, we
should be able to inspect the html source of the element. By default each browser provides an inspector
tool.

F-12 Inspect element in all browser.

On Mozilla firefox we generally do not use the default inspector, we use and add-on called firebug.

Steps to install firebug.

In google type firebug. Click on firebug. Add-ons for firefox. In the add-ons page click on the button
add to firefox which will download the add-on and throw a pop up.

4.2 Element identification using Css selectors:


Css selectors can be used to identify the elements which don’t have id or name property and they are not
links.
Css selectors use the HTML tag properties and values of the element to identify the element.
Eg. To identify the button with the HTML source.

12
HTML source:
<input type=”submit” value=”login”/>

The Css selector value is:


input[type=”submit”]

The syntax is:


html tag[property=”value”]

We can use any property value pair to identify the element. To evaluate the Css expression, we can use the
tool called firepath which is an add-on for the firefox and an extension for firebug.

Css Expression for:


Textbox: input[type=”text”]
Button: input[type=”submit”]
Checkbox: input[type=”checkbox”]
Radio: input[type=”radio”]
Link: a
Image: img
Select: select
Textarea: text area

If any element has an id property we can use the generic expression


Syntax:
html tag#Propertyvalue
Example:
input#reports
If any element has a class property we can use the generic expression
Syntax:
html tag.Classname
Example:
input.linkclass

Css is mostly used for buttons.

4.3 Element identification using Xpath:

To identify elements in the web page, we can use Xpath expression. There are two categories of X-path.
They are Xpath-position and X-path attributes.

13
4.3.1 X-path position (absolute Xpath):

To identify an element by its position in html hierarchy we can use Xpath position.
Example: For the above html page, if we want to find out the Xpath for username text box. Then the Xpath will be.
html/body/input[1]
Xpath position is nothing but finding out the exact position of the element in the html page. This is applicable for
small web pages which are constant.
If the Html structure is
<html>
<Body>
<table>
<tbody>
<tr>
<td>
<input>
</td>
</tr>
</tbody>
</table>
</body>
</html>
The Absolute Xpath Would be
Html/body/table/tbody/tr/td/input

4.3.2 Xpath Attributes(relative Xpath):


a) Attributes
Identifying an element using its set of attributes and values is called Xpath attributes.
The Syntax is
//html tag[@attribute=’value’]

14
Example 1:

Example 2:
//input[@type='text' and @name='uname']

Identification of
Check box  //input[@type=’checkbox’]
Radio button  //input[@type=’radio’]
Link //a
Image img
Table//table
Image with link  //a/img

b) Text()

Finding an element by its text using text()


Syntax:
//html tag[text()=’Value’]
Example: To find a link where text is google
//a[text()=’Google’]
//a[text()=’Big brother’]
Note: text() is an exact match function and it will not be able to match an element, if the text of the element
has spaces on either side.

c) Contains(text())
Contains text is the pattern matching function which can be used to match an element with any text in the
pattern.
Syntax:
//html tag[contains(text(),’value’)
Example:
//a[contains(text(),’Google’)]
Note:
Text()  exact match
Contains  pattern match
d) Contains(attribute)
To find a link with its part of attribute value we use contains attribute.
Syntax:
//html tag[contains(@attribute,’value’)]
Example:
//input[contains(@id,’fema’)]

15
Finding the parent and child element of html tags
To find the child elements of html tag we can use the syntax
//parent html tag/ child html tag
Example:
//a/img  output is img which is child of link.
To find the parent of a child we can use the syntax
//parent html tag [Child html tag]
Example:
//a[img]  output is a

Dynamic changing elements

To identify dynamic elements using Xpath we can take the help of dependent and independent concepts.

Following are the steps to find dynamic elements:

1) Identify dependent and independent elements

Independent elements generally will be unique elements based on which all the action are performed.

Example: a) Name of the mobile is independent while the price is dependent


b) Title of the book is independent and author of the book is dependent
Independent elements are not duplicated for that particular table.
2) Right click on independent element and inspect the element for the independent element.
3) Find the immediate common parent for both dependent and independent elements.
Note: In firebug move the mouse courser from the independent element upwards in the html till an html
tag covers both the dependent and independent element.
4) From the immediate common parent write the tree structure

5) Write the Xpath expression to find the immediate common parent from the independent element
Note: The concept used here will be finding the parent and the syntax will be square braces ( [ ).
Example:
//tr[td[a[text()='Bing']]]
6) Write the Xpath expression to find the dependent element from the immediate common parent.
Note: The concept used here will be finding the child and the syntax will be slash ( / ).
Example:
1) //tr[td[a[text()='Bing']]]/td[3]/input
2) //div[div[div[div[a[contains(text(),'Ophelia and the Marvellous Boy (Paperback)')]]]]]/div[2]/div[1]/div[3]/a

16
This Xpath can be reduced as
//div[div[div[div[a[contains(text(),'Ophelia and the Marvellous Boy (Paperback)')]]]]]//a[text()='Buy Now']
Or
//div[div[div[div[a[contains(text(),'Ophelia and the Marvellous Boy (Paperback)')]]]]]/descendant::a[text()='Buy
Now']
Descendant function can be used to find descendant child element under the immediate common
parent.
Descendant() matches the element at any level in the hierarchy under the parent
Note: we can use either // or descendant::

Absolute Xpath:
To identify the xpath, open the application in the chrome browser, right click on the target element,
inspect, single click on the tag name and press ctrl+F.

Single forward slash (/) is used to move from parent tag to child tag.

Identifying the position of the element in the HTML hierarchy is called as absolute xpath.

Absolute Xpath can be used for small and static pages.

Relative Xpath:

Double forward (//) used in the beginning of the expression, followed by the html tag, searches that
particular html tag in the entire html page.

Text() is an exact pattern match function, whereas contains(text()) matches a part of phrase in it.

Xpath for Dynamic elements:


1. Identify dependant and independent elements
Note: Dependent element is the target element and independent element is the element on which the
target element is depended.

2. Identify the xpath for independent elements


Note: Right click on the independent element, inspect and identify the xpath for independent element.
Example: //a[text()='Bing']

3. From the independent element move to the common parent.


Note: The concept used here will be moving from child tag to the parent tag and the syntax is slash ..
(/..)
Example: //a[text()='Bing']/../..

4. From the common parent move to the target element.


Note: The concept used here will be moving from parent tag to child tag and the syntax is single
forward slash(/)
Example: //a[text()='Bing']/../../td[3]/input

17
5. WebDriver
Web driver is an automation tool which can be used to automate web applications .

Installation of webdriver:

1. Create a Java Project in eclipse.


2. Convert the Java project into a web driver project.
3. To convert the java project into a web driver project download the selenium standalone server and
configure the selenium stand alone server to the java project
4. To download goto www.selenium.dev  Downloads Previous releases  here  2.53.1 
Selenium-server-standlaone-2.53.1.jar.
5. Copy the selenium stand alone server from the downloads folder and paste it into the project
folder
6. To configure right click on the java project  Build path  Configure build path  Libraries tab 
Add external jars  select the selenium stand alone server jar  Apply and close.

To open the browser we use the code


WebDriver driver=new FirefoxDriver();

To import

1. Click on the error icon and select the import statements


2. Control + Shift + O
3. While typing program get it from the help menu. Use control + space(Recommended)

Note: Stop the update of firefox browser.

How to stop the update of firefox browser?


In firefox browser goto tools  Options  Advanced  Update tab  Never check for updates (not
recommended: security risk).

To download 46.0 version of firefox goto https://krninformatix.com/download.php

18
The browser opened by the webdriver is a light-weighted browser and it does not hold any history and add-ons.

 Java client driver


 IDE

Java client driver can be downloaded from

http://code.google.com/p/selenium/downloas/list

And the file name is

selenium –server-standalone-2.35.0.jar

The version changes based on

1.Firefox version update


2.Enhancement or bugfixes

Create a folder in the hard disk, launch eclipse and set the folder as works space.

Create a new java project in eclipse

Under the project source folder, create a new package

Create a java class with public static void main() to launch firefox browser, the code is web driver

Right Click on Project  Build Path  Configure Build path  Libraries  Select the Path of stand
alone server and click on OK. Selenium configuration is done.

Note: Disable the firefox update.

The firefox browser launched by the web driver will not have history or add-ons.
A bottom right corner you have webdriver. By default it will be minimized.
driver.get() will continue to wait until the page has loded completely

Write down the following code in the java class to open a browser.
package Basics;

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

public class Demo {

public static void main(String[] args) {


WebDriver driver=new FirefoxDriver();
}
}

19
To launch application the code is
package Basics;

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

public class Demo {

public static void main(String[] args) {


// to open the browser
WebDriver driver=new FirefoxDriver();
// to launch an application and open the URL
driver.get("http://www.gmail.com");
// to quit the browser
driver.quit();
}
}

To identify the element webdriver provide a method called findelement() which takes an argument of By
class which has eight element locators.

To perform a type of action

WebElement un=driver.findElement(By.id("username"));
un.sendKeys("admin");

OR

driver.find element (by name (“username”).sendkeys(“admin”);

5.1 Checkpoints verification in automation:

Every single point under the expected column in manual test case should be present as a checkpoint in the
automation test script. Selenium recommends 4 different checkpoints

1) Title
2) Text
3) URL
4) Element

Title checkpoints

Comparing the expected title with the actual title from the application. To get the actual title we can use
driver.getTitle().

WebDriver driver=new FirefoxDriver();


driver.get("http://demo.actitime.com");
String expectedTitle="actiTIME - Login";

20
String actualTitle=driver.getTitle();
//System.out.println(expectedTitle);
if (actualTitle.equals(expectedTitle)) {
System.out.println("Pass");
}else{
System.out.println("fail");
}

2) Text checkpoint

Text checkpoint can be used to compare any text on the application page

Text will generally be inside an html tag (span, td, div, p, b). To get the text we have to find the element and
use the method getText();

WebDriver driver=new FirefoxDriver();


driver.get("http://demo.actitime.com");
driver.findElement(By.id("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.linkText("Login")).click();
Thread.sleep(10000);
String expectedText=driver.findElement(By.xpath("//td[text()='Enter Time-Track']")).getText();
//System.out.println(expectedText);
String actualText="Enter Time-Track";
if (expectedText.equals(actualText)) {
System.out.println("Pass");
}else{
System.out.println("fail");
}

5.2 Element Check points


How do you know whether a checkbox is selected or not.

We can use the driverfindElement() to find the checkbox and use the method isselected() which will return
a boolean, if true checkbox is selected and false if checkbox is unselected.

WebDriver driver=new FirefoxDriver();


driver.get("file:///C:/Users/pratap/Desktop/Batch19/mypage.html");
//find the status of the check box
boolean chkBoxStatus=driver.findElement(By.name("Rep")).isSelected();
System.out.println(chkBoxStatus);
// click on the check box
driver.findElement(By.name("Rep")).click();
//find the status after clicking on the checkbox
boolean chkBoxStatus1=driver.findElement(By.name("Rep")).isSelected();
System.out.println(chkBoxStatus1);
driver.findElement(By.name("Rep")).click();
//find the status after clicking on the checkbox
boolean chkBoxStatus2=driver.findElement(By.name("Rep")).isSelected();

21
System.out.println(chkBoxStatus2);

Output:
false
true
false

How do you know whether a radio button is selected or not.

We can use the driverfind() element to find the radio button and use the method isselected() which will
return a boolean, if true radio button is selected and false if radio button is unselected.

WebDriver driver=new FirefoxDriver();


driver.get("file:///C:/Users/pratap/Desktop/Batch19/mypage.html");
boolean radioStatus=driver.findElement(By.id("male")).isSelected();
System.out.println(radioStatus);
driver.findElement(By.id("male")).click();
boolean radioStatus1=driver.findElement(By.id("male")).isSelected();
System.out.println(radioStatus1);
driver.findElement(By.id("male")).click();
boolean radioStatus2=driver.findElement(By.id("male")).isSelected();
System.out.println(radioStatus2);

Output:
false
true
true

5.3 WORKING WITH SELECT DROPDOWNS


To work with select html tag elements (single select combo box or multi select list box). We need to use
select class

On a select html tag element we can do the following.

1. Select an option or select multiple options.


2. Deselect options from multi select list box.
3. Get all available option.
4. Get all selected option from list box
1. To select an option from single select combo box or to select multiple options from list box select class
provides 3 different methods.
1. selectByindex()
2. selectByValue()
3. selectByVisibleText()
1) Select by index takes an integer argument which is zero based index of the option to be selected. By
default each option tag will have an index starting from zero.
2) Select by value takes a string argument which is value of the attributes of the option tag.
3) Select by visible text takes a string argument which is text of option tag to select.

22
In multi select list box the same method will be used however, if we write select methods multiple times in
the code, it will select multiple options from the list box.

WebDriver driver=new FirefoxDriver();


driver.get("file:///C:/Users/pratap/Desktop/Batch19/mypage.html");
//find the city drop down using driver.findElement
WebElement city=driver.findElement(By.name("city"));
//pass the WebElement city as an argument to the constructor of the Select class
Select dd=new Select(city);
//Using the object of select class, select option
dd.selectByIndex(2);
Thread.sleep(5000);
dd.selectByValue("4");
Thread.sleep(5000);
dd.selectByVisibleText("Chennai");

Multi select:

WebDriver driver=new FirefoxDriver();


driver.get("file:///C:/Users/pratap/Desktop/Batch19/mypage.html");
WebElement city=driver.findElement(By.name("cities"));
Select dd=new Select(city);
dd.selectByIndex(2);
Thread.sleep(5000);
dd.selectByValue("4");
Thread.sleep(5000);
dd.selectByVisibleText("Chennai");

2. Deselecting options from multi select list box.

To deselect all of the options we can use deSelectAll().

To deselect individual options we can use

deselectByIndex(),

deselectByValue() or

deselectByVisibleText().

3. To get all available options select class provides a method getOptions() which returns a collection of all the
options in the select dropdown. This collection is represented as a list of webElement. Using a for loop we
can iterate the list, get each element from the List<WebElement> print the text of each element (Text of
the option tag or visible text).

WebDriver driver=new FirefoxDriver();


driver.get("file:///C:/Users/pratap/Desktop/Batch19/mypage.html");
//find the city drop down using driver.findElement
WebElement city=driver.findElement(By.name("city"));

23
//pass the WebElement city as an argument to the constructor of the Select class
Select dd=new Select(city);
//Using the object of select class, select option
dd.selectByIndex(2);
Thread.sleep(5000);
dd.selectByValue("4");
Thread.sleep(5000);
dd.selectByVisibleText("Chennai");
//to know all options in a select drop down
List<WebElement> allOptions=dd.getOptions();
int k=allOptions.size();
System.out.println(k);
for (int i = 0; i < k; i++) {
// to get each element from list
WebElement option=allOptions.get(i);
String text=option.getText();
// Print the text of each element
System.out.println(text);
}
4. To get all the selected options from a multi select list box, we can use the method getAllSelectedOptions()
which returns a list of web element (Collection of all the select options). We can use a for loop and get
each selected option and print the text of each element.
WebDriver driver=new FirefoxDriver();
driver.get("file:///C:/Users/pratap/Desktop/Batch19/mypage.html");
WebElement city=driver.findElement(By.name("cities"));
Select dd=new Select(city);
dd.selectByIndex(2);
Thread.sleep(5000);
dd.selectByValue("4");
Thread.sleep(5000);
dd.selectByVisibleText("Chennai");
Thread.sleep(5000);
//dd.deselectAll();
List<WebElement> allOptions=dd.getAllSelectedOptions();
int k=allOptions.size();
System.out.println(k);
for (int i = 0; i < k; i++) {
WebElement option=allOptions.get(i);
String text=option.getText();
System.out.println(text);
}
}

24
5.4 TO FIND THE VALUE ATRIBUTE OF AN ELEMENT

We can use driver.findElement() to find element and use the method getAttribute() and pass the attribute
name as an argument which will return the value of the attribute.

WebDriver driver=new FirefoxDriver();

driver.get("http://demo.actitime.com");

String attValue=driver.findElement(By.id("username")).getAttribute("class");

System.out.println(attValue);

5.5 WORKING WITH MULTIPLE ELEMENTS:


Web driver provides a method findelements() which can be used to find multiple elements based on the
element locater.
Eg: To find all links in a page

Note: If we have images with links it prints spaces.

WebDriver driver=new FirefoxDriver();


driver.get("http://www.flipkart.com/");
List<WebElement> allLinks=driver.findElements(By.xpath("//a"));
int k=allLinks.size();
System.out.println(k);
for (int i = 0; i < k; i++) {
WebElement link=allLinks.get(i);
String text=link.getText();
System.out.println(text);
}
Find number of check boxes in a page and check all check boxes.
To find number of checkboxes in a page we can use driver.findelements() and the elements locater either
xpath or css selection

WebDriver driver=new FirefoxDriver();


driver.get("http://www.gsmarena.com/samsung-phones-9.php");
List<WebElement> allCheck=driver.findElements(By.xpath("//input[@type='Checkbox']"));
int l=allCheck.size();
System.out.println(l);

To check all checkboxes we can use loop through the list of using for loop. Get each element from the list
using get() which will return a web element and use click() to check the checkbox.

25
for (int i = 0; i < l; i++) {
WebElement check=allCheck.get(i);
check.click();
}

CONCEPT OF SYNCHRONIZATION IN WEB DRIVER:

Synchronization refers to matching the speed of script execution with the speed of application. In web
driver we can use implicitlyWait() to achieve the synchronization

How does it works?

Every driver.findElement() checks if implicitlyWait() is defined. If it is defined web driver will wait
for the element to be found till the duration specified in implicitlyWait() and if the element is found within
the duration, it will try to perform the action and if the element is not found within the duration it will
throw an exception NoSuchElementException

ImplicitlyWait() its defined once for the automation.

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

26
Fluent Wait
The fluent wait is used to tell the web driver to wait for a condition, as well as the frequency with
which we want to check the condition before throwing an "ElementNotVisibleException" exception.

Frequency: Setting up a repeat cycle with the time frame to verify/check the condition at the
regular interval of time

HOW TO HANDLE TOOL TIPS:


There are totally 7 kinds of pop ups.
1. Tool tip – Moving the mouse over the image.
- Clicking on the image link?
2. Calendar pop up
3. Java Script alert and confirmation pop up.
4. Page on load authentication pop up.
5. File download/upload.
6. New browser pop up/New tab.
7. Light box/Model window.
1. How to handle tool tips:
Tool tips are two types
1) Generated using title attribute
2) Has a pop up in the html(division pop-up)

If the tool tips coming from the title attribute, we can find the element and use getAttribute() to get tool tip
text.

If the tool tips coming from div pop up we can find div using driver.findElement() and use getText() to get
text from the division

WebDriver driver=new FirefoxDriver();


driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.flipkart.com/samsung-galaxy-s-duos-2-s7582/p/itmdqzpfvmmzzxme?
pid=MOBDQZPYAZSDKBWH&srno=b_1&ref=930dfd23-203e-4a60-abcb-bfcf06f27fcf");
String tooTip=driver.findElement(By.id("visible-image-small")).getAttribute("title");
System.out.println(tooTip);
driver.findElement(By.id("fk-shipping-info-link")).click();
String tooltip2=driver.findElement(By.id("fk-shipping-info-message")).getText();
System.out.println(tooltip2);

2. Calendar pop-ups.
There are generally two kinds of calendar fields.
a. Which allows you to type the date.

27
b. Which allows you to select the date from the calendar pop up.

If the calendar allows to type the date use driver.findElement() and sendKeys().

If it is a pop up then click on the calendar icon to make the calendar icon visible. Use an Xpath to find the
date and click on it.

Note: Calendar pop up will generally be in a table structure. Web driver cannot identify the hidden
elements.

WebDriver driver=new FirefoxDriver();


driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://www.yatra.com");
driver.findElement(By.xpath("//i[@class='sprite calenderIcon' and
@onclick='BE_Flights_Action.openDepartDateCalender();']")).click();
driver.findElement(By.xpath("//a[@id='a_2014_5_27']")).click();

3) Java script alert confirmation pop-up

Alert – has only one button i.e., ok


Confirmation - has more than one button i.e., ok and cancel.
Prompt – has ok, cancel and text box.

Java script alert or confirmation cannot be handled by driver.findElement() as it does not have any
html structure. Java script alert is generated from alert() of java script and has one button ‘ok’ and is used
to provide the user some information.

Confirmation pop-up is generated from confirm() method of javascript and has two buttons, ok and
cancel and based on the inputs execution happens.

To handle javascript alert or confirmation pop-up, we need to first switch to the pop-up using
driver.switchTo().alert() which will return on object of alert. Using this object we can

1)click on ok using accept ()

2)click on cancel using dismiss()

3)get the text on the pop-up using get text

4) type the text on the pop up using sendkeys()

28
WebDriver driver=new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://demo.actitime.com/");
driver.findElement(By.id("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.linkText("Login")).click();
driver.findElement(By.xpath("//a[@href='/tasks/otasklist.do']")).click();
driver.findElement(By.linkText("Projects & Customers")).click();
driver.findElement(By.xpath("//span[text()='Create Customer']")).click();
driver.findElement(By.name("name")).sendKeys("prathap");
driver.findElement(By.xpath("//input[@onclick='cancelCustomerCreation();']")).click();

Alert alt=driver.switchTo().alert();
String alertText=alt.getText();
System.out.println(alertText);
//driver.switchTo().alert().accept();
alt.dismiss();

PAGE ONLOAD POP-UP

Handling page on load authentication pop-up.

By default selenium cannot handle page on load authentication pop-up. To overcome the problem
we can pass the username and password in the URL with the following syntax.

http://username:password@ipaddress/domainname

File Upload Pop up:

How do you do file upload in webdriver?

We can use driver.findElement() to find the element and use sendKeys() and pass the full path of
the file as an argument to the sendkeys.

File download pop-up in firefox

To save a file to disk automatically without the pop-up, we can take help of Firefox preferences by using
Firefox profile.

Case 1:

To save the file to the downloads folder, we can use the preference
browser.helperApps.neverAsk.saveToDisk and provide the file MIME type as a value for the preference i.e.,

29
application/zip. If there are multiple files types to be download we can provide (,) separated list of MIME
types of all the files.

FirefoxProfile prof=new FirefoxProfile();


prof.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/zip");

Case 2:

If the file has to be downloaded to desktop along with browser.helperApps.neverAsk.saveToDisk


preference we need to provide another preference which is browser.download.folderList with an integer
value 0.

By default the value for browser.download.folderList will be 1 which represents download folder.

FirefoxProfile prof=new FirefoxProfile();


prof.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/zip");
prxof.setPreference("browser.download.folderList", 0);

Case 3:

Save file to custom folder path.

To download a file to custom folder path we need to set the preference browser.download.folderList with
integer value 2 and we also need to set the preference browser.download.dir with the value which is
custom folder path.

FirefoxProfile prof=new FirefoxProfile();


prof.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/zip");
prof.setPreference("browser.download.folderList", 2);
prof.setPreference("browser.download.dir","D:\\Docs");

Note: Don’t forget to set the preference in Firefox class which is done in common for each case.

Preference name can be taken from about:config of Mozilla firefox browser


MIME type can be taken from google or https://www.sitepoint.com/mime-types-complete-list/

New Tab/New Window/ New Browser/ Light box or modal window

Problem:

30
By default webdriver does not understand the elements in the browser pop ups. The control of the
webdriver will be in the parent window and when we say driver.findElement(), it tries to find the element
in the parent window(). Webdriver does not transfer the control to the new browser automatically.

Solution:

We have to transfer the control to the browser pop up using driver.switchTo().window(). Window()
accepts a string argument which is the window handle of the browser to switch to. We can get the window
handles of all the browsers that was opened during that execution by using the method
driver.getWindowHandles(). getWindowHandles() returns a Set<String> which contains all the window
handles. We can use an iterator and get each window handle by using the next().

The first time next() is used it gets first element in the set, the second time the next method is used
it gets second element in the set and so on. We can store this window handle in the String reference and
pass it as an argument to driver.switchTo().window().

After performing action on the browser pop up, if we want to close the popup, we can use
driver.close(). This method will close the current browser where control is present. If the browser is closed
control does not transfer to the parent browser automatically. We have to use driver.switchTo().window()
to transfer the control.

When we click on the link which opens in a new tab, webdriver will open it in a new window.

Working menu drop down:

If we want to click on a sub-menu item which will be visible when we move the mouse on to parent
menu, we can use Actions class. Actions class provides methods to perform mouse and key board related
actions.

Sub-menu items or link will not be visible until we move the mouse on parent menu item or link. If
the element is not visible, web driver cannot perform the action. Hence we need to stimulate moving to
parent menu item so that drop down with sub-menu links is visible and web driver can find the sub menu
items.

We can use moveToElement() and pass parent menu as an argument which will stimulate the drop
down menu.

How do you perform right click using web driver?

The right click menu is called context menu. We can use the Actions class ContextClick() to perform
right click.

How to perform key board action?

We can use sendKeys() of Actions class to send any key. We can also use sendkeys() for Web
Element to send any key. Keys enumerator provides all the keys of the key board and can be used to
sendKeys() like tab, control, alt, shift, etc...

To Press the combination of the keys we need to use build().

WebDriver driver=new FirefoxDriver();

31
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.get("http://yatra.com/");
WebElement parentMenu=driver.findElement(By.xpath("//a[@href='http://www.yatra.com/holidays/
india-tour-packages' and @data-pagetrackvalue='/Clicks/GN/Holidays']"));
Actions act=new Actions(driver);
act.moveToElement(parentMenu).perform();
//WebElement subMenu=driver.findElement(By.xpath("(//a[@href='http://railtourpackages.yatra.com/
trainpackages/home'])[1]"));
//act.moveToElement(subMenu).perform();
act.contextClick(parentMenu).perform();
//System.out.println("Begin");
//act.sendKeys("T").perform();
act.sendKeys(Keys.DOWN).perform();
act.sendKeys(Keys.ENTER).perform();

DRAG AND DROP:

We can use the dragAndDrop() of Action class which takes two arguments source and target.

IDENTIFYING SOURCE:

When we move the mouse type to the element if the curser type changes to move that part can be
used to drag. The part which can be dragged will generally have a class property with the value drag or
class name will have the drag.

WebDriver driver=new FirefoxDriver();


driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.get("http://www.dhtmlgoodies.com/submitted-scripts/i-google-like-drag-drop/");
Actions act=new Actions(driver);
WebElement source=driver.findElement(By.xpath("//div[@id='block-1']/h1"));
WebElement target=driver.findElement(By.id("block-3"));
act.dragAndDrop(source, target).perform();

Scrolling a page in selenium


We can use java script to scroll down the page in selenium. The java script to scroll down the page
in selenium is window.scrollby(0,250). To execute the java script inside the java program we can take help
of executeScript() which is available in JavaScriptExecutor interface.

BROWSER ACTIONS:

32
// Maximize the browser
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
//driver.get("http://demo.actitime.com");
// alternate to driver.get()
driver.navigate().to("http://demo.actitime.com");
driver.findElement(By.id("username")).sendKeys("admin");
driver.findElement(By.name("pwd")).sendKeys("manager");
driver.findElement(By.linkText("Login")).click();
driver.findElement(By.xpath("//a[@href='/tasks/otasklist.do']")).click();
//to get current url
String Url=driver.getCurrentUrl();
System.out.println(Url);
Thread.sleep(5000);
//simulate browser back button action
driver.navigate().back();
Thread.sleep(5000);
//simulate browser forward button action
driver.navigate().forward();
Thread.sleep(5000);
//simulate browser refresh button action
driver.navigate().refresh();
driver.close();

WORKING WITH IE:


REQUIREMENTS
Driver executable which can be downloaded https://www.selenium.dev/downloads/
Depending on the Version Download the respective browser driver i.e., IEDriverServer.exe
IE Setting
The following setting has to be done to IE.
1) Make sure browser zoom level is set to 100%. Press ctrl+0 to set Zoom level to 100%.

In selenium script write the following code.

System.setProperty("webdriver.ie.driver", "D:\\Seleniumprogs\\workspace\\Batch18web\\
IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();

WORKING WITH THE GOOGLE CHROME REQIREMENT:

Requirements.

Driver executable which can be downloaded from http://docs.seleniumhq.org/download/

Go to section – Third party browser driver, click on download page against chrome. Download
chromedriver.exe. In eclipse write the following code.

System.setProperty("webdriver.chrome.driver", "D:\\Seleniumprogs\\workspace\\Batch18web\\
chromedriver.exe");
WebDriver driver=new ChromeDriver();

33
How to scroll down a page in selenium:

We can use javascript to scroll down a page in selenium. The java script to scroll down the
page in selenium is “window.scrollBy(0,250)”. If we want to execute javascript inside java
program, then we need to take help of executeScript() method which is available in java script executor
interface.

Untrusted connection:

Firefox automatically handles untrusted connection. Change the system time to 2 years back and open a
secures site like www.gmail.com

HOW TO HANDLE UNTRUSTED CERIFICATES CONNECTION ISSUES.

By default, Google chrome and Firefox automatically handles untrusted connection issues. However
internet explorer doesn’t handle it automatically. We have to use java script to overcome the problem

System.setProperty("webdriver.ie.driver", "D:\\Seleniumprogs\\IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();
driver.get("http://gmail.com");
JavascriptExecutor jse = (JavascriptExecutor)driver;
jse.executeScript("document.getElementById('overridelink').click();");

Handling frames in web driver

Problem:

Web driver cannot understand the element present inside an iframe by default. It cannot search
for any element which is present in the iframe DOM.

Solution:

Transfer the control of web driver to the DOM of the iframe using driver.switchTo.frame(). Frame()
is an overloaded method with
frame(int arg)
frame(String arg)
frame(WebElement arg)

1) Frame(int arg)

If the page has one or two iframes we can use this method by passing zero based index of the
frame.

Eg.

driver.switchTo().frame(0);
driver.switchTo().frame(1);

2) Frame(String arg)

34
If an iframe has id or name property we can use the value of the id or the name property to find
the iframe.

Eg.

driver.switchTo().frame(“secondframe”);

3) Frame(WebElement arg)

If we have multiple iframes on the page the frames does not have ID or name property, we can use
the Web Element arg and find the iframe.

Eg.

WebElement frm=driver.findElement(By.xpath(“//frame[@src=’third.html’]”));
driver.switchTo().frame(frm);

After performing the action on an element inside iframe. If we want to come out of the iframe, we
we can use

driver.switchTo().defaultContent();

If we want to switch to the parent frame, then we have to use,

Driver.switchTo().parentFrame();

How to identify the element inside a frame?

Right click on the element in Firefox in the context menu, if it shows This frame which means the
element is inside the frame.

WebDriver driver=new FirefoxDriver();


driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
driver.get("http://timesofindia.indiatimes.com/");
Thread.sleep(20000);
WebElement frm=driver.findElement(By.id("mailroifrm12"));
driver.switchTo().frame(frm);
//driver.switchTo().frame("mailroifrm12");
driver.findElement(By.id("mathuserans2")).sendKeys("2");
driver.switchTo().defaultContent();
driver.findElement(By.xpath("(//a[text()='Entertainment'])[1]")).click();

Excel Library:

Requirements:

Apache poi

We can download apache poi from poi.apachi.org/download.html

35
Go to the binary distribution section  click on the link poi-bin-3.9.20122013.zip which will navigate to a
page with the links called download. Click on the first link to download apache poi.

GETTING DATA FROM AN EXCEL CELL:

1. Get the excel file as an input.


2. Convert the excel file to a work book (Get the workbook object or create the work book object) from
the Excel file.
3. Go to a particular sheet of the Excel (Get the sheet object from the work book).
4. Go to a particular row in the sheet (Get the row object from the sheet).
5. Go to a particular cell in the row (Get the cell object from the row).
6. Get the data from the cell depending on the type of data.

The jar files required to work with Excel is

poi-3.9-20121203.jar
poi-ooxml-3.9-20121203.jar
poi-ooxml-schemas-3.9-20121203.jar

Under the folder ooxml-lib

dom4j-1.6.1.jar
xmlbeans-2.3.0.jar

Program:

package driverPackage;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;

public class ExcelLibrary {

public String getExcelData(String sheetname,int i, int j) {

36
String dataText=null;
try {
FileInputStream fis=new
FileInputStream("../Batch18web/data/data.xlsx");
Workbook wb=WorkbookFactory.create(fis);
Sheet s=wb.getSheet(sheetname);
Row r=s.getRow(i);
Cell c=r.getCell(j);
dataText=c.getStringCellValue();

} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return dataText;

public int getRowNum(String sheetname) {


int rowCnt=0;
try {
FileInputStream fis=new
FileInputStream("../Batch18web/data/data.xlsx");
Workbook wb=WorkbookFactory.create(fis);
Sheet s=wb.getSheet(sheetname);
rowCnt=s.getLastRowNum();

} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvalidFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return rowCnt;

}
}

Program 2:

37
package driverPackage;

import java.util.concurrent.TimeUnit;

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

public class LoginLogout {

public static void main(String[] args) {


WebDriver driver=new FirefoxDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.get("http://demo.actitime.com");
ExcelLibrary xlib=new ExcelLibrary();
int rowNum=xlib.getRowNum("Sheet1");
//System.out.println(rowNum);
for (int i = 1; i <=rowNum; i++) {
String un=xlib.getExcelData("Sheet1",i, 0);
String pw=xlib.getExcelData("Sheet1",i, 1);
driver.findElement(By.id("username")).sendKeys(un);
driver.findElement(By.name("pwd")).sendKeys(pw);
driver.findElement(By.linkText("Login")).click();
driver.findElement(By.linkText("Logout")).click();
}
}
}

TestNG
TestNG (test next generation) is created by Cedric Beust and is a testing frame work which can be used for
white box testing and black box testing. TestNG provides features like multiple test execution, assertions,
results and execution control. These features are essential part of automation and we can use testNG with
selenium to achieve robust automation.

38
Installation of TestNG:
Open Eclipse  Goto Help  Eclipse Market Place  Search for testNG. click on Install, Next, Next and
install now. Half through the installation you will get a pop up which says content is unsigned do you wish
to continue. Click on OK and restart eclipse.

Every testNG class should have @test annotation which will ensure the class can be executed. There can be
multiple methods in a testNG class but each test method should have @test annotation. By default all the
test methods of testNG class will get executed in alphabetical order.

If there are either pre-condition or post condition for the test we can code them in different methods with
@BeforeMethod and @AfterMethod annotation. If there are multiple test methods @BeforeMethod and
@AfterMethod will get execute for each test in that class.

If there are pre and post condition for entire class we can put them under two different methods with
@BeforeClass and @AfterClass class annotation.

package DemoTestNg;

import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;

public class Customer {

@BeforeClass
public void OpenUrl() {
System.out.println("AOpenUrl");
}
@BeforeMethod
public void Login() {
System.out.println("ALogin");
}
@Test
public void createCustomer() {
System.out.println("AcreateCustomer");
}
@Test
public void editCustomer() {
System.out.println("AeditCustomer");
}
@Test(enabled=false)
public void deleteCustomer() {
System.out.println("AdeleteCustomer");
}
@AfterMethod
public void Logout() {
System.out.println("ALogout");

39
}
@AfterClass
public void closeUrl() {
System.out.println("AcloseUrl");
}
}

Output:

AOpenUrl
ALogin
AcreateCustomer
ALogout
ALogin
AeditCustomer
ALogout
AcloseUrl

Creating testNG XML:


If we want to execute multiple testNG classes in a particular sequence then we need to create an xml.

PROCEDURE TO CREATE AN TESTNG XML:

 Right click on the package  Run as testNG test.


 Each time an individual testNG class or a package is executed testng creates an xml in the temp folder.
 Copy the xml file from the temp folder. In eclipse Right click on the project and paste it.
 Edit the Xml as per the order and run the XMl files.

<suite name="Default suite">


<test verbose="2" name="Default test">
<classes>
<class name="DemoTestNg.Test1"/>
<class name="DemoTestNg.BasicTestNg"/>
</classes>
</test>
</suite>

Sequencing order of execution of Test Methods.


1) Using Priority
@Test annotation can be given priority and whichever the annotation has the least priority will get
executed first. Execution will follow ascending order of priority.
public class FirstClass
@Test(priority=0)
public void testCreateCustomer() {

40
System.out.println("Executing create customer");
}
@Test(priority=1)
public void testEditCustomer() {
System.out.println("Executing Edit customer");
}
@Test(priority=2)
public void testModifyCustomer() {
System.out.println("Executing Modify customer");
}
@Test(priority=3)
public void testDeleteCustomer() {
System.out.println("Executing Delete customer");
}
}

2) Ignoring a test method in testNG:

We can use enabled=false to ignore a test method in testNG.

@Test(enabled=false)
public void testEditCustomer() {
System.out.println("Executing Edit customer");
}

3) Sequencing execution order using dependsOnMethods.


dependsOnMethods can be use to sequence test methods and dependsOnMethods accept an array
of String which contains the list of methods which the test methods depends on.

public class FirstClass {


@Test
public void testcreateCustomer() {
System.out.println("Executing create customer");
}
@Test
public void testeditCustomer() {
System.out.println("Executing Edit customer");
}
@Test
public void testmodifyCustomer() {
System.out.println("Executing Modify customer");
}
@Test(dependsOnMethods={"testeditCustomer","testmodifyCustomer"})
public void testdeleteCustomer() {
System.out.println("Executing Delete customer");
}

41
}

4) Assertions:
We can use Assert class of TestNG which has list of static assertEquals()(overloaded static methods)
for comparing the actual and expected (Checkpoints). If the assertion passes the test will be marked as
pass and if assertion fails the test will be marked as FAIL. If there is any statement after the assert, it
will not get executed if assertion fails

5) Skipping test methods:

If we set a test method to depend on another test method and if the assertion fails the dependant
test method will be skipped.

public class NewTest {


@Test
public void createTest() {
String actual="Hello123";
String expected="Hello";
Assert.assertEquals(actual, expected);
System.out.println("This test is pass");
}
@Test(dependsOnMethods={"createTest"})
public void anotherTest() {
System.out.println("Executing another test");
}
@Test
public void firstTest() {
System.out.println("Executing first test");
}
}

FrameWork
Create a folder called frame work. Create a folder called jars inside the framework folder.

Copy selenium stand alone server, apache server and poi jars into the Jars folder.

Launch eclipse and set the framework folder as workspace.’

Create a Java project and in the java settings. Go to libraries tab  Click on Add External Jars and select all
the jar file folder. Click on Add Library and select TestNG library and click on finish.

42
Each Module in the package is created as package in the project and the scenario related to that module
will be created as TestNG classes under the respective classes.

Each scenario will be one TestNG class and one test method to test the functionality. Each module will have
separate xml which can be used to execute scenarios of that module.

The common functionalities which is Pre and Post condition like launching browser, opening URL, Login,
Logout and quitting the browser will be created before and after method and before and after class in a
separate TestNG class called base class. Each automation scenario will extend this base class which will
ensure pre and post conditions are executed.

Base Class.java

package com.mindq.actitime.testbase;

import org.testng.annotations.AfterClass;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;

public class BaseClass {


@BeforeClass
public void OpenBrowserURL() {
System.out.println("Open browser and url");
}
@BeforeMethod
public void Login() {
System.out.println("Login");
}
@AfterMethod
public void Logout() {
System.out.println("Logout");
}
@AfterClass
public void quitBrowser() {

43
System.out.println("Quit Browser");
}
}

CreateCustomers.java

package com.mindq.actitime.tasks;

import org.testng.annotations.Test;

public class CreateCustomers {


@Test
public void testCreateCustomer() {
System.out.println("Create Customer");
}
}

DeleteCustomers.java
package com.mindq.actitime.tasks;

import org.testng.annotations.Test;

public class DeleteCustomers {


@Test
public void testDeleteCustomer() {
System.out.println("Delete Customer");
}
}

CreateReport.Java

package com.mindq.actitime.reports;

import org.testng.annotations.Test;

public class CreateReport {


@Test
public void testCreateReport() {
System.out.println("Create Report");
}
}

DeleteReport.java

package com.mindq.actitime.reports;

import org.testng.annotations.Test;

public class DeleteReport {


@Test
public void testDeleteReport() {
System.out.println("Delete Report");
}
}

44
Implicit, Explicit, & Fluent Wait in Selenium WebDriver
In selenium "Waits" play an important role in executing tests. In this tutorial, you will learn
various aspects of both "Implicit" and "Explicit" waits in Selenium.

Why Do We Need Waits In Selenium?


Most of the web applications are developed using Ajax and Javascript. When a page is loaded
by the browser the elements which we want to interact with may load at different time intervals.

Not only it makes this difficult to identify the element but also if the element is not located it will
throw an "ElementNotVisibleException" exception. Using Waits, we can resolve this problem.

Let's consider a scenario where we have to use both implicit and explicit waits in our test.
Assume that implicit wait time is set to 20 seconds and explicit wait time is set to 10 seconds.

Suppose we are trying to find an element which has some "ExpectedConditions "(Explicit
Wait), If the element is not located within the time frame defined by the Explicit wait(10 Seconds), It
will use the time frame defined by implicit wait(20 seconds) before throwing an
"ElementNotVisibleException".

Selenium Web Driver Waits

1. Implicit Wait
2. Explicit Wait

Implicit Wait
Selenium Web Driver has borrowed the idea of implicit waits from Watir.

The implicit wait will tell to the web driver to wait for certain amount of time before it throws a "No
Such Element Exception". The default setting is 0. Once we set the time, web driver will wait for that
time before throwing an exception.

Explicit Wait
The explicit wait is used to tell the Web Driver to wait for certain conditions (Expected
Conditions) or the maximum time exceeded before throwing an "ElementNotVisibleException"
exception.

The explicit wait is an intelligent kind of wait, but it can be applied only for specified elements.
Explicit wait gives better options than that of an implicit wait as it will wait for dynamically loaded Ajax
elements.

45
Once we declare explicit wait we have to use "ExpectedCondtions" or we can configure how
frequently we want to check the condition using Fluent Wait. These days while implementing we are
using Thread.Sleep() generally it is not recommended to use

Let's consider a scenario where an element is loaded at different intervals of time. The element
might load within 10 seconds, 20 seconds or even more then that if we declare an explicit wait of 20
seconds. It will wait till the specified time before throwing an exception. In such scenarios, the fluent
wait is the ideal wait to use as this will try to find the element at different frequency until it finds it or the
final timer runs out.

Maven:

Maven is dependency management tool from apache which can help us manage the
dependencies like selenium stand alone server, apache poi, etc,. The latest versions
of these api’s will be uploaded in maven repository and we can pull from the
repository and use the latest versions.

Creating Maven Project:


Create a folder, assign the folder as a workspace and open eclipse.
Goto File  New  Other  Maven  Maven Project  Click on create a simple
project check box.
In the configure project window provide a group id i.e. company name e.g. KRN,
TCS, etc. And Provide an artifact ID i.e. Project name e.g. Actitme, gmail, etc. and
click on Next and finish. A Maven Project is created.

46
INTERVIEW QUESTIONS:

1)What is the difference between QTP and Selenium?

A.Selenium

 Selenium is Open source (free of cost)

 Works on all OS (Windows, OS X, Linux, Solaris)

 Tests only Web Applications

 Works on almost all browsers (IE, Firefox, Safari, Opera)

 Code can be made in any one language such as Java, C#, Ruby, Python, Pearl, php etc.

 Html ID, Xpath, CSS, DOM, Link text

 Repository objects There is no option, can record script in Selenium IDE, can spy objects using IE developer
tool bar, Firebug and using http://saucelabs.com/builder

 IDE sometimes does not record some events.

 Set of Libraries, around 20MB (Need to include other supporting software)

 Saucelabs.com, Element34, Commercial, Support.

QTP:

 QTP is a Paid tool.

 Works on Windows

 Test’s web and desktop applications

 Works on Firefox 3.5.x and IE

 VB (visual Basic) Script

 Object Properties, Repository objects

 GUI Spy

 Recording is a little reliable.

 Around 1.5GB

 From HP

2)What are the drawbacks with selenium IDE?

 It is just a Record and Playback Tool.

 Works on Windows

47
 Test’s web and desktop applications

 Works on Firefox 3.5.x and IE

 VB (visual Basic) Script

 Object Properties, Repository objects

 GUI Spy

 Recording is a little reliable.

 Around 1.5GB

 From HP

3)How many element locators are there in selenium and what are they?

There are 8 element locators. They are.

1. Id

2. Name

3. Link Text

4. Css selector

5. Xpath

6. Partial Link Text

7. Class

8. Tag name

4)What is the difference between "Single forward slash" and "Double forward slash"?

Single forward slash is used to move from parent node to immediate child node. Double forward slash- If it is used
in the beginning of expression it will search in the entire HTML page and if it used in the middle of the expression it
will search in its entire parent node.

5)How will you identify the Xpath for dynamic element?

By the help of independent and dependent element. First need to identify dependent and independent element.
Identify the Xpath for independent element and move to it common parent until it covers both the dependent and
independent element. Then identify the Xpath for dependent element by the help of independent element.

6)Tell me the functions used in Xpath.

i)Text()

ii)Contains()

7)What is Web driver?

48
Web driver is an automation tool which is used to automate a web application which has DOM structure.

8)What are the browsers & operating system supported by web driver?

 Works on almost all browsers (IE, Firefox, Chrome, Safari, Opera)

 Works on all OS (Windows, OS X, Linux, Solaris)

9)Can you name some of the methods under web driver or browser Driver?

 findElement()

 get()

 close()

 quit()

 gettext()

 getTitle()

 getWindowHandles()

 getCurrentUrl()

10)How do you validate a page?

By Using Title, Text, URL and Element Check points on the Page.

11)How do you get the Title of the page?

Comparing the expected title with the actual title from the application. To get the actual title we can use
driver.getTitle().

12)How will you compare any text on the application page?

Text will generally be inside an html tag (span, td, div, p, b). To get the text we have to find the element and use the
method getText().

13)How do you get the URL of the page?

By Using driver.getCurrentURL().

14)How do you verify whether a checkbox or radio button is selected or not?

By using driver.findElement(), we identify the element and we use isSelected() which returns us the Boolean value.
We print the Boolean value and if it returns as true then the checkbox is selected and false if checkbox is
unselected.

15)How do you verify whether a logo is displayed or not?

By using driver.findElement(), we identify the element and we use isDisplayed() which returns us the Boolean value.
We print the Boolean value and if it returns as true then the Logo is displayed and if false Logo is not displayed.

49
16)How do you select an option from the "select drop down"?

By using driver.findElement(), we identify the select drop down element. We create Object for the Select class
which takes Web Element as a constructor. Select class has three different mehods namely,

 selectByIndex()

 selectByvalue()

 selectByVisibletext()

We use any one of those methods to select the option from the Select drop down.

17)Can you tell me how many options are there in "select drop down"?

By using driver.findElement(), we identify the select drop down element. We create Object for the Select class
which takes Web Element as a constructor. Select class has a method getOptions which returns a list of Web
Elements. By using a for loop, we can iterate and get the text of individual options.

How to print all the options in the "select drop down"?

To get all available options select class provides a method getoptions() which returns a collection of all the options
in the select dropdown. This collection is represented as a list of WebElement. Using a for loop we can use iterate
the list, get each element from the List WebElement print the next of each element (Text of the option tag or
visibletext).

18)Can you print all the selected options in the "select drop down"?

To get all the selected options from a multi select list box, we can use the method getAllSelectedOptions() which
returns a list of Web Element (collection of all the select options).We can use a for loop and get each selected
option and print the next of each element.

19)How do you identify all the links in the page & print the text of all the links in the page?

By using driver.findElements(), we identify the list of Webelements. driver.findElements() returns us the list of Web
Elements. We use for loop to iterate and print the text of each link.

20)How will you identify all the checkboxes in a page & check all the check boxes?

By using driver.findElements(), we identify the list of Webelements. driver.findElements() returns us the list of Web
Elements. We use for loop to iterate and click each checkbox.

21)How do you select a date from Calender pop up?

Click on the calendar icon which displays us the calendar pop up. Select an xpath for the required date and click on
the selected date by using the click().

22)Can you display ToolTip of an image?

Tooltips are of two kinds.

50
 Generated from the title attribute of the element and this will appear when we mouse over on the element.
This can be achieved by using getAttribute(“title”) which returns the string. The string is the tool tip of the
element.

 When we click on a particular element the pop up will be appeared with the text. This can be achieved by
selecting the popup Web Element and by using getText() we get the text of the pop up.

23)How do you click on "OK" or "Cancel" on javascript alert or Confirmation pop up or Prompt pop up?

To handle Javascript alert or confirmation pop-up, we need to first switch to the pop up using
driver.switchTo().alert() which will return on object of alert. Using this object, we can

 click on ok using accept ().

 click on cancel using dismiss ().

24)How can you get the text on javascript alert,Confirmation & Prompt pop up?

To handle Javascript alert or confirmation pop-up , we need to first switch to the pop up using
driver.switchTo().alert() which will return on object of alert. Using this object, we can
1. Get the text on the pop-up using get text ().

25)How do you type text in prompt pop up?

1. Type the text on the pop-up using SendKeys().

26)How do you handle "Page on load authentication pop up”?

By passing the values in the url itself. Eg. http://admin:[email protected]

27)How do you achieve Synchronization in Webdriver?

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

28)What are the different "waits" available in Webdriver?

1. Implicitly Wait.
2. Explicitly Wait.
3. Fluent Wait.

29)What is the difference between Implicitely Wait & Explicitely Wait?

Impicit Wait:

Implicit Wait time is applied to all the elements in the script.

In Implicit wait, we need not specify "Expected Conditions" on the element to be located.

It is recommended to use when the elements are located with the time frame specified in implicit wait

51
Explicit Wait:

Explicit Wait time is applied only to those elements which are intended by us.

In Explicit Wait, we need to specify "ExpectedConditions" on the element to be located.

It is recommended to use when the elements to use when the elements are taking long time to load and also for
verifying the property of the element like(visibilityOfElementLocated,elementTOBEClickable,ElementToBESelected)

Difference between Implicitely Wait & Explicitely Wait

30)How do you do File Upload in Web driver?

We can use driver.findelement() to find the element and use sendkeys() and pass the full path of the file as an
argument to the sendkeys.

31)How do you File Download in Web driver?

To save a file to disk automatically without the pop up, we can take help of Firefox preference by using Firefox
profile.

32)How do you work with New Browser, New Window or New Tab?

We have to transfer the control to the browser pop up using driver.switchTo().Window(). Window () accepts a string
argument which is the window handle of the browser to switch to. We can get the window handles of all the
browsers that was opened during that execution by using method.

Driver.getwindowhandles().getwindowhandles() returns a set which contains all the window handles. We can use
an iterator and get each window handle by using the next ().

33)How do you perform right click using web driver?

By creating object for Actions class and Actions class has a method called moveToElement(WebElement). By passing
the Webelement as a parameter and using the contextClick() the context menu is appeared. We use sendKeys() to
pass the values in the context menu and select a value from the context menu. It is always required to use perform
() method when we use Actions class methods.

34)How do you send tab keys using Web driver?

By creating object for Actions class and Actions class has a method called sendKeys() where we can send all the key
board special key as parameter for the sendKeys(). It is always required to use perform () method when we use
Actions class methods.

35)How do you do drag and drop using web driver?

By creating object for Actions class and Actions class has a method called dragAndDrop(source,target). We pass
source web element and target web element to dragAndDrop() and we perform drag and drop. It is always required
to use perform () method when we use Actions class methods.

36)How do you launch IE browser and chrome browser?

52
By using setPreferences(Key,Value) we open IE and chrome browser.

37)What is the latest version of selenium standalone server you had used?

2.53----2.53.1

38)How do you handle elements present inside a frame?

driver.switchto().frame().

39)How do you come out of a frame?

driver.switchto().defaultContent().

40)How do you switch to the parent frame?

driver.switchto().parentframe().

41)How do you scroll a page in selenium?

We can use Java Script to scroll down the page in selenium. The java script to scroll down the page in selenium is
Window.ScrollBy(0, 250). To execute the java script inside the java program we can help of executescript() which is
available in javascriptExecutor interface.

42)How will you take a screenshot in selenium?

File src=((TakesScreenShot)driver).getScreenShotAS(output.FILE);

43)How do you get cell value from an Excel?

1. Get the excel file as an input.


2.Convert the excel file to a workbook (Get the workbook object or create the workbook object) from the Excel file.
3.Go to a particular sheet of the Excel (Get the sheet object from the workbook).
4.Go to a particular row in the sheet (Get the row object from the sheet).
5.Go to a particular cell in the row (Get the cell object from the row).
6.Get the data from the cell depending on the type of data.

44)Can you write a piece of code which will get multiple sets of data from Excel and login to the application?

driver.get("https://demo.actitime.com/login.do");
for (int i = 1; i <=4; i++) {
String un=xlib.getExcelData("Sheet1", i, 0);
String pw=xlib.getExcelData("Sheet1", i, 1);
driver.findElement(By.id("username")).sendKeys(un);
driver.findElement(By.name("pwd")).sendKeys(pw);
driver.findElement(By.id("loginButton")).click();

45)Can you tell me some annotations used in Test NG?

53
i)@Test ii)@BeforeMethod
iii)@AfterMethod
iv)@BeforeClass
v)@AfterClass

46)How do you ignore a test method in Test NG?

By using (enabled=false) we ignore a test method in the TestNG.

47)How do you skip a test method in Test NG?

If we set a test method to depend on other test method and if the assertion fails, the dependent test method will
be skipped. dependsOnMethod().

48)What is the difference between ignore and skip?

Does that ignore is to deliberately pay no attention to while skip is to move by hopping on alternate feet.

49)How do you achieve test sequence execution in Test NG?

By using priority and dependsOnMethods we achieve testSequence.

50)Where you have used method overloading in web driver?

In driver.switchto().frame() we used overloaded methods.

51)What is the difference between driver.close() and driver.quit().

Driver.close(); closes the particular tab. driver.quit() close the entire browser. (Or) driver. quit () is used to exit the
browser, end the session, tabs, pop-ups etc. But when you use driver. close (), only the window that has focus is
closed.

52)What is the difference between cssSelector and Xpath?

CssSlector: Css selectors can be used to identify the elements which do not have id or name property and they are
not links.
Css selectors use the HTML tag properties and values of the element to identify the element.
We can use any property value pair to identify the element. To evaluate the Css expression, we can use the tool
called firepath which is an add-on for the firefox and an extension for firebug.
Xpath: To identify any elements in the web page, we can use Xpath expression.

53) What are the drawbacks with Absolute Xpath?

In future any changes in html page we cannot use absolute xpath. That is why we are using Relative Xpath.

54
Relative xpath:

1. using attributes:

syntax: //htmltag[@attribute='value']

example: //a[@class='myclass']

to give more than one attribute:

//input[@name='gender' and @id='female']

Making entire xpath with object put it on a normal brace it will become object

2. using text function:

There is proper opening and closing tag in between the text is presents we will use the text function.

syntax: //htmltag[text()='value']

example: //a[text()='Google']

//td[text()='Please identify yourself']

The xpath we have to give exact spaces, spellings without missing.

Objective concepts will work total relative xpath 4 categories i.e attribute, text (), contain (attribute), contain
(text()).

55
Relative Xpath using contain text and contain attribute:

3. using contains(text()):

syntax: //htmltag[contains(text(),'value')]

example: //a[contains(text(),'Goo')]

//td[contains(text(),'Please')]

//td{contains(text(),'identify') and @id='headerContainer]

//a[contains(text(),'Briqre')]

4. Using contains(attribute):

syntax: //htmltag[contains(@attribute,'value')]

example: //input[contains(@id,'una')]

//input[@type='checkbox']

(//input[@type='checkbox'])[2]

Xpath for dynamic element

//input[@type='checkbox']

Identify the dependent and independent element, dependent element is the final target element.

First identify the dependent and independent variable.

56
Independent element is the element on which your target element dependent.

//a[text()='Bing']

/ single forward slash is used to move from parent tag to child tag.

// double forward slash is used in the beginning of the expression followed by the html tag searches thatparticular
html tag on the entire html page.

How will you move from child tag to parent tag /..

//a[text()='Bing']/../../td[3]/input

CSS Selectors:

//a[text()='Bing']/../../td[3]/input

//div[text()='Android calibration']/../../../../../td[1]/div/div

//a[contains(text(),'Gorilla')]/../../../../div[2]/div[2]/div[2]

//a[contains(text(),'Gorilla')]/../../../..//div[(text()='Remove']

//div[text()='Android calibration']/../../../../../td[1]/div/div

//div[text()='Android calibration']/../../../../..//div[@class='img']

(//input[@type='checkbox'])[8]

(//input[@type='checkbox'])[last()]

(//input[@type='checkbox'])[last()-1]

(//input[@type='checkbox'])[10]

(//input{@type='checkbox'})[count(//input[@type='checkbox'])]

57
css selector

syntax: htmltag[attribute='value']

example: input[id='uname']

input[id='uname']

input[id='rem']

input[id='female']

select[id='city']

a[class='myclass']

htmltag.classvalue

a.myclass

input[id='female']

htmltag#id value

input#female

input#female

1. What is the different between QTP and Selenium?

2. How many element locators are there in the selenium and what are those?

3. What is the difference between single forward slash and double forward slash?

58
4. How will you move parent tag to child tag and child tag to parent tag?

https://www.krninformatix.com/sample

https://online.actitime.com/nithya/login.do

identify the absolute xpath for single select dropdown

html/body/table[4]/tbody/tr/td[1]

absolute xpath for username textbox

css selector

input[id='username']

//*[@id="username"]

/html/body/table/tbody/tr/td/table/tbody/tr[1]/td/div/table/tbody/tr/td[2]/div/table/tbody/tr[5]/td/table[1]/
tbody/tr[1]/td/table/tbody/tr[1]/td/input

/html/body/table/tbody/tr/td/table/tbody/tr[1]/td/div/table/tbody/tr/td[2]/div/table

/tbody/tr[5]/td/table[1]/tbody/tr[1]/td/table/tbody/tr[1]/td/input

59
MANUAL TESTING COURSE SYLLABUS
Overview:

Testing is a critical phase of Software Development Life Cycle. Manual testing is the process in which the defects are
identified, isolated, subjected for justification and ensure that the product is defect-free, in-order to produce quality
product. However it requires the necessary knowledge such as about different types of manual testing, software
development life cycle. In this course you will learn everything that is required from a good manual tester.

Course Objectives

 To understand what is testing?


 To understand Software development model.
 To Understand Architectures of software development.
 To learn the features of Software development models.
 To learn major concepts of the testing methodologies.
 To know different approaches to Testing.
 To understand of the types of testing.
 To plan and create test plan
 To execute the test plan.
 To create and manage test cases and defect profiles.
 To build strategies to track testing processes in the bug tracking systems.
 To do document of the test report in the testing enclosure document.

Pre-requisite / Target Audience:

 Basic Knowledge of Computer.


 Internet Connection.
 Beginners who want to start their career in Software Testing field.
 Already a tester: You can refresh all your testing basics and techniques and gear up for Certifications in
Software Testing
 Fresh Graduates: If you have passed out of college recently, and looking for a job in QA/Testing Industry,
then this course will definitely help you build skills required for your first job
 Non-Programmers: If you are interested in IT, but hate programming or find it difficult, then Testing allows
you focus less on programming and more on analysis skills.
 Non IT Professionals: If you are currently working in some other field, but interested in building a career in
IT, then this course will help you step into the IT field

Module 1: Software Testing Introduction

60
 What is testing?
 Importance of testing
 Why do we need Testing
 Roles and Responsibilities
 What is software Testing.
 Types of Software Testing
 Project Vs Product
 Why does software has bugs
 Error , Bug & failure
 Principles of software testing
 What is Quality?
 How much testing is enough?
 Differences between Manual and Automation Testing.

Module 2: Software Development Life Cycle

 Requirements Phase.
 Analysis Phase.
 Design phase.
 Coding Phase.
 Testing phase.
 Delivery and Maintenance Phase.
Methodologies:

 Waterfall Model.
 Iterative Model
 Spiral Model.
 V Model
 Prototype Model
 Agile Model

Module 3: Software Testing Methodologies


 White Box Testing.
 Black Box Testing.
 Grey Box Testing.

Module 4: Test Case Design Techniques


Static Techniques:
 Informal Reviews
 Walkthroughs
 Technical Reviews
 Inspection
 System Testing and Types
 GUI Testing

Dynamic Techniques:
Structural Techniques

61
 Statement Coverage Testing

Branch Coverage Testing


 Path Coverage Testing
 Conditional Coverage Testing
 Loop Coverage Testing
Black Box Techniques
 Boundary Value Analysis
 Equivalence Class Partition
 State Transition Technique
 Cause Effective Graph
 Decision Table
 Use Case Testing

Experienced Based Techniques:


 Error guessing
 Exploratory testing

Module 5: Levels of Testing


1. Functional Testing
 Unit Testing
 Integration Testing
 System Testing
 User Acceptance Testing.
 Sanity/Smoke Testing.
 Regression Test.
 Retesting.
 Smoke Testing
 Sanity Testing
 Interface Testing
 Alpha-Beta Testing
 Monkey Testing
 Exhaustive Testing
 Ad-Hoc Testing
 Gorilla Testing
 Verification and Validation Testing

2. Non Functional Testing


 Performance Testing.
 Load Test
 Stress Test
 Memory Test

62
 Scalability Testing.
 Compatibility Testing.
 Security Testing.
 Cookies Testing.
 Session
Recovery Testing.
 Installation Testing.
 Ad-hoc Testing.
 Risk Based Testing.
 I18N Testing.
 L1ON Testing.
 Compliance Testing.
Module 6: Software Testing Life Cycle
1. Requirements Analysis/Design
Understand the requirements
 Prepare Traceability Matrix

2. Test Planning
 Object.
 Scope of Testing.
 Schedule.
 Approach.
 Roles & Responsibilities.
 Assumptions.
 Risks & Mitigations.
 Entry & Exit Criteria.
 Test Automation.
 Deliverables.

3. Test Cases Design


 Write Test cases
 Review Test cases
 Test Cases Template
 Types of Test Cases
 Difference between Test Scenarios and Test Cases.

4. Test Environment setup


 Understand the SRS
 Hardware and software requirements
 Test Data

5. Test Execution

63
 Execute test cases
 Defect Tracking and Reporting
 Types of Bugs.
 Identifying the Bugs.
 Bug/Defect Life Cycle.
 Reporting the Bugs.
 Severity and priority

6. Test Closure
 Criteria for test closure
 Test summary report
7. Test Metrics
 What is Test Measurements?
 Why Test Metrics?
 Metric Life Cycle.
 Types of Manual Test Metrics.

Module 7: QA & QC & Testing


 What is Quality Assurance?
 What is Quality Control?
 Differences of QA & QC & Testing

Test Management with TFS Tool (Learn & Implement) Defect Tracking Tools (Learn &
Implement)
 TFS

Real-timeProjectinvolvingmostoftheaboveconceptswithfollowingwillbeprovided
 Product Abstract Document
 Requirement Specification Document
 Step-by-Step procedure for Testing the project from ground up
 Complete Test plan, Test Cases, Traceability, Defect tracking report documents.

At the end of the course participants will be able to

1. At the end of this course, students will be able to understand the complete cycle of Manual Testing.
2. Students will be seeing the live project and will be able to start the career in the Software Quality Assurance filed.

Module 8: Software Testing Project

 Project introduction
 understanding functional requirement
 creating test scenarios
 creating test cases
 Test execution
 Bug reporting and tracking

64
 Test sign off.

Module 9: Agile Testing & Jira Tools

 Agile and Scrum Process


 What is agile
 What is Scrum /Scrum Team
 What is Sprint
 What is user Story
 How to give story points / How to estimate user story
 What is definition of Done and definition of ready
 Different Sprint Activities.

Manual Testing: [class 1]

===================

Software => A software is a collection of computer programs that helps us to perform a task.

Types of software's:

=====================

1] System software

2] Programming Software's.

3] Application Software.

System software:

=====================

Device drivers, operating systems, servers.

Programming Software's:

======================

compilers, debuggers, interpreter etc...

Application Software:

======================

65
ex: web applications => Google,chrome

mobile Apps => ludo, snake games.

desktop Apps => video editing tools.

what is software Testing?

Testing is a set of activities that involves planning and processing on what to test and how to test and testing is
intent to find out the defects.

=> Testing is the part of software development process.

=> Testing is an activity to identify the defects in the software.

=> The objective of testing is to release Quality product to the end User or client.

what is software Quality?

Software quality is nothing but to check the quality of the product or software by fulfilling some parameters:

1] Bug Free.

2] Delivered on time.

3] With In budget.

4] meet requirements or expectations.

5] maintainable.

what is project?

If Software Application is developed for specific Customer[client] based on the requirements [Figma Page] Then it is
called as project.

what is product?

If software Application is developed for multiple customers based on market requirements, then it is called product.

Why do we need testing?

66
=> Ensure that software is bug free.

=> Ensure that software meets customer requirements and the software specifications.

=> Ensure that software meets end user expectations.

=> Fixing the bugs Identified after release is more expensive.

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

Class 2

============

What is Quality Control?

Quality Control refers to the process of ensuring that a product or services meets specified quality standards.

It involves systematic activities like inspections, testing reviews conducted at various stages of the production or
development process.

=> The main goal of QC is to identify the defects from the standards and take corrective actions to main desired
quality.

Example:

Mobile phone manufacturing:

=> A company manufacturing smart phones implements quality control to ensure each phone functions correctly
before reaching customers.

two types of testing would be involved:

1] Functional testing.

2] performance testing.

What is defect, Bug, error and Failure?

Defect:

=======

The variation between the actual result and expected result is known as Defect.

67
=> If the developer finds an issue and corrects its by himself[developer] in the development phase then it is called
as defect.

=> Founds in the development phase.

Ex: If the developer forgot to implement a specific validation for the email field in a sign-up form causing it to accept
invalid email.

Bug:

========

If testers founds any mismatch in the application/system in the testing phase then it is called as a bug.

=> Founds in the testing phase.

ex: While testing, the tester found that entering a specific special character

in the email field crashes the application.

Error:

==========

We cant compile or run the program due to coding mistake in the program. then it is called as an error.

=> Human mistake in code or logic.

=> It is going to done developer.

ex: A programmer mistakenly wrote x=y-z instead of writing x=y+z in the calculation logic.

Failure:

=========

once the product is deployed and the customer finds any issues then they call it as product failure.

=> After release if an end user finds any issue then the particular issue is called as failure.

ex: The End-user experiences an issue where the email validation crashes the application in the live environment.

68
Why the software has bugs?

=> Miscommunication or no communication

=> Software complexity.

=> Programming errors.

=> Changing requirements.

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

Class3

=======

Roles and Responsibilities:

=========================

1] Understanding Requirements:

Analyze software requirements, functional specifications, and business use cases.

collaborate with developers, Business analytics, and stakeholders to clarify our

requirements.

2] Test planning:

Design the test plan and strategies for manual testing.

3] Test case design:

Write a detailed test case based on the requirements.

4] Test Execution:

Execute test cases manually on different environments.

[dev site, UAT Site, production].

5] Defect reporting:

69
Identify the logs, prioritize the bug in defect tracking tool.[Jira]

6] Documentation:

document test cases, results, and defect logs.

prepare and share test execution reports for stakeholders.

7] collaboration:

work closely with development teams to reproduce and resolve defects.

participate in the daily stand-up meetings, sprint planning.

8] Exploratory testing:

perform Exploratory testing to uncover edge cases and unexpected behaviours not

covered by test cases.

9] Ensuring Adherence standards:

Ensure that application meets quality standards and conforms guidelines.

UI/ UX Design specifications.

10] User perspective testing:

simulate end-user scenarios to ensure that application is user friendly or not.

11] Post Deployment:

Assist and monitoring the application in production for any issues.

we are participating in the post implementation and release validations.

How much testing is enough?

Factors to determine "Enough Testing":

1] Meeting the Testing Objective:

Acceptance Criteria are met.

The primary goals should be ensuring the application work as expected and critical bugs are fixed, and the risk
failure is minimized.

2] Risk Assessment:

Testing should address the most critical, high-risk first.

70
3] Coverage:

Testing is sufficient when test coverage meets the agreed-upon bench works.

4] Defect Rate:

the defect discover rate drops.no critical defects are going found in the future.

5] Deadlines and Resources:

In real world scenarios, Testing is often limited by time and resources.

Enough testing is achieved when the quality is acceptable with in the time frame.

6] Cost and budget:

AS per agreement we have already met up with our cost and it has also satisfied by the end-user then we are
going to stop doing the testing.

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

Class4

======

Types of Testing:

==========================

1] Manual testing.

2] Automation Testing.

Differences between manual and automation testing?

Manual Testing:

==================

Testing manually with out using any automation tools.

Execution => Testers execute test cases step by step manually.

Speed => Time-consuming due to manually executing step by step

71
Reusability => Test cases need to be manually repeated for every test cycle.

Accuracy => Human error 60 % to 70%.

Skills Required => Relatively very simple, doesn't require any programming language.

Tools => Does not require any tools.

Automation Testing:

=======================

Testing performed using scripts and tools to automate the process.

Execution => Test scripts are written and executed by automation tools.

Speed => Faster since testes are executed automatically by tools.

Reusability => Test scripts can be reused across multiple test cycles.

Accuracy => provides more accuracy as it eliminates manual tester mistakes.75%to80%.

Skills Required => Requires any programming language and familiarity with the tools.

Tools => Requires tools like Selenium, QTP, Junit, testing.

Types of software Testing:

============================

1] Based on functionality:

Functional Testing:

Validates the software against functional Requirements.

=> Unit testing.

=> Integration Testing.

=> System Testing.

=> UAT Testing[Acceptance Testing].

Non-functional Testing:

72
Focus on the performance, usability and reliability.

=> Performance Testing[Load, stress, Scalability].

=> Security Testing.

=> Usability Testing.

=> Computability Testing.

=> Volume Testing.

=> Spike Testing.

=> Recovery Testing.

2] Based on the execution:

1] Manual Testing.

2] Automation Testing.

3] Based on the test objective:

=> Black box testing.

=> White box testing.

4] Based on the Test Levels:

=> Unit Testing.

=> Integration Testing.

5] Based on the Test Timings:

=> smoke testing.

=> Sanity Testing.

=> Regression Testing and Retesting.

73
6] Based on the software changes:

=> Alpha Testing.

=> Beta Testing.

When to use manual Testing and automation Testing:

Manual Testing:

========

1] Exploratory Testing, Usability Testing, and add-hoc Testing.

2] short time projects where automation setup is not required and cost-effective.

Automation Testing:

===================

1] Regression Testing and performance Testing.

2] Repetitive test cases across multiple test cycles.

3] Large projects and with bug-budget.

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

SDLC:

=============

SDLC is nothing but software development life cycle.

=> SDLC is a process used by the software industry to design, develop, and test software's.

BRS document => Business requirement specification.

SRS Document => Software requirement specification.

client => Business analyst [Figma => blue print of the project] => Manager [Team lead] =>

74
demo presentation => client [team lead] => client approve the project.

=> SDLC is a systematic process used for developing applications it ensures high-quality software is

delivered.

SDLC phases:

===============

1] Planning: defines the objective, scope the resources of the project.

plan, budget.

2] Requirement analysis:

Gather and analyze functional and non-functional requirements.

SRS => software requirement specification => client side will prepare by taking the

conformation from the business analyst.

3] Design: Figma

create the architecture and design of the software.

=> High level design: Defines modules, data flow, and integration points.

=> Low level design: focuses on the detailed designs for each module.

design document [exact structure of the application [UI/ UX design].

4] Development:

convert this design to actual code [software application].

write and compile the code based on the design specifications.

5] Testing:

validate the software against the requirements and ensure quality.

75
functional testing

non-functional testing

test cases, defects, reports, and test results.

6] Deployment:

deliver the software to the end users.

deploy into the live production.

7] Maintenance:

ensure the software remains constant and updated.

example: E-commerce App

=========================

1] Planning: decide the app that will support online shopping for clothing

2] Requirement analysis: gathering features like user registration, payment gateway, and product CatLog.

3] design: create a database to store user data and design UI/UX designs part of the shopping.

4] development: code the app by using any programming language like Java, python.

5] Testing: verify the login functionalities, registration fields, and secure transactions.

6] deployment: publish this app in play store or any other stores.

7] Maintenance: Add new categories like electronics and hardware materials.

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

76
Waterfall Model:

===================

The Waterfall Model is a linear and sequential approach to software development where progress in a single
direction-downwards, like a waterfall-through a series of distinct phases.

=> Each phase must be completed before moving to the next, and there is no overlapping between phases.

Phases of Waterfall Model:

=======================

1] Requirement analysis:

In this phase, all possible requirements of the system are collected from the stakeholders and analyzed.

The requirements are documented in a software requirement specification [SRS].

Deliverable: SRS document.

2] System design:

The gathered requirements are translated into system architecture or design.

This phase defines the hardware and software requirements, system workflow, and overall system behaviour.

Deliverable: System design document [HLD & LLD].

3] Implementation [Coding]:

The system design is implemented in this phase by writing the actual code.

Developers are build each component as per the system design.

Deliverable: Functional software components.

4] Integration and testing:

The developed components are integrated and rigorously tested to identify the bugs and verifies the system

meets the requirements specified in the SRS document.

Types of testing performed: unit testing, integration testing, system testing, UAT [Acceptance testing].

Deliverable: verified software product.

5] Deployment:

After successful testing, the software is deployed to the production environment.

77
Users are going to use the system, and any deployment issues are solved.

Deliverable: live operational software.

6] Maintenance:

Post deployment, the software is monitored for defects and updates.

Deliverable: updated and optimized software system.

why we are required waterfall model in software testing:

The waterfall model is required in software testing for its structured, sequential approach, which brings several
advantages and easy to understand.

where I can use this in real time?

1] Fixed scope or fixed budget projects.

2] safety and critical systems.

3] Banking systems.

4] contract-based development.

Real-time example: Hospital management system development

Stage 1: Requirement analysis:

The hospital approaches a software company with clear requirements for an application to manage

patient records, doctor schedules, and billing.

All requirements are documented in detail.

stakeholders approve the finalized document.

Stage 2: System design:

A system architect designs the application layout, database schema, and various functionalities.

Design documentation, including UI and working flow charts.

Stage 3: Implementation [Coding]:

developers begin coding modules, following the approved design strictly.

Stage 4: Testing:

The application is passed to the testing team for verification.

78
Testers validate each module against the requirements.

Stage 5: Deployment

The software is installed on the hospital's systems after successfully testing.

Hospital staff is trained to use the system.

Stage 6: Maintenance:

After deployment, the development team provides ongoing support to fix bugs or handle issues with

database or UI improvements.

Add new requirement would need a new waterfall cycle.

SRS: Software requirement Specification:

==========================================

79
A detailed document that specifies the functional and non-functional requirements of the software application.

=> it is blue print for software development and testing => Figma.

=> It is going to create by Business analyst team [In collaboration with development team and client].

=> provides a clear understanding of what software is going to do.

=> Acts as a reference for developers, testers and stakeholders.

BRS: Business Requirement specification:

==========================================

A high-level document that outlines the business goals and expectations from a project.

=> It focuses on "what" the clint wants rather than "how it will be implemented".

=> Based on the discussions with stake holders and clients.

=> Created by Business analyst.

BRS => It is the starting point, describing what the business needs.

SRS => It is derived from BRS that provides a technical roadmap to fulfil those needs.

80
Iterative model:

=================

Iterative model, Iterative process starts with a simple implementation of a small set of software. requirements
iteratively enhance and involving version until the complete system is implemented and ready to be deployed.

Key points:

=========

Incremental testing: Testing is performed on small components or features as they are developed.

Frequent Feedback: Testers provide feedback for every iteration, helping developers to refine the software.

Steps:

===========

1] Requirement analysis => Understand the scope of the iteration.

2] Test planning => prepare the test plan for specific Iteration.

3] Test design => Write the test cases and create the test data based on the requirements of the iteration.

4] Test environment setup => configure the test environment, to match the current iteration.

5] Test execution => Execute the test cases for the developed features in the iteration.

6] defect tracking and management => track identified defects and verify their resolution in the next build.

7] Review and feedback => prepare test summary reports.

8] Repeat for next iterations also.

Advantages:

============

1] some functionalities can be developed quickly and early in the lifecycle.

2] Results are also obtained early and periodically.

3] parallel development can be planned.

81
4] less cost to change the requirements.

5] Risk analysis is also low and better.

Disadvantages:

==================

1] More resources is required.

2] More management and attention is required.

3] Not suitable for small projects.

Where we are going to use:

1] early testing and defect detection

2] Incremental approach

3] changing requirements.

4] Frequent feedback.

example:

=============

Consider a banking application:

Iteration 1: Focus on basic user login Functionality.

Test cases for valid and invalid logins.

perform smoke and exploratory testing.

Iteration 2: Add transfer fund functionality.

Test cases for valid/invalid accounts.

Conduct regression testing on login functionality.

Iteration 3: Introduce account statements and reporting.

validate the display of accurate transaction details.

82
perform integration testing for fund transfer and statements modules.

83
84
Spiral Model:

===================

=> It is also called as version control model.

=> spiral model is also is a Risk-driven software development process model. It is a combination of both waterfall
and Iterative model.

=> It is developed by Barry Boehm.

=> Spiral model overcomes the drawbacks of waterfall model.

Phases:

========

1] Planning

2] Risk analysis.

3] Development and Testing.

4] Evaluation.

Planning => It includes the cost, It also involves the understanding the system

Requirement for continuous communication between the system analyst

and the client.

Risk analysis => Identification of potential risk is done while risk mitigation strategy is planned and finalized.

Development and Testing => It includes coding, Testing and deploying the software at the customer site.

Evaluation => Evaluation of software customer. Also includes identifying and monitoring, risks such as cost overrun.

Advantages:

=================

1] Additional Functionalities are changes can be done in the later stages.

2] Cost estimation becomes easy as the protype building is small fragments.

3] development is very fast systematic.

85
Disadvantages:

===============

1] spiral model only works for large projects.

2] Risk is very high.

3] Documentation is more as it has intermediate phases.

Example

===============

Scenario: Developing a mobile banking App.

Cycle 1: planning for login feature.

Risk analysis: Risks like weak password implementation and data breaches are analyzed.

Development: A protype for login screen is developed.

Evaluation: The login prototype is reviewed, and feedback is collected.

86
V Model:

================

the v-model is a type of SDLC model where process executes in a sequential manner in V-shape.

=> It is also verification and validation.

=> It is based in the application of a testing phase for each corresponding development stage.

=> Development of each step is associated with the testing phase.

=> The next phase starts only when after the completion of the previous phase.

What is verification?

the process of evaluating work products [Ex: documents, design] to ensure they met the specified requirements are
not.

=> verification involves static analysis technique.

=> To check whether the product is being built correctly or not.

=> Static testing [Without executing the code].

ex: Reviewing the software Requirement specification [SRS] document to ensure it aligns with the clients’
requirements.

87
conducting a walkthrough of deign documents to verify that all the modules and they are correctly designed and
their interaction.

Documents:

===============

BRS => Business requirement specification => Business analyst people.

CRS => Customer requirement specification => stake holders.

URS => User requirement specification => clients.

what is validation?

the process of evaluating the final product to check if it meets the business needs and requirements.

=> Validation involves Dynamic analysis technique.

=> to check whether the right product has been built.

=> Dynamic testing [Involves executing the code].

ex: Running a functional test on a login page to ensure that the user can log successfully with valid credentials.

=> performing end-to-end testing to validate that the entire application flows as expected.

Differences between verification and validation?

verification:

1] Ensure the product is built correctly as per the design requirements.

2] Techniques => Reviews, inspections.

3] performing on the development phase.

4] developers, Business analyst, and project managers.

validation:

1] Ensure the built product fulfils the intended purpose.

2] Techniques => Functional testing, Integration Testing, system testing.

88
3] After the software was developed or feature is implemented.

4] Testers, end-users and stake holders.

Phases of V-model:

======================

1] Requirement analysis

2] System design => SRS document.

3] Architecture design => Low level design.

4] module design => High level design.

5] implementation => coding.

Advantages:

================

1] This is highly disciplined model and phases are completed at one time.

2] v-model is used for small projects where project requirement is clear.

3] simple and easy to understand.

Disadvantages:

================

1] High risk and uncertainty.

2] It is good for complex projects also.

3] It does not easily handle concurrent events.

Example:

===========

Scenario => Developing a banking application.

1] Requirement analysis phase [ corresponding to the acceptance testing].

Activities => The business analyst gathers the requirements for core functionalities like

account creation, money transfer, bill payments etc.

89
Acceptance testing => verify that users can transfer funds successfully with valid inputs.

2] System Design phase [corresponding to system testing planning].

Activities => High level design of the entire application is prepared[ex : modules for authentication, account
management].

Testers prepare system testing scenarios to validate the functionalities of the entire system.

3] Architecture design [corresponding with integration testing].

Activities => define the interactions between modules

Testers plan integration test cases to validate module-module interactions.

4] module design [corresponding to unit testing planning]

Activities => Detail the design of individual modules[ex: logic for user login].

testers is going to prepare unit test cases for each module.

5] implementation [corresponding to unit testing]

Activities => developers write the actual code for modules.

Testers execute the test cases to verify the functionality of individual modules.

Software Testing Methodologies:

==================================

White Box Testing.

Black Box Testing.

Grey Box Testing.

White Box Testing:

=======================

White Box Testing is a technique where testers manually evaluate the internal structure, logic, and implementation
of the code to ensure it behaves as expected.

90
=> This approach requires the knowledge of the programming logic and aims to verify the correctness of the code
its flow to the required functionality.

why we need white box testing?

1] code quality assurance => Identifies the issues in code such as logical errors.

2] Early bug detection => uncovers issues before the application is handed over for functional testing.

Done By:

==============

white box testing is typically performed by developers, but testers and quality assurance professionals also.

Advantages:

==================

1] Through coverage => Ensures all parts of the code.

2] Optimizes code => checking the performance.

3] Early bug detection => Bugs detected in development phase.

4] Detailed testing => helps to testers to understand how the system works internally.

Disadvantages:

===================

1] Requires expertise => Testers need some coding basic knowledge to understand and evaluate the code.

2] Scalability Issues => Testing large and complex programs manually can be challenged.

Example:

================

Scenario: Testing the logic for a banking application funds transfer functionality.

public boolean transfer Funds(String accountForm, String AccNo, double amount){

91
if(accountForm = null || AccNo =null){

return false // accounts cannot null

if(amount <=0){

return false; // amount should be positive.

double balance = getAccountBalance(accountform);

if(balance < amount){

return false; // insufficient funds

DeductfromAccount(accountFrom, amount);

addToAccount(AccNo, amount);

return true;

steps for manual testers:

=============================

understand the code Logic: Read through the code to understand its functionality.

Identify the test cases:

Null check for accountForm and AccNo.

negative and zero values for amount.

sufficient and insufficient balance conditions.

valid transfer scenario.

92
Manually executed test cases:

==============================

Input accountFrom = null, AccNo = "12345", amount = 100 => Expected result => false.

Input accountFrom = "67890", AccNo = "12345", amount = -50 => Expected result => false.

Input accountFrom = "67890", AccNo = "12345", amount = 1000 => (balance < 1000) Expected result => false.

Input accountFrom = "67890", AccNo = "12345", amount = 100o => (balance >= 1000) Expected result => true.

Black Box testing:

=====================

Black box testing is a technique where testers evaluate the functionality of an application without any knowledge of
its internal code or structure.

=> In this method, it focuses on inputs, outputs and user interactions with the system.

why we need Blackbox testing?

1] user perspective => It tests the system from the end-user’s point of view to ensure the application meets user
expectations.

2] functionality validation => ensures that the software functions correctly and produces the expected results or not

Done by:

===========

Black box testing is typically performed by testers who are independent of the development team.

Advantages:

=============

1] no programming knowledge is required.

2] wide application: can be used to test any type of software, including web, and desktop applications.

3] efficiency: quick to setup and execute and it focuses only on inputs and expected outputs.

93
Disadvantages:

=============

1] Limited coverage => Does not test the internal code or logic.

2] High dependency on test cases => Requires well- defined test cases; other wise testing miss certain
functionalities.

3] time consuming => requires many test cases and scenarios.

example:

=============

Scenario: Testing the login functionality of an e-commerce application.

Functionality: users enters a username and password to login. if the credentials are correct, redirect to home page;
otherwise, an error message should be displayed.

Identify the test cases:

===============

valid username and password => Expected result => Login successful.

Invalid username and valid password => Expected result => error message.

valid username and Invalid password => Expected result => error message.

Blank username and blank password => Expected result => error message.

Execute test cases:

===============

Input : Username = Pavan143, password = Pavan@143 => expected output => redirect to home page.

Input : Username = Pavan@143, password = Pavan@143 => expected output => "Invalid credentials"

Input : Username = , password = => expected output => Enter the valid credentials.

94
Gray box testing:

=====================

Gray box testing is a software testing method that combines aspects of both black box and white box testing.

=> The testers has partial knowledge of the internal structure or workings of the application and uses this
understanding to design and execute test cases.

Advantages:

==================

1] Through coverage => Ensures all parts of the code.

2] Optimizes code => checking the performance.

3] Early bug detection => Bugs detected in development phase.

4] Detailed testing => helps to testers to understand how the system works internally.

5] no programming knowledge is required.

6] wide application: can be used to test any type of software, including web, and desktop applications.

7] efficiency: quick to setup and execute and it focuses only on inputs and expected outputs.

Disadvantages:

==================

1] Requires expertise => Testers need some coding basic knowledge to understand and evaluate the code.

2] Scalability Issues => Testing large and complex programs manually can be challenged.

3] Limited coverage => Does not test the internal code or logic.

4] High dependency on test cases => Requires well- defined test cases; other wise testing miss certain
functionalities.

5] time consuming => requires many test cases and scenarios.

example:

95
================

Scenario: testing the password reset functionality of the banking application.

Details: the application allows users to reset their password by providing their email or mobile conditions.

After verification, a reset and OTP is sent, and the user update his password.

Steps:

==============

Internal knowledge: the testers know how the OTP is generated and validated.

External knowledge: testers interact with the password reset feature like a user.

identify the test cases:

Enter the valid email or phone no => Expected result => OTP or reset link should be generated.

Enter the invalid email or phone no => Expected result => Error message.

provide Expired OTP => Expected result => Error message => OTP expired.

multiple in correct OTPs => Expected result => user account is temporary locked for 24 hours.

Black Box Techniques:

====================

Boundary Value Analysis:

===============================

Boundary Value Analysis[BVA] is a black box testing technique that focuses on testing the values at the boundaries
or edges of input ranges. It assumes that errors are most likely to occur at the boundaries rather then the centre of
input domains.

=> BVA is used in functional testing to ensure that the software behaves correctly as its limit conditions.

Boundary conditions:

===============

96
Testing input values at:

The minimum boundary[lower limit].

The maximum boundary[Upper limit].

Just below the lower limit[invalid].

Just above the upper limit[Invalid].

Why to use BVA?

=> Helps to identify defects that occur at edge cases.

=> Reduces the no of test cases compared to exhaustive testing.

where to use BVA?

BVA is applied when inputs are numeric or sequential in nature. such as Forms with range validations [Ex: salary,
scores].

Systems requiring numeric or data-based input.

Types Of BVA:

==================

1] Single variable boundary: Testing boundaries of one input field.

ex: if the valid age range is 18 to 60.

Test cases are.

Minimum value: 18[Valid].

Maximum value: 60[Valid].

Minimum value: 17[Invalid].

Maximum value: 65[Invalid].

2] Multiple variable boundary: Testing the combination for multiple inputs:

ex: For a form with age [18-60] and salary [10,000 to 1,00,000].

Age: 18[Valid], 19[Invalid], 60[Valid], 61[Invalid].

97
salary:10,000[Valid], 9,999[Invalid], 1,00,000[Valid], 1,00,001[Invalid].

3] Robust boundary Testing: includes values just outside valid boundaries [extreme edge case].

4] Worst case boundary testing: Focuses on all possible combinations of all boundary values.

Equivalence class Partitioning [ECP]:

====================================

Equivalence class Partitioning [ECP] is a black box testing technique used to divide input data into equivalent
partitions or classes.

The idea is that if one test case from a class phase, all other in that class phase are likely to be pass.

=> Similarly, if one fail others also fail.

why we use ECP?

=> Reduces the total no of test cases while maintaining effectiveness.

=> Ensures a structured and systematic approach for testing.

where to use?

============

1] All numeric ranges.

2] Text input constraints [Ex: Character length, allowed characters].

3] Drop downs or checkboxes.

Types of ECP:

===============

valid input partition: Tests with in the range of acceptable inputs => Ex: the length of the phone number [0 to 9].

8897814073[valid], 000000000000[invalid], 0987654321[Valid], 0000000000 [Invalid].

Invalid input partition: Tests with in the range of acceptable inputs => Ex: date range[30-12-2024] to [01-01-2025].

98
31-12-2024[Valid], 02-02-2025[Invalid].

Boundary based partition => overlaps with boundary values analysis to test each values of partitions.

State Transition Technique:

==============================

State Transition Technique is a black box testing technique where testers evaluate the behaviour of an application
when it transitions from one state to another state.

=> The states can be defined as conditions or modes in which the application based on their inputs.

=> This technique is particularly useful for systems where the output depends on the sequence of past inputs.

Types of states:

===================

1] Initial state: The starting condition of the system before any interaction input

is provided.

ex: Login Systems => The initial state is in Login page.

ATM : The system is in idle state, waiting for the user to insert a card.

2] Intermediate state: These are the states the system transitions into during its operations

based on user inputs.

ex: Login system : User enters a valid username, and the system transitions to

the password Field active state.

3] Final state: The system where stops processing or completes the workflow.

ex: ATM => After ejecting the card, the system transitions back to the Idle state.

4] Error state: this occur with invalid inputs or unexpected events or encountered. and the

system transitions into error handling state.

ex : ATM => Exceeding the maximum no of PIN attempts leads to the card blocked state.

5] Looping state: A state where the system repeatedly transitions back to itself under

certain conditions.

99
ex: OTP entering system : Entering wrong OTP looks back to the OTP entry state.

Steps to perform Transition Testing:

===================================

1] Identify all possible states of the application.

2] Define events or trigger state transition.

3] create a state transition diagram or state table.

4] develop the test cases to cover[ valid and Invalid].

5] execute all the test cases.

State Transition diagram:

=============================

System : ATM machine

start => card inserted => select language => savings bank or current bank =>

Enter pin => Withdraw/deposit => card ejected => collect cash/deposit cash => End.

example:

1] Login system

Initial state => Login page.

Intermediate state => Username entered, password field active.

Final state => Dashboard or Logout page.

error state => Invalid credentials.

Home work:

===============

ATM Machine[I need which state is in from using the state transition diagram and along with I need test cases.

100
-------------------------------------------------------------------------------------------------------------------------------------

Cause Effective Graph:

=========================

Cause Effective Graph is a graphical technique used to design test cases. It is used on the logical relationships
between inputs or conditions.

=> This technique helps to ensure that the test cases are include different combinations of inputs and their
corresponding outputs.

Steps to create Cause Effective Graph :

=====================================

Identify the requirements: understand the functional requirements of the application.

List Cause and effects: Identify all the possible inputs and their corresponding outputs.

Draw the graph: use logical relationships [AND, OR, NOT] to connect cause effects.

Generate the test case => convert the graph into a decision table and create test cases

that cover all the combinations of inputs and outputs.

Where Cause Effective Graph used in rea time:

======================================

1] GUI Testing: Testing input validation from submissions.

2] Decision based systems: banking applications where user inputs determines premium calculations or eligibility.

3] web applications: e commerce website with conditional discounts or cart management systems.

4] Automation: work flow systems that follow conditional triggers.

example:

================

test cases based on the Cause Effective Graph

101
Scenario: online shopping cart discount rules

An e-commerce application offers a discount to users based on the following rules:

Cause 1[c1]: User has valid discount coupon or not.

Cause 2[c2]: User has purchased items worth $100 or more.

Effect 1[e1]: Apply 20% discount.

Effect 2[e2]: Display "no discount applied" message.

Cause effective graph:

C1 AND C2 => E1 [A valid coupon and purchase >= $100 -> 20% discount applied].

NOT C1 OR C2 => E2[if either condition fails -> Not discount applied.

Decision table:

===================

A decision table is systematic way of capturing business rules in tabular form a structured of inputs [Conditions] and
their corresponding[outputs].

where we use in real time

=======================

e-commerce Applications

ex: Discount rules for shopping cart calculations.

payment gateway:

ex: Transaction approval based on payment method, amount, and user authentication.

How to write test cases by using decision table?

Identify the inputs[conditions].

List all the possible inputs or conditions that influence the outcome.

Identify the outputs [Actions].

Determine the possible outcomes or actions based on their inputs.

102
Create the table:

List all possible combinations of inputs as rows and their corresponding outputs.

Design a test case:

create the test case for each unique combination to ensure all scenarios should be cleared.

example: Login Functionality

Scenario: A system requires all the following conditions for a successful login.

Condition 1: Valid username.

Condition 2: Valid password.

Condition 3: Two factor authentication.

Actions:

Action 1: Grant access.

Action 2: Deny access.

Test case 1: Successful Login

Inputs: Valid username, valid password, Two factor-enabled.

Excepted Output: grant access.

Home work

=================

bases on above conditions we have to write the all the possible test cases for Deny access.

Use Case Testing:

======================

Use Case Testing is a type of functional testing that focus on validating the functionality of a system based on the
use case.

103
=> A Use Case represents a sequence of steps[actions or events] that a user performs to achieve specific goal to the
system.

=> how user interacts with a system.

=> The expected behaviour of a system.

=> The outcome after performing a particular action.

where we use in real time:

==========================

E-commerce websites:

Scenarios like be placing an order, adding items to the cart, or payment processing.

Bank application:

use cases for login, checking account balance, and transferring money.

mobile applications:

use cases for login, registration and updating the profile.

phases of use case testing:

============================

1] requirement analysis

2] use case development:

write detailed use cases including Action, preconditions, main flow and expected flow.

3] test case creation:

develop the test cases for each flow of the use case.

4] execution of the test cases

5] verification and validation:

validate whether the system works as expected for all flows.

positive testing: verify the inputs and correct flow.

104
negative testing: verify invalid or unexpected conditions.

example:

=============

let's consider the use case for login to a web application.

use case: user login.

actor: End-user.

precondition: user must have valid credentials, and the login page must be accessible.

Basic flow:

step 1: user opens the login page.

step 2: user enters the valid credentials [username and password].

step 3: user should click on the login button.

step 4: system verifies credentials and redirects to the dashboard.

Alternative flow:

user uses the "Forgot password" link to reset the password.

exception flow:

step 1: when user open the login page but it is not loading.

step 2: user enters the invalid credentials.

step 3: user not able click on the login button.

step 4: not redirecting the dashboard.

Test scenarios based on the use case:

Positive test case: Enter the valid credentials => verify the user to login successfully.

105
Negative test case: Enter invalid credentials => error message.

Negative test case2: leave username/password blank => error message.

Alternative flow: click on "Forgot password" => verify the password flow.

Levels of Testing

1. Functional Testing:

2. Non-Functional Testing.

Unit Testing:

==========================

Unit Testing is the software testing where individual units or components of a software is tested.

=> the purpose is validated that each unit of a software code performs as expected.

=> unit is done during the development phase of an application by the developers.

=> unit tests isolate a section of code verifies its correctness.

=> A unit may be individual function, method or procedure, module or an object.

=> unit testing is imp because software developers sometimes try saving time doing minimal unit

testing.

=> Testers may perform manual test cases in specific cases, like validating small modules before

integration testing.

=> unit testing is going to done both developers and testers.

Types of unit testing:

=====================

Black box testing.

white box testing.

Gray box testing.

106
Advantages:

===========

1] early bug detection.

2] code quality improvement.

3] simplified debugging.

where unit is testing is used?

unit testing is essential in all software projects with include:

web applications

mobile applications.

e-commerce websites.

Banking systems.

Example:

Scenario: E-commerce website for price calculation Function.

module: A method that calculates the total price of the items in a shopping cart, including discounts and taxes.

Input values:

price: 500.

quantity: 2.

Discount: 10% [0.1].

Tax: 18% [0.18].

expected output:

Subtotal: 1000.

Discount price: 1000 - 100 = 900.

Total price: 900 + 162 => 1062.

107
Validation:

verify the function returns 1062.

negative test cases:

input Invalid data (ex: negative price or discount > 100%).

expected: the function should through an error or return an appropriate message.

Integration Testing:

=========================

Integration testing is a type of software testing where individual modules or components are combined are tested
together to ensure that they work as expected when integrated.

=> They type is typically performed after unit testing and before system testing.

=> The goal of the integration testing is to identify issues that occur when modules or components

interact with each other.

Two types of integration testing

=> Big bang integration testing => All modules are combined and tested simultaneously.

=> Incremental Integration testing => modules are integrated at one at a time, and testing is performed.

Real time examples:

====================

Database integration.

Third part API Applications.

web applications.

Steps in integration testing:

======================

1] Test planning: Defines the modules to be integrated.

2] Test case design: write the test cases focusing between modules.

108
3] Test execution: Integrate the modules progressively [incremental approach] and execute test cases.

4] issues logging and fixes: document any issues found in the testing.

5] Retesting: after fixes the retest to ensure that integrated working without breaking other parts of the application.

System Testing:

===============

System Testing is a type of software testing where the entire application is tested a whole to verify that it meets the
specified requirements.

=> The is done after the integration testing and focuses on the functionality, and integration and reliability of the
entire application.

=> Generally performed by dedicated or pure experienced testers team.

System testing types:

==================

Requirement analysis: Functional and non-functional.

Test planning: create a system test strategy, define the objectives, and list of the resources needed.

Test environment setup: set up the production live environment.

Test case design: write the test cases for different scenarios.

Test execute: execute the test cases.

defect logging: report any issues if found.

test closure: ensure the system is ready for UAT [User acceptance testing].

Example:

==========

109
Scenario: Testing an online e-commerce application.

1] Functional testing:

verify the systems core functionalities work as intend.

ex: regression and login.

2] non-functional testing:

performance => Testing how it handles 1000+ concurrent users during a sale.

UAT: [USER ACCEPTANCE TESTING] => UAT Testing is a type of software testing performed by the end -user or
client-side people

to verify the system software before moving to the software application to the live environment.

=> UAT Testing is done in the final phase of testing after functional, integration and system testing.

=> the purpose of UAT testing is to validate the end-end business flow.

=> UAT testing is carried out in a separate environment called as UAT server which is like as production
environment.

Phases:

=============

1] planning phase.

2] Preparation phase: set up the environment for UAT.

3] execution phase.

4] validation phase.

5] closure phase.

Steps for UAT:

================

1] Requirement analysis.

110
2] Environment setup.

3] UAT test case design.

4] onboarding testers.

5] Test execution.

6] defect management.

7] Acceptance validation.

8] Sign-off.

Smoke Testing:

==================

Smoke Testing is a software testing technique performed post software build to verify that critical functionalities of
the software is working fine . It is executed before any detailed functional or regression tests are executed.

=> The main purpose of smoke testing is to reject a software application with defects so that QA team does not
waste time on testing broken software application.

=> smoke testing is done by developers and testers.

when to use?

After receiving a fresh build from development.

At the beginning of a testing cycle for initial validation.

Steps for smoke testing:

111
========================

1] Receive the build from the development team.

2] Identify the critical functionalities to test.

3] execute the test cases for these functionalities manually.

4] Report Results[pass/fail] to determine if the build is ready for further testing.

Advantages:

=================

quick assessment => identify major issues early.

Saves time => prevents testers from wasting time in unstable build.

Disadvantages:

===============

Limited scope => only checks critical functionalities.

May miss issues => does not test depth scenarios.

Example: Banking application

===========

Scenario: A new version of a banking app is delivered for testing. smoke testing ensures the basic features work.

Tests performed:

Application Launch: checks if the app is launching without crashes or not.

User Login: Attempt login with valid credentials.

balance check: navigate the account section and verify account balance is displayed or not.

Fund transfer: test a basic fund transfer to ensure no error occurs.

Logout: verify the logout functionality.

112
outcome:

if these functionalities fail, the build is rejected, and further testing is stopped.

Sanity Testing:

=============

Sanity Testing is a kind of software testing performed after a receiving software build, with a minor changes in code,
or functionality to ascertain that the bugs have been fixed and further issues are introduced due to these changes.

=> sanity testing is done by only testers.

purpose of sanity testing:

To validate that specific charges [ex: bug fixes or new features] in the software application work correctly and that
not related functionalities are broken.

Steps:

======

verify that the specific bug or enhancement is fixed or not.

testes related functionalities to ensure they work properly.

Explore areas impacted by the code changes.

Advantages:

==============

Quick validation => Focused testing and saves time.

Targeted scope = >Ensures specific changes are functional.

Disadvantages:

====================

Misses unrelated issues => Does not test the application holistically.

113
Relies on Testers expertise => Required skill testers to identify impacted areas.

Example: New feature of banking application.

Scenario: A new feature called "quick bill pay" was added to a banking app.

Testes performed:

Quick bill pay verification: open the quick bill pay module.

select a predefined biller and pay small amount: verify that payment is successful or not.

Impacting on existing features:

check that the amount balance updates correctly or not.

Outcome:

if the new feature is related functionalities work as expected, the app is deemed ready for regression testing.

Regression Testing:

=====================

Regression Testing is a type of software testing executed to check whether the code has not disturbed the current
feature and the functions of application.

=> Regression Testing is also known generic testing.

Purpose of Regression Testing:

=> validate the stability and functionality of a software after updates.

=> Ensure that previously resolved bugs have not repapered.

=> only testers are going to perform Regression Testing.

114
when to use Regression?

After Bug fixes: To ensure that the resolved issue does not affect other functionalities.

During continuous integration: In agile environment, where frequents updates are made.

Advantages:

===============

improves stability.

Increase confident: Boosts developers and stake holders in the quality of the software.

Disadvantages:

===================

Time consuming: Repeated test case can be tedious.

High-cost : Regression can be intensive.

Automation complexity: Requires significant effort to setup and maintain automation framework.

Example:

Scenario: consider an ecommerce application like amazon.

context: the development team adds a new feature allowing users to make bulk purchase.

Testing process:

create a test plan that includes existing functionalities like login, product search and payment process.

manually test the new functionality on bulk purchase.

execute the test cases for the critical paths like user registration, adding products to the cart and checkout.

identify any issues caused by the new feature in older modules.

Steps:

115
========

prepare Regression testing suite covering all the major functionalities.

execute test cases systematically and log effects if any issues are found.

Retest fixed issues to conform resolution.

Retesting:

===============

Retesting is a process to check specific test cases that are found with the bugs in the previous final execution.

=> Generally, testers find these bugs while testing the software application and assign to back to the developers for
verification this continuous process is called Retesting.

Purpose of Retesting:

===================

=> Ensure that identified defects are resolved.

=> verify the functionality of specific modules or components after fixes.

Advantages:

=============

conform bug fixes.

enhances quality.

Focused testing.

Disadvantages:

===========

Time -consuming.

Example:

=================

116
Scenario: Imagine a banking application like HDFC mobile app has reported defect where users are unable to reset
their passwords.

using the Forgot password functionality.

Defect identified: users enters their registered mail id or phone number but they are not receiving a reset password
link.

developers analyze and resolve the issue by fixing the email notification service responsible for send reset link.

test case name: verify that forgot password functionality.

steps to execute:

open the banking application.

click on "Forgot password" link.

enter registered mail id or mobile no.

submit the request for password reset link.

expected result:

the user should be receive a password reset link on the registered mail id or phone number with a stipulated time
frame.

Interface Testing:

=====================

Interface Testing is a type of software testing that focuses on verifying the communication between two software
systems or components.

=> It ensures that data sent and received between systems meet the expected functionality, reliability, and security
requirements.

when do we perform Interface Testing?

Interface Testing is performed during the integration testing phase, where two different components are
integrated.

why we use Interface Testing?

Interface Testing helps identifying issues that effect the software system, such as data mismatches, missing error
handling and so on. by validating the integration between modules.

117
=> ensuring to the end user satisfaction and by delivering the error free interface.

how to perform interface testing manually?

1] understand the requirements.

2] prepare test setup.

3] setup test environment.

4] execute test cases.

5] verify error handling.

6] document results.

where interface testing is used?

two or more software's components interact such as, e-commerce application, banking applications, CRM
platforms.

example:

============

scenario: Testing the payment gateway integration in an e-commerce testing.

System overview:

the e-commerce application interacts with the third-party payment gateway.

the user enters payment details, and the system sends this data to the gateway.

Testing steps:

==============

positive test case: verify that valid payment details are sent to the gateway, and a success response is received.

negative test case: Test with invalid payment details [ex: wrong UPI id] and ensure a failure response is received.

Alpha-Beta Testing

=====================

118
Alpha-Beta Testing are two types of user acceptance testing[UAT] performed to ensure the quality, functionality,
and reliability of a software product before its final release.

Alpha Testing:

==========

Alpha testing is a type of acceptance testing performed to identify all the possible issues and bugs before releasing
the final product to the end-user.

=> Alpha testing is carried out by the testers who are internal employees of the organization.

=> the main goal is to identify the tasks that a typical user might perform and test them.

features:

==================

=> performed in the development environment.

=> conducted by internal team, including developers or testers.

who performs:

QA Engineers / testers.

QA Engineers => QA Engineers is responsible for ensuring the quality of the software.

testers => testers is responsible for finding the bugs and issues.

when it is used?

After unit, integration, and system testing are complete.

example:

==============

scenario: Alpha testing for an e-commerce application.

objective: to manually test the functionality, usability of the application before sending to beta testing.

Environment setup: staging the environment to simulate the production stage.

Test data:

119
User credentials: [email protected] / Password123

Dummy products: Laptop [$1000], mobile [$500].

payment method: Dummy credit cards [ex: 4111 1111 2222 3333].

steps:

======

step 1 : Test preparation.

search product functionality.

add to cart and verify cart portal.

step 2: execute the functional test

add to cart is verifying that displaying the selected products or not.

step 3: check out process.

on the cart page, click proceed to checkout.

enter dummy user details [name, address].

enter a dummy credit card no [4111 1111 2222 3333].

expected result:

payment is successful an order conformation page should appear.

An order is generated and user receives the conformation mail.

Beta Testing:

==========

Beta testing is performed by the real users of software application in real environment and it can be considered as a
form of external user acceptance testing.

=> It is the final test before shipping a product to a customer.

120
Features of beta testing:

performed by the end user's environment.

conducted by the end-users or external testers.

who performs:

Beta testing is not performed developers or testers who are the part of the internal team. it is conducted by the real
users, or external testers.

when beta testing is used?

beta tested is conducted at the final stage of the software development life cycle.

example:

===========

Scenario: Beta testing a food delivery mobile app.

A food delivery company is launching a new app that allows users to browse restaurants, place orders, and track
deliveries.

Steps:

=======

Step 1: Identify beta testers.

the company selects a group of 100 real users[target audience].

Testers are chosen from a sign-up form on the company website.

step 2: setup test environment.

Test version deployment.

the beta version of the app is deployed in play store.

Step 3: execute beta testing.

testers use the app in real world environment and report their experiences.

Task 1 : browse restaurants.

121
Task 2 : place an order.

Task 3 : track delivery.

Task 4 : Test usability.

step 4: collect feedback.

testers share their findings.

Feedback with questions like

was the app easy to navigate.

Did you encounter bugs.

Step 5: Address report issues.

the deployment reviews all reported issues.

step 6: evaluate results.

Differences between alpha and beta testing:

Alpha testing:

=> Alpha testing performed by testers who are usually internal employees of the organization.

=> Alpha testing performs at developer’s site.

=> Alpha testing requires lab environment.

Beta testing:

=> Beta testing is performed by clients or end users.

=> Beta testing is performed at production site.

=> Beta testing does not require lab environment.

122
Monkey Testing:

====================

Monkey Testing is a software application technique in which testers enters any random inputs in the software
application without any predefined test cases and checks the behaviour of the software application, whether it
crashes or not.

purpose of doing monkey testing:

=========================

the purpose of doing the monkey testing is to find the bugs and errors in the software application using
experimental techniques.

Types of monkey testing:

========================

smart Monkey Testing: performed by testers who understand the system's functionality.[Random inputs].

Dumb Monkey Testing: performed by developers as well as testers without knowledge of systems functionality.
random inputs are used.

Tools for monkey testing:

=====================

Monkey Runner: used for testing the android application.

Monkey test tool: Automated random testing tools for mobile and web pages.

example:

Scenario: Testing e-commerce application.

A tester opens the app and starts performing completely random actions without following the defined testcases
for instance, the tester: logs with random credentials.

clicks on various categories and order without specific order.

123
Adds random products to the cart and removes them immediately.

Enters invalid data, such as special character or extremely long text, in the search bar.

output:

the goal is to observe whether the app behaves unexpectedly crashes, or shows any error during the unplanned
actions.

Exhaustive Testing:

=====================

Exhaustive Testing is a type of software testing approach where all possible combinations of inputs, conditions, and
scenarios are tested to ensure that the application behaves as expected in every case.

=> The objective is to cover every possible execution path and validate the software for correctness and
completeness.

Example:

Scenario: Testing a simple login with two input fields.

Username: [can accept 3 fixed values: user 1, user 2, user 3].

Password: [can accept 3 fixed values: pass 1, pass 2, pass 3].

Testing approach:

===================

All possible combinations of usernames and passwords must be tested to ensure the application responds correctly
or not.

user 1 + pass 1

user 1 + pass 2

user 1 + pass 3

user 2 + pass 1

124
user 2 + pass 2

user 3 + pass 3

user 3 + pass 1

user 3 + pass 2

user 3 + pass 3

outcome:

this result in a total of 9 test cases [3 usernames * 3 passwords].

the tester ensures that each combination behaves as expected: ex: login successful, invalid login message, etc...].

Ad-Hoc Testing:

=============

Ad-Hoc Testing is a testing technique performed without planning and documentations.

=> Testers perform this type of testing to identify defects that are not covered by the formal testing process.

=> It is also called as "Exploratory testing". when it involves a systematic approach guided by the tester’s expertise.

types of ad-hoc testing:

=======================

Buddy testing: two testers work together to identify defects. One may focus on executing test cases, while other
observes.

Monkey testing:

pair testing: Two testers collaborate, sharing ideas and strategies while testing.

when to perform ad-hoc-testing:

post build testing: After receiving a new build, to quickly identify the defects.

exploration testing: During the early stages of application development to understand the functionality.

125
how to conduct ad-hoc testing:

1] understanding the application

2] Identify the focus areas.

3] Test freely.

4] document defects: steps by my own.

4] verify fixes.

example: social media application

Scenario: A tester logs into Instagram app and begins exploring the profile settings.

Actions: the testers change the profile pictures, updates bio fields, toggles and privacy settings and observe any
unexpected behaviour or crashes.

outcome: Identified a bug where the app crashes when a profile picture exceeds a certain file size.

Non-Functional Testing

Performance Testing:

Performance Testing is a software testing process used for testing the speed, response time, stability, scalability,
and resource

usage of the application under workload.

=> The performance testing is to identify an eliminate the performance in the software application.

=> the focus of performance testing is to check the speed, stability.

who performs performance testing:

performance test engineers: typically, specialized QA professionals.

developers: for unit testing level performance testing.

126
example: by using load simulation tools.

Scenario: An e-commerce application expects a high traffic volume during its annual sale. The development team
needs to ensure the site handle 10,000 concurrent users without crashing or slow down.

testing steps:

Objective: verify the system can handle 10,000 users with a response of less than 2 seconds for product search.

Environment setup: use multiple systems to simulate 10,000 users.

test execution:

10 testers perform search for product, add items to cart and proceed to checkout.

each tester repeats this activity at specific intervals [ ex: every 30 seconds].

Observed:

Average response time for request.

Server CPU and memory usage.

result:

Document delays.

Record errors like 500 "internal server error" or slow search queries.

Load Testing:

===================

=> Load Testing checks the application ability to perform under anticipated user loads.

=> The objective is to identify performance bottle necks before the software goes live.

purpose of using load testing:

==========================

=> evaluate system behaviour under peak and normal user loads.

=> Ensure meets performance bench marks like response time and reliability.

127
performed by:

==================

Load Testing typically done by software testers, developers and also involve DevOps engineers,

depending upon the organization.

when to perform load testing:

======================

=> After completing functional testing.

=> Before the system goes live [pre-production environment].

=> whenever significant changes are made to the application such as

Adding new features.

modifying the underlying infrastructure.

Increasing user base or traffic expectations.

Steps to perform load testing:

=============================

1] Requirements gathering:

identify performance goals [ex: support 500 users simultaneously].

2] prepare test environment:

3] identify tools for monitoring system resources [ex: Task manager, performance monitor].

4] develop test scenarios: define the expected load [100, 500, or 1000 users].

5] execute the test scenarios.

128
example: load testing for an e-commerce website.

scenario: An e-commerce website needs to handle 500 users browsing products, adding items to carts

and checking out simultaneously.

steps:

Assemble 50 testers, each simulating 10 users.

testers perform actions like browsing, searching, and purchasing.

monitor server logs, CPU usage and response times.

analyze data to ensure response times within acceptable limits[ex: <5 Seconds].

Expected outcome:

================

the website should not crash.

response time should remain under <5 seconds for all users.

no more then 5 transaction failures.

Stress Testing:

================

Stress Testing involves testing an application under extreme workloads to see how it handles high traffic of data
processing.

=> The main objective of the stress testing is to identify the breaking point of the application.

who performs stress testing:

Performance Test engineers

Manual testers: For smaller scale systems or in the absence of automated tools, manual testers simulate stress
scenarios.3

Developers: during development phase, to ensure system stability.

why we have to do the stress testing?

Ensure the system can handle unexpected spikes in traffic or usage.

verify data integrity under extreme conditions.

129
when to perform stress Testing:

During the final stage of testing: to ensure the system is ready for deployment.

After functional testing: to verify the stability of a fully functional system.

How to perform stress testing:

=> Understand the system limit: 15000 users

Determine the expected workload and identify the stress points.

=> Create stress scenarios: 20000 => 60000

Define the scenarios such as sudden increase in concurrent users, data overload, or extreme inputs.

=> simulate conditions:

Manually simulate multiple users by opening numerous sessions, or submitting bulk data.

=> Monitor the system:

Observe the system behaviour, such as responsive time, error messages, and server stability.

=> Document results:

Record outcomes, including failures are slow systems or performance degradation.

Example:

Scenario: e-commerce website is preparing for a flash sale where traffic is expected to spike significantly.

Steps:

Expected load: the website is built to handle 10,000 users at a time.

Stress Test: simulate 15,000 users accessing the simultaneously.

perform large - volume transactions, such as placing 1,000 orders simultaneously.

Observations:

monitor responsive times, page load error, and date base behaviour.

Identify the server crash, database lock or APIs fail.

130
outcome:

If the site crashes at 12,000 users, developers can optimize server resources database queries to handle expected
workload.

Tools commonly used for stress testing:

Apache JMeter => it is opensource java tool that measures the performance of the application.

Load Runner => it is a software testing tool that measures the performance of the applications under load.

Endurance Testing:

=================

Endurance Testing is done to make sure the software can handle the expected load over along period of time.

=> endurance is used to define the capacity of something to last.

=> Endurance testing is also called as soak testing.

=> the primary objective of performing endurance testing is to conform that application is efficient enough to
handle increased load without response time failure.

=> who performs Endurance testing:

Performance Test engineers

Manual testers: For smaller scale systems or in the absence of automated tools, manual testers simulate stress
scenarios.

Developers: during development phase, to ensure that code efficient system stability at over time.

when to perform endurance testing:

After functional and stress testing.

How to perform endurance testing?

Define the test scenarios:

identify the critical operations that the system must sustain over time such as user logins, transactions.

131
prepare test environment: production.

simulate continuous usage:

monitor the system:

Document results:

Analyze logs:

Example:

=========

scenario: A video streaming application needs to ensure uninterrupted streaming for users over long hours.

steps:

Expected usage: the system support 5000 users streaming videos for 24 hours.

endurance testing:

simulate continuous video streaming by 5000 users for 24 hours.

monitor memory usage, CPU utilization, and streaming quality.

observations:

check if memory usage increase over time due to a memory leak.

verify the video streaming quality and system responsiveness remains consistent.

Tools commonly used for Endurance testing:

Apache JMeter => it is opensource java tool that measures the performance of the application.

Load Runner => it is a software testing tool that measures the performance of the applications under load.

Gatling: tool is designed for developers and DevOps team.

scalability testing:

=======================

Scalability testing is to determine the software applications effectiveness is scaling up to support an increase in the
user load.

132
=> It helps to plan the capacity addition to your software system.

who performs scalability testing : Performance test engineers and pure Testers.

when to perform scalability testing:

=> post-deployment phase.

=> During performances cycles.

=> periodically in production.

how to perform scalability testing:

=> Identify the objectives

=> Define the test environment.

=> Create test scenarios => define incremental load increases [10%, 50%].

=> Use load testing tools => Load Runner, Apache JMeters, Gatling.

=> Execute test cases.

=> Analyze Results.

Security Testing:

=====================

Security Testing is a type of a software testing that uncovers vulnerabilities of the system and determines that the
data and resources of the system are protected from possible threats.

It ensures that the software system and application are free from threats or risk that can cause a loss.

=> Security Testing of any system focuses on finding all the loop holes and weakness of the system which might
result into the loss of information or reputation of the organization.

133
Goals of security Testing:

=> To identify the threats in the system.

=> To measure the potential vulnerabilities[The quality of the system].

=> To help in detecting the every possible security risk in the system.

=> to help developers in fixing the security problems through coding.

Security Testing performed by:

1] Penetration testers => who actively tries to exploit vulnerabilities in a system to identify the system weakness.

2] Ethical hackers => who are trained to identify the vulnerabilities in a system.

Ex:

check if a user can access features or data they are not authorized to see by manually manipulating

the user ID parameters in a web application.

Reliability Testing:

==================

Reliability Testing is a software testing process that checks whether the software can perform a failure free
operation for a specified time period in a particular environment.

=> The purpose of reliability testing is to assure that the software product is bug free and reliable enough for it
expected output.

performed by :

=> Quality Assurance Testers

=> performance Testers

=> Automation Testers.

=> Developers => Developers will assist Testers in writing the automation test scripts.

How to perform:

134
=> Define the Reliability Requirements:

specify the system's expected time, failure rate, and mean time between failures.

=> Identify the critical scenarios:

high risks of the system.

=> Design the test cases:

=> Set up monitoring tools: Apache JMeter, gatling, Load Runner.

=> Execute Test cases:

=> Analyze Results:

=> Report and Address issue:

Example:

Scenario: Online Banking Application

Objective: Evaluate the reliability of an online banking application under continuous usage.

Steps:

=> simulate multiple users logging in and performing transactions over 24 hours.

=> monitor system metrices like transaction success rate, responses time.

Excepted outcome:

=> The system should handle all transactions without failure.

=> Responses time should remain with acceptable limits

Software Testing Life cycle:

===========================

Software Testing life cycle is a sequence of specific activities conducted during the testing process to ensure
software quality goals are met.

=> STLC involves both verification and validation.

=> It consists of series of activities carried out methodologically to help in verifying the software product.

135
Phases:

Requirement analysis

Test planning

Test case development

Environment setup

Test Execution phase.

Test cycle closure.

Requirement analysis =>

Requirement analysis in which test team studies the requirements from a testing point of view to identify testable
requirements and QA Team may interact with stake holders to understand requirements in detail.

=> Requirements would functional or non-functional.

Deliverables:

=> RTM [Requirement traceability matrix].

RTM is a tool or document that ensures project requirements are linked with stakeholders and

tracked throughout the project life cycle.

=> The main purpose of this RTM is to verify that all requirements of clients are covered in

the test case designed by the testers.

=> Project managers Test managers or Pure experienced test engineers.

Test planning:

Test planning is STLC phase in which senior QA manager or Team leads determines the test plan strategy along with
the efforts estimates for the project.

The resources test environment, test limitations and the testing schedule are also determined.

The test plan gets prepared and finalized in the same phase.

Deliverables:

=> Test plan documentation.

136
=> Effort estimation documentation.

Test case development:

Test case development phases involve creation, verification and rework of the test case & test scripts after test plan
is ready.

=> The test is identified then created and reviewed and reworked based on the pre-conditions.

=> Then the QA starts the development process of test case for individual units.

deliverables:

=> Test cases.

=> Test data.

Test Environment setup:

Test Environment setup decides the software and hardware conditions under which a work product is tested.

=> It is one of the critical aspects of the testing process and can be done in parallel with the test case development
phase.

=> Test team may not involve in this activity if the development team provides test environment.

Deliverables:

=> Environment ready setup.

=> smoke test results.

Test Execution phase:

Test Execution phase is carried out by the testers in which testing of the software is build is done based on the plans
and test cases prepared.

=> The process consists of test cases or test scripts execution, test cases or scripts maintenance

and bug reporting.

=> if bugs are reported then it can be reverted back to the development team for correction and

retesting will perform.

137
Deliverables:

=> Test cases updated with results.

=> defect reports.

Test cycle closure:

Test cycle closure is competition of test execution which involves several activities like test completion reporting,
and test results.

=> Testing team members meet, discuss and analyse testing artifacts to identify strategies that

have to be implements in future, taking lessons from the current cycle.

Deliverables:

=> Test closure report.

Example: E-commerce application.

Requirement analysis:

Requirements => Verify the login functionality, product search, and checkout process.

RTM is prepared to trace the requirements.

Test planning => Functional Testing of the login, product search, and checkout modules.

Test engineers, automation testers, selenium for test automation.

Test case development =>

Test case Example:

Test case ID: TC001

Test scenario: verify login with valid credentials.

steps: Navigate the login page.

Enter valid username and password.

click on login button.

Expected result => user should be redirected to the dashboard.

Test environment setup:

138
Environment: windows 10. chrome browser backend data base connection.

Test Execution

Manual and automated test executed for login, search, and check out modules.

Defects:

Defect Id : DF001

Description: Incorrect error message displayed in login page if even I have entered valid credentials.

status: Pending

Fixed and retested.

Test closure :

Test summary report : 25 test cases executed, 3 defects identified and resolved.

Bug Life cycle/defect life cycle:

=====================================

Bug life cycle in the software testing is the specific set of states that defect or bug goes through the entire life.

=> The purpose of defect life cycle is to easily coordinate and communicate current status of defect which changes
to various assigns and make the defect fixing process systematic and efficient.

It contains some phases or states:

New:

when a new defect is logged and posted for the first. It is assigned as a status "NEW".

Defect id:DF001 => NEW.

Assigned:

once the bug is posted by the testers, the lead of the tester approves the bug and assigns the bug to the particular
developer.

Open:

the developer starts analysing and starts working on it defect fix.

Fixed:

when a developer makes a necessary code change and verifies the change, he or she can make the status as fixed.

139
pending Retest:

once the defect is fixed the developer gives a particular module for retesting the module to the tester.

since the software testing remains pending from the testing end, the status assigned as in "pending Retest".

Retest:

Tester does the retesting of the code at this stage to check whether the defect is fixed by the developer or not.

Verified:

the testers retest the bug after it got fixed by the developer, if there is no bug detected in the software, then the
bug is fixed and the status assigned as "Verified".

Re-open:

if the bug exists even after the developer has fixed the bug, the tester changes the status to Re-opened.

once again the bug goes through bug life cycle.

Closed:

if the bug is no longer exists then the tester assigns the status as "closed".

Rejected:

if the developer feels the defect is not genuine defect then it changes to "Rejected".

Duplicate:

if the defect is repeated twice or the defect corresponds to the same concept of the bug, the status is changes to
duplicate.

Deferred:

if the present bug is not primary priority and if it is expected to fix the next release, than the status as "Deferred".

Not A bug:

if it does not effect the functionality of the application than the status as "NOT A BUG".

Two types of bugs or defects:

Priority and severity:

Priority :

Priority is defined as the order in which defect should be fixed.

140
Priority types:

LOW => the defect is an irritant but repair can be done once more serious defect has been fixed.

Medium => During the normal development activities defect should be resolved. It can wait until a

new version is created.

High => The defect must be resolved as soon as possible as it effects the system severely and cannot be until it fixed.

Severity:

Severity in a testing is a degree of impact a bug or defect has in a software application under test.

types of severities:

Critical=> This defect indicates complete shut-down of the process nothing can be proceed further.

Major => It is highly severe defect and collapses entire system.

medium => It cause some undesirable behaviour but the system is functional.

Low => It will not cause any major breakdown of the system.

Home work => I need real time example for priority and severity.

Agile?

Agile is project management and software development approach that aims to more effective.

=> It focuses on delivering the small pieces of work regularly instead of one big launch.

=> this allows teams to adopt to changes quickly and provide customer value faster.

Life cycle of agile methodology:

================================

1] Requirement gathering

141
In this stage the project team identifies and documents the needs and expectations of

various stakeholders, including clients, users.

=> establishing a budget and schedule time.

=> creating a project plan.

2] design:

developing high level system architecture.

3] development:

writing the actual code of the software.

4] Testing:

this phases involves several testing types:

Functional testing:

Non-functional testing:

5] deployment:

Deploying the software to the production environment.

6] review:

Addressing and resolving any issue that may arise after deployment.

Core principles:

==================

Customer stratification => Deliver early and continuous valuable outputs.

welcome changes => Adapt to evolving requirements.

Frequent deliver => providing work software frequently.

Collaboration => Daily cooperation between business and developers.

empowered teams => build projects around motivated, trusted individuals.

Face to Face communication => use direct communication as much as possible.

142
Agile principles:

=> customer no need to wait for long time.

=> we can develop and test and release piece of software to the customer with a few no

of features.

=> we can accept requirement changes.

there will good communication between customer, business analyst, developers and testers.

Agile Tools:

Agile follows on various tools to manage workflows , communications and documentation.

Project management tools => JIRA, Trello, Monday.com.

Collaboration tools => Slack, Microsoft teams, Zoom, Meet.

Version control tools => Git, GitHub, GitLab.

Testing tools => Selenium, postman, Junit.

CI/CD Tools => Jenkins, Travis CI, Circle CI.

Documentation tools => Confluence, Nation, Google Docs.

Bug Life cycledefect life cycle.txt

Displaying Bug Life cycledefect life cycle.txt.

Scrum:

Scrum is a popular framework that is used to whenever we want to develop complex products.

=> jeff Sutherland has introduced scrum.

=> Scrum is a type of agile framework.

=> scrum is a management framework that teams used to self-organize and work towards common goal.

Features:

=============

143
Scrum is a light weighted framework.

Scrum is simple to understand.

Scrum frameworks helps team to work together.

Scrum Roles:

1] Product Owner

defines the vision of the product.

ensures the team deliveries minimum value.

2] Scrum master:

Facilities scrum processes and removes obstacles.

ensures that team adheres to scrum principles.

3] Development Team:

cross functional professionals responsible for delivering product owners.

Sprint timings based upon the company basic time is 2 weeks.

Scrum Events:

==================

1] Sprint planning:

Define the sprint goals

participants => Entire team.

2] Daily scrum meeting daily stand up or start up call.

Align team progress => 10 to 15 min.

what i did yesterday

what u have planned to do.

144
3] Sprint Review:

show case the increment to the stakeholders.

participants => scrum master.

4] Sprint Retrospective:

sprint process and identifies improvements.

participants => scrum master.

5] sprint

A time boxed iteration[1 to 4 weeks].

includes all development, testing, reviews.

Scrum workflow:

=============

Product backlog creation => List all the features and requirements.

sprint planning => select items from the product backlog for the sprint.

Sprint executions => develop and test.

daily scrum meetings => monitor work progress.

sprint review : present requirements and improvements.

Sprint retrospective : Reflect on progress and suggest improvements.

Repeat : plan for the next sprint.

Test Cases Design:

===================

Test Case?

145
Test case is a documented set of conditions, inputs, actions, and expected results to verify that a specific feature or
functionality is working as intended.

Steps to write Test cases:

=> Understand the Requirements => carefully analyze the functionality or feature to be tested.

=> Define test scenarios => Break down the requirements into testable scenarios.

=> write Test cases => For each scenario, create test cases with clear and concise steps.

=> Use a standard template => Maintain consistency by following the well structured template.

Test cases types:

Functional test cases.

Non-functional test cases.

Integration test cases.

smoke test cases.

sanity test cases.

positive test case.

negative test case.

UI test case.

Database test case.

security test case.

performance test case.

boundary value test case.

exploratory test case.

end-to-end test cases.

146
Test Case Template:

Field Description
Test Case ID Unique Identifier for the test case[TCLogin001].
Test Sceanrio A high level discription of what being tested. => Validate the login functionality with valid and invalid cred
Test case
discription A detailed discription of the test case.=> ensure that user can login succesfully with valid credentials or b
Pre-conditions conditions that must be met before writing or excuting the test case. => user should have registered to th
Test Steps step by step instructions to excute the test case. => Navigate the login page => Enter a user name and ap
Test data Data required for the test case. => user name : PavanTest@143 Password : Pass1234
Expected Result The expecetd outcome of the testcase. => the user is sucessfully login and redirect to the dashbaord
Actual Result The observed outcome of the test case. => should be login suceesfully.
Status Pass/Fail/block based on the test result. => pass or fail
Comments Additional observations.

How to Review test cases:

=====================

1] Understand the Requirement.

2] Verify the test coverage:

check that all the functionalities are covered by the testcase.

3] check the structure and format.

4] Validate the Test steps.

The steps are executable without ambiguity.

=> The steps are to be easy to understand.

=> we have covered all the scenarios are not.

5] Review The Test data.

examine the test data for correctness and relevance.

6] Access Expected Results:

Ensure the expected results are specific.

7] identify Gaps:

Looking for the missed test scenarios are edge cases that are not covered.

8] check for Redundancy:

147
Eliminate the duplicate test cases.

Difference between Test Scenarios and Test Cases.

Test Scenarios:

High level descriptions of what needs to be tested.

=> To identify what to test

=> covering a complete feature or functionality.

=> Written in simple sentence or bullet points.

Test cases:

Detailed step by step instructions to validate specific functionality.

=> To describe how to test.

=> detailed and specific, focusing on individual conditions are steps.

=> written in structured format, including test steps, test data, expected results etc...

Test Case Design Techniques:

Test case design techniques are systematic methods used to create efficient and effective test cases that ensure
testing of the application under test.

Static Techniques:

Static technique involve reviewing and analyzing the documentation, code or design, without executing the
software.

 Informal Reviews:

An Informal Review is an unstructured process where team members discuss and evaluate the document or code

to identify issues.

Participants: team members, or stakeholders.

148
 Walkthroughs:

A Walkthrough is a semi-formal review process where the author of a document or code presents it to a

group to gather feedback.

Participants : team members, or stakeholders.

 Technical Reviews:

A Technical Review is a structured and formal process conducted by the technical experts to evaluate the

quality and a functionality of a deliverable.

Participants : technical experts.

 Inspection :

Inspection is formal review process involving a detailed and systematic execution of a document or code to

detect defects.

Participants : moderator => a designated person who leads to a review process.

Dynamic Techniques:

 Statement Coverage Testing:

Statement Coverage Testing ensures that each executable statement[test case] in the code is executed at

least once.

procedure :

Identify all the statements in the code.

design the test cases that execute each statement at least once.

Run the test cases and track the execution by using coverage tools.

 Branch Coverage Testing:

Branch Coverage Testing ensures that each possible branch[true/ false]. of every decision point in the code

is executed at least once.

procedure :

identify all the decision points in the code.

149
create test cases that traverse all the branches[true or false].

Execute the test cases to measure the branch coverage[is a metric that measures the percentages of

branches in the code in the programming.

 Path Coverage Testing:

Path Coverage Testing ensures that all possible paths in the executed. this technique focusing on covering

all combinations of decisions.

procedure :

Identify all independent paths.

create a test case to coverage each path.

 Loop Coverage Testing

Loop Coverage Testing ensures that loops in the code are executed in different scenarios:

Zero iterations.

single iteration

multiple iterations.

maximum iteration.

procedure:

Identify all the loops in the code.

create a test cases to cover all the loops.

execute the test cases.

150
Interview Questions:

1.How many test cases can we write per day?

It depends on the complexity of the functionality and clarity of requirements. On average, a tester can write
15–20 simple test cases per day, or 5–10 if the scenarios are complex or exploratory.

However, the actual number can vary depending on:

a. Complexity of the functionality:

Simple UI screen → >15 test cases/day


Complex business logic → maybe 4–6 per day

b. Level of detail required:

High level test cases (only steps & expected result) → faster
Very detailed including preconditions, test data, validation points → slower

c. Domain knowledge:
If the tester is familiar with the application/domain → more productivity
If it’s new or requires analysis/understanding → fewer test cases per day

d. Availability of requirement documents:


Clear and well-defined requirements → easier to write
Ambiguity or missing info → time spent on clarifications, so less output

e. Tools/Templates used:

Using existing templates or test management tools (Jira, TestRail, ALM) speeds up writing
Manual documentation takes longer

---

2. You are finding a bug but the developer is not accepting it. What will you do?

You should:

Reproduce the bug step-by-step in front of the developer.

Provide proper screenshots / logs / recordings and clearly explain the expected vs. actual result.

If the issue is still not accepted, escalate it to the Team Lead or BA with proper evidence.

151
What you should do in that situation:

•Collect solid evidence: Retest the issue, take screenshots, logs, steps to reproduce, video if needed – so it is
clearly reproducible.

•Describe exact steps to reproduce: Clearly document step-by-step instructions so the developer can
experience the issue on his machine.

•Refer requirement / specification: Map the bug with the requirement document or user story and highlight
which requirement is violated.

•Discuss one-to-one first: Try to explain the issue to the developer personally (with proof). Sometimes
direct communication solves misunderstandings.

•Involve BA / Product Owner: If still not accepted, involve the Business Analyst or Product Owner to
clarify expected behavior.

•Escalate to Test Lead / Manager: If after clarification the developer still refuses, escalate the issue to your
Test Lead or Manager with all supporting evidence.

In short:

Retest → Gather proof → Map with requirement → Communicate → Clarify → Escalate.

---

3. How would you define enough testing in a real-world project when the deadline is tight?
Enough testing means:

“In real-world projects, especially when the deadline is tight, ‘enough testing’ means focusing on the most
business-critical and high-risk areas first. We may not have time for 100% coverage, so we prioritize the
core functionalities, integrations and major user flows. Testing is considered sufficient when all critical
defects are fixed, the key scenarios work as expected, and any remaining issues are low severity and agreed
upon by stakeholders. In short: when the overall product risk is reduced to an acceptable level and the
business is confident to release.”
All critical and high-priority functionalities have been tested.

When is testing considered enough (under tight deadline):

•Core business flows are tested


•High-risk and high-impact areas are covered

152
•No major / blocker defects remain
• Only minor issues exist and are accepted by stakeholders
• Overall product risk is within an acceptable level for release

Major defects are fixed and verified.

Smoke/Sanity and Regression are completed.

---

4. Requirement incomplete, but developer starting the development — is it correct?

No, development should not start with unclear/incomplete requirements. It may lead to rework and defects.
Requirements should be clarified with BA/Client before development starts.

It’s not ideal to start development when the requirement is incomplete — because coding on the basis of
assumptions often leads to re-work, defects, and change requests later.

However, in real-world projects it sometimes still happens due to tight deadlines. The usual and
recommended approach is:

Acceptable only if:


•The core / high-level requirements are clear.
•The missing requirements are minor and expected to be clarified soon.
•The assumptions are documented and communicated to the BA / client.
•The developer and BA keep synchronizing frequently to update the implementation accordingly.

Not correct if:


•Major functionality is still unclear.
•The requirement is still changing / unstable.
•There is no confirmation from BA/client on the pending items.

Best practice:

Start the development only after the requirements are sufficiently clear and baseline (frozen). If there are
gaps, raise them, get clarification, and document assumptions. Otherwise it will increase effort and cost
during later phases (especially in testing & maintenance).

---

5. Why might a unit test seem problem-free, but integration testing finds an issue?
Because unit testing checks individual modules in isolation, whereas integration testing checks the
interaction between different modules. The modules might work fine individually but fail when combined
due to interface issues, data format mismatch, wrong API calls, etc.

153
Why Unit Tests Pass but Integration Tests Fail:

Unit Tests Focus on Isolated Components

•Unit tests validate individual methods or classes in isolation.


•Dependencies are often mocked or stubbed, so the test environment is controlled.
•You’re testing logic, not interaction — so it’s easy to miss issues that arise when components talk to each
other.

Integration Tests Expose Real Interactions:

•Integration tests validate how multiple components work together.


•They use real dependencies (e.g., databases, APIs, file systems), which introduces complexity.
•Issues like data mismatches, timing problems, configuration errors, or unexpected side effects often
surface only when components are integrated.

________________________________________
Common Issues Found in Integration Testing
Issue Type Description
Incorrect Assumptions A unit test might assume a method always returns a certain value — but real
data breaks that.
Dependency Failures External systems (DB, services) might be down, misconfigured, or return unexpected
results.
Data Format Mismatches One module sends JSON, another expects XML — unit tests won’t catch this.
Race Conditions Timing issues between threads or services often emerge only under integration.
State Management Shared state or session data might not persist or sync correctly across modules.
________________________________________
How to Bridge the Gap
•Use contract testing (e.g., Pact) to ensure interfaces between modules behave as expected.
•Write integration tests early to catch systemic issues before deployment.
•Combine mocks with real data in unit tests to simulate edge cases.
•Log interactions during integration tests to trace failures more easily.

---

6. When can we perform grey box testing?

Grey box testing is performed after integration testing and before system testing, when the tester has partial
knowledge of the internal structure and design of the application.

Grey box testing is typically performed during the integration and system testing phases of the software
development lifecycle. It’s a hybrid approach that combines the internal knowledge of the system (like
white box testing) with external testing techniques (like black box testing). Here's when and why you'd use
it:

When to Perform Grey Box Testing

154
1. Integration Testing Phase
• When modules are being integrated and you want to test the interaction between them.
• You have partial knowledge of the internal workings (e.g., APIs, data flow, architecture).
• Example: Testing how a login module interacts with the database and session management.

2. System Testing Phase


•When the complete system is available and you want to validate end-to-end workflows.
•You can use internal knowledge (like database schemas or XML configurations) to design better test cases.
• Example: Testing a shopping cart system with knowledge of how discounts are applied internally.

3. Security and Penetration Testing


• When you want to simulate an attacker with partial system knowledge.
• Useful for identifying vulnerabilities that a user with limited access might exploit.
• Example: Testing session hijacking or privilege escalation paths.

4. Regression Testing
• When changes are made to internal components and you want to ensure external behavior remains
consistent.
• You can target specific areas affected by code changes.
• Example: After updating a payment gateway module, you test the checkout flow with knowledge of the
updated logic.
________________________________________
Why Use Grey Box Testing?
•Combines the strengths of white and black box testing.
•Helps uncover issues related to data flow, security, and integration.
•Efficient for testers who have access to design documents, architecture diagrams, or source code snippets.

155
Interview questions

Certainly, Mohammed! Software testing is a vast field, and preparing for it involves understanding both
basic and advanced concepts. Here are some commonly asked questions along with brief answers:

Basic Questions:

1. What is Software Testing?


Software testing is the process of evaluating a software application to ensure it meets specific
requirements, works as expected, and is free from defects.
2. What are the different types of software testing?
Functional testing, performance testing, security testing, usability testing, compatibility testing, and
regression testing.
3. What is a Test Plan?
A document outlining the testing approach, scope, and objectives for a software testing project.
4. What is the difference between validation and verification?
o Verification: Ensures the application meets requirements and specifications.
o Validation: Ensures the application meets the needs of end users.
5. What is regression testing?
Re-testing an application after changes to ensure existing functionality remains unaffected.

Advanced Questions:

1. What is mutation testing?


A method to evaluate the quality of test cases by introducing changes (mutations) to the code and
checking if the test cases detect them.
2. What is fault masking?
A situation where one defect hides the presence of another defect.
3. What is the difference between test scenarios, test cases, and test scripts?
o Test Scenario: High-level description of what to test.
o Test Case: Detailed steps to test specific functionalities.
o Test Script: Automated instructions for testing.
4. What is the traceability matrix?
A document mapping requirements to test cases to ensure coverage.
5. What is the difference between static and dynamic testing?
o Static Testing: Reviews and checks without executing code.
o Dynamic Testing: Tests by executing the code.

You can explore more detailed questions and answers here and here. Let me know if you'd like further
clarification or examples!

156
Of course, Mohammed! Here are some additional software testing questions and answers to deepen your
understanding:

Intermediate Questions:

1. What is exploratory testing?


Testing without predefined test cases, where testers explore the application to identify defects.
2. What is equivalence partitioning?
A testing technique that divides input data into partitions to reduce the number of test cases while
maintaining coverage.
3. What is white-box testing?
Testing based on the internal structure or code of the application.
4. What is black-box testing?
Testing without knowledge of the internal code, focusing on inputs and expected outputs.
5. What is a latent defect?
A defect that exists in the system but does not cause failure until specific conditions are met.

Advanced Questions:

1. What is a defect life cycle?


The journey of a defect from identification to resolution, including states like New, Assigned, Fixed,
Retested, and Closed.
2. What is risk-based testing?
Prioritizing testing efforts based on the risk of failure and its impact.
3. What is a test harness?
A collection of software and test data used to test a program by simulating different conditions.
4. What is the difference between alpha and beta testing?
o Alpha Testing: Conducted by developers or testers in a controlled environment.
o Beta Testing: Conducted by end-users in a real-world environment.
5. What is the difference between load testing and stress testing?
o Load Testing: Checks system performance under expected load.
o Stress Testing: Evaluates system behavior under extreme conditions.

For even more questions, you can explore resources like Guru99 or Software Testing Material. Let me
know if you'd like to dive deeper into any specific topic!

157
1. What is Software Testing?

According to ANSI/IEEE 1059 standard – A process of analyzing a software item to detect the differences between
existing and required conditions (i.e., defects) and to evaluate the features of the software item.

2. What is the difference between SDET, Test Engineer, and Developer

Test Engineer SDET Developer

Test Engineer thinks only in the terms


SDET knows system functional Developer thinks how to develop a
of pass or fail of a test case and how to
objectives as well as quality objectives system and make a functionality work
break the software

Test Engineer works only for test life


SDET is involved in Designing, Developer is limited to Coding part and
cycle, like design of test cases, and
development, and testing release to testing team
execution

Dynamic skill sets, like knowledge of


No coding knowledge is required quality and testing and good in coding Only coding knowledge is required
too

SDET understands automation needs,


they can code and provide a solution to
Test Engineers know where repetitive
the team where repetitive kind of work
work or simple data entry is present
is killing the time. They can design Developers don’t deal with such tasks
but they are not expected to minimize
framework which can help testing
the repetitive tasks
team to reduce repetitive test cycle or
simple data entry task.

Well aware of Performance tuning and


Test Engineers are not expected to security threats , they can suggest and Developers are only expected to code
reach up to code level and tune the reach to the code and suggest where the functionality which is expected by
performance application is poor in performance, customer
plus they can optimize the code

SDET Vs Test Engineer Vs Developer

3. What are the best practices for writing test cases?

 Write test cases with end-users perspective

 Write test steps in a simple way that anyone can follow them easily

158
 Make the test cases reusable

 Set the priority

 Provide a test case description, test data, expected result, precondition, postcondition.

 Write invalid test cases along with valid test cases

 Follow proper naming conventions

 Review the test cases regularly and update them if necessary.

4. How many test cases you can execute in a day?

Be practical while answering these kind of real time manual testing interview questions. You can say like it totally
depends on the test case complexity and size. Some test cases have few test steps and some have more test steps.

A sample answer is “In my previous project, we generally execute 30-40 simple test cases (like login functionality)
per day, 10-20 medium test cases (like Assigning user roles) per day, and 5-10 complex test cases (complete
purchase flow) per day.

5. How many Test cases you can write in a day or how much time is required to write a test case?

Same strategy applies here too. It depends totally on the complexity of the functionality.

6. How many defects did you detect in your last project?

Before saying how many defects you detected in your last project, first start saying about the type of project you
worked and how many test cases you executed.
I have worked for an ecommerce website where I have executed overall of 200 test cases and found around 45
defects.

7. What is configuration management?

Configuration management (CM) is a process of systems engineering to maintain system resources, computer
systems, servers, software, and product’s performance in a consistent state. It helps to record all the changes made
in the system and ensures that the system performs as expected even though changes are made over time.

8. Name some popular configuration management tools?

Some of the popular configuration management tools are Ansible, Chef, Puppet, Terraform, Saltstack, etc.

9. What is Modification Request?

Modification request (MR) in software development is used by clients to change the existing functionality of a
software.

10. What is Enhancement report?

Enhancement report (ER) in software development is used by clients to add a new feature in a software.

159
11. What if the software is so buggy it can’t really be tested at all?

If the software is so buggy, the first thing we need to do is to report the bugs and categorize them based on
Severity. If the bugs are critical bugs then it severely affects schedules and indicates deeper problems in the
software development process. So you need to let the manager know about the bugs with proper documentation as
evidence.

12. What is the difference between Quality Assurance vs Quality Control in Testing?

Quality Assurance: Quality Assurance involves in process-oriented activities. It ensures the prevention of defects in
the process used to make Software Applications. So the defects don’t arise when the Software Application is being
developed.

Quality Control: Quality Control involves in product-oriented activities. It executes the program or code to identify
the defects in the Software Application.

Now that you know what is Quality Assurance and what is Quality Control. As a software test engineer, you need to
know the difference between Quality Assurance vs Quality Control.

Check this post, where we clearly discussed QA vs QC in Testing.

13. What is Verification in software testing?

Verification is the process, to ensure that whether we are building the product right i.e., to verify the requirements
which we have and to verify whether we are developing the product accordingly or not. Activities involved here are
Inspections, Reviews, Walk-throughs. Click here for more details.

14. What is Validation in software testing?

Validation is the process, whether we are building the right product i.e., to validate the product which we have
developed is right or not. Activities involved in this is Testing the software application. Click here for more details.

Don’t miss: Software QA Interview Questions

15. What is Static Testing?

160
Static Testing involves reviewing the documents to identify the defects in the early stages of SDLC. In static testing,
we do code reviews, walkthroughs, peer reviews, and static analysis of a source code by using tools like StyleCop,
ESLint, etc.,

16. What is Dynamic Testing?

Dynamic testing involves the execution of code. It validates the output with the expected outcome.

Read more: How To Perform Static Testing, How To Perform Dynaic Testing, and Static Testing vs Dynamic Testing

17. What is White Box Testing?

White Box Testing is also called as Glass Box, Clear Box, and Structural Testing. It is based on applications internal
code structure. In white-box testing, an internal perspective of the system, as well as programming skills, are used
to design test cases. This testing usually was done at the unit level. Click here for more details.

Various white-box testing techniques are:

1. Statement Coverage

2. Decision Coverage

3. Condition Coverage

4. Multiple Condition Coverage

18. What is Black Box Testing?

Black Box Testing is a software testing method in which testers evaluate the functionality of the software under test
without looking at the internal code structure. This can be applied to every level of software testing such as Unit,
Integration, System and Acceptance Testing. Click here for more details.

161
19. What is Grey Box Testing?

Grey box is the combination of both White Box and Black Box Testing. The tester who works on this type of testing
needs to have access to design documents. This helps to create better test cases in this process.

20. What is Positive and Negative Testing?

Positive Testing: It is to determine what system supposed to do. It helps to check whether the application is
justifying the requirements or not.

Negative Testing: It is to determine what system not supposed to do. It helps to find the defects from the software.

21. What is Test Strategy?

Test Strategy is a high-level document (static document) and usually developed by the project manager. It is a
document that captures the approach on how we go about testing the product and achieve the goals. It is normally
derived from the Business Requirement Specification (BRS). Documents like Test Plan are prepared by keeping this
document as a base. Click here for more details.

22. What is Test Plan and contents available in a Test Plan?

Test plan document is a document which contains the plan for all the testing activities to be done to deliver a
quality product. Test Plan document is derived from the Product Description, SRS, or Use Case documents for all
future activities of the project. It is usually prepared by the Test Lead or Test Manager.

1. Test plan identifier

2. References

3. Introduction

4. Test items (functions)

5. Software risk issues

6. Features to be tested

7. Features not to be tested

8. Approach

9. Items pass/fail criteria

10. Suspension criteria and resolution requirements

11. Test deliverables

12. Remaining test tasks

13. Environmental needs

14. Staff and training needs

15. Responsibility

162
16. Schedule

17. Plan risks and contingencies

18. Approvals

19. Glossaries

Click here for more details.

Learn Difference Between Test Plan vs Test Strategy

23. What is Test Suite?

Test Suite is a collection of test cases. The test cases which are intended to test an application.

Next we will see the difference between test scenarios, test cases, and test script.

24. What is Test Scenario?

Test Scenario gives the idea of what we have to test. Test Scenario is like a high-level test case.

25. What is Test Case?

Test cases are the set of positive and negative executable steps of a test scenario which has a set of pre-conditions,
test data, expected result, post-conditions and actual results. Click here for more details.

Learn Difference Between Test Case vs Test Scenario

26. What is Test Script?

Test scripts are a line-by-line description of the system transactions that should be performed to validate an
application or system under test. Test scripts provide a clear, step-by-step description of the transactions that
should be performed, with expected results for each step.

27. What is Test Bed?

An environment configured for testing. Test bed consists of hardware, software, network configuration, an
application under test, other related software.

28. What is Test Environment?

Test Environment is the combination of hardware and software on which Test Team performs testing.

Example:

 Application Type: Web Application

 OS: Windows

 Web Server: IIS

 Web Page Design: Dot Net

163
 Client Side Validation: JavaScript

 Server Side Scripting: ASP Dot Net

 Database: MS SQL Server

 Browser: IE/FireFox/Chrome

29. What is Test Data?

Test data is the data that is used by the testers to run the test cases. Whilst running the test cases, testers need to
enter some input data. To do so, testers prepare test data. It can be prepared manually and also by using tools.

For example, To test a basic login functionality having a user id, password fields. We need to enter some data in the
user id and password fields. So we need to collect some test data.

30. What is Test Harness?

A test harness is the collection of software and test data configured to test a program unit by running it under
varying conditions which involves monitoring the output with the expected output.

It contains the Test Execution Engine & Test Script Repository

31. What is Test Closure?

Test Closure is the note prepared before test team formally completes the testing process. This note contains the
total no. of test cases, total no. of test cases executed, total no. of defects found, total no. of defects fixed, total no.
of bugs not fixed, total no of bugs rejected etc.,

32. What are the tasks of Test Closure activities in Software Testing?

Test Closure activities fall into four major groups.

Test Completion Check: To ensure all tests should be either run or deliberately skipped and all known defects
should be either fixed, deferred for a future release or accepted as a permanent restriction.

Test Artifacts handover: Tests and test environments should be handed over to those responsible for maintenance
testing. Known defects accepted or deferred should be documented and communicated to those who will use and
support the use of the system.

Lessons learned: Analyzing lessons learned to determine changes needed for future releases and projects. In
retrospective meetings, plans are established to ensure that good
practices can be repeated and poor practices are not repeated

Archiving results, logs, reports, and other documents and work products in the CMS (configuration management
system).

33. What is test coverage?

Test coverage helps in measuring the amount of testing performed by a set of tests.

164
Test coverage can be done on both functional and non-functional activities. It assists testers to create tests that
cover areas which are missing.

34. Explain how does a test coverage tool work?

Code coverage testing is a process of running tests on software to ensure that the code plan covers all aspects of
the software’s source code. This type of testing runs parallel with actual product testing. The code coverage tool
allows you to track which statements of your source code are being executed. At the end of testing, you will receive
a report that details which statements were not covered and what percentage of your overall test coverage is.

35. What is Code coverage?

Code coverage is different from Test coverage. Code coverage is about unit testing practices that must target all
areas of the code at least once. It is usually done by developers or unit testers.

Refer Test Metrics.

36. List out Test Deliverables?

1. Test Strategy

2. Test Plan

3. Effort Estimation Report

4. Test Scenarios

5. Test Cases/Scripts

6. Test Data

7. Requirement Traceability Matrix (RTM)

8. Defect Report/Bug Report

9. Test Execution Report

10. Graphs and Metrics

11. Test summary report

12. Test incident report

13. Test closure report

14. Release Note

15. Installation/configuration guide

16. User guide

17. Test status report

18. Weekly status report (Project manager to client)

Click here for more details.

165
37. What is a Test Report?

A test report is a document that provides an overview of testing objectives, activities, and results. It is necessary to
summarize testing results and compare them against expectations. It helps us determine if the product is ready for
release or not. Additionally, it allows us to see the current status of the project and assess the quality of the product

38. What are the most common components of a defect report?

The most common components of a defect report format include the following

 Project Name

 Module Name

 Defect ID

 Defect detected on

 Defect detected by

 Priority

 Severity

 Defect resolved on

 Defect resolved by

39. What are different categories of debugging?

Debugging is the act of finding and solving errors in a computer program that stops it from running properly.

There are several categories of debugging, which include:

 Brute force debugging

 Backtracking

 Cause elimination

 Fault tree analysis

 Program slicing

40. Write some common mistakes that lead to major issues.

Some of the most common mistakes include:

 Ignoring small issues

 Poor Scheduling

 Underestimating

 Improper resource allocation

166
 Not following the exact process

Manual Testing Interview Questions for freshers

41. What are the levels of testing?

In software testing, there are four testing levels.

1. Unit Testing or component level testing

2. Integration Testing

3. System Testing

4. Acceptance Testing

42. What is Unit Testing?

Unit Testing is also called Module Testing or Component Testing. It is done to check whether the individual unit or
module of the source code is working properly. It is done by the developers in the developer’s environment. Learn
more about Unit Testing in detail.

43. What is Integration Testing?

Integration Testing is the process of testing the interface between the two software units. Integration testing is
done in three ways. Big Bang Approach, Top-Down Approach, Bottom-Up Approach. Learn more about Integration
Testing in detail.

Click here for more details.

44. What is System Testing?

Testing the fully integrated application to evaluate the system’s compliance with its specified requirements is called
System Testing AKA End to End testing. Verifying the completed system to ensure that the application works as
intended or not.

Check this post Difference Between System Testing and Integration Testing

45. What is Big Bang Approach?

Combining all the modules once and verifying the functionality after completion of individual module testing.

Top-down and bottom-up are carried out by using dummy modules known as Stubs and Drivers. These Stubs and
Drivers are used to stand in for missing components to simulate data communication between modules.

46. What is Top-Down Approach?

Testing takes place from top to bottom. High-level modules are tested first and then low-level modules and finally
integrating the low-level modules to a high level to ensure the system is working as intended. Stubs are used as a
temporary module if a module is not ready for integration testing.

167
47. What is Bottom-Up Approach?

It is a reciprocate of the Top-Down Approach. Testing takes place from bottom to up. Lowest level modules are
tested first and then high-level modules and finally integrating the high-level modules to a low level to ensure the
system is working as intended. Drivers are used as a temporary module for integration testing.

48. In manual testing what are stubs and drivers?

In software testing, Stubs and drivers are used in manual testing to test the functionality of a system without having
to use the actual system.

A stub is a small piece of code that is called by the Module under Test. A driver is a small piece of code that calls the
Module to be tested.

49. What is the difference between integration testing and system testing?

Integration Testing vs System Testing

INTEGRATION TESTING SYSTEM TESTING

It is a low level testing It is a high level testing

It is followed by System Testing It is followed by Acceptance Testing

It is performed after unit testing It is performed after integration testing

Different types of system testing are:


• Regression testing
Different types of integration testing are:
• Sanity testing
• Top bottom integration testing
• Usability testing
• Bottom top integration testing
• Retesting
• Big bang integration testing
• Load testing
• Sandwich integration testing
• Performance testing
• Maintenance testing

Testers perform both functional as well as non-functional


Testers perform functional testing to validate the interaction
testing to evaluate the functionality, usability, performance
of two modules
testing etc.,

168
INTEGRATION TESTING SYSTEM TESTING

Performed to test whether two different modules interact Performed to test whether the product is performing as per
effectively with each other or not user expectations and the required specifications

It can be performed by both testers and developers It is performed by testers

Testing takes place on the interface of two individual


Testing takes place on complete software application
modules

Here, we validate the interace between the individual


Here, we validate the finished product.
modules.

Testers need to understand the interlinked modules and Testers need to understand the internal structure and
their interaction. programming language.

It covers only functional testing. It covers both functional and non-functional testing.

50. What is End-To-End Testing?

In simple words, end-to-end testing is the process of testing software from start to end. Check this End-To-End
Testing guide for more information. Also, refer System Testing tutorial.

51. What is Functional Testing?

In simple words, what the system actually does is functional testing. To verify that each function of the software
application behaves as specified in the requirement document. Testing all the functionalities by providing
appropriate input to verify whether the actual output is matching the expected output or not. It falls within the
scope of black box testing and the testers need not concern about the source code of the application.

Learn more about Functional Testing here

52. What is Non-Functional Testing?

In simple words, how well the system performs is non-functionality testing. Non-functional testing refers to various
aspects of the software such as performance, load, stress, scalability, security, compatibility etc., Main focus is to
improve the user experience on how fast the system responds to a request.

53. What is the difference between functional and non-functional testing?

Functional Testing vs Non-functional testing

169
Functional Testing Non-functional Testing

What the system actually does is functional testing How well the system performs is non-functionality testing

To ensure that your product meets customer and business To ensure that the product stands up to customer
requirements and doesn’t have any major bugs expectations

To verify the behavior of the software at various load


To verify the accuracy of the software against expected output
conditions

It is performed before non-functional testing It is performed after functional testing

Example of functional test case is to verify the login Example of non-functional test case is to check whether
functionality the homepage is loading in less than 2 seconds

Testing types are


Testing types are
• Performance Testing
• Unit testing
• Volume Testing
• Smoke testing
• Scalability
• User Acceptance
• Usability Testing
• Integration Testing
• Load Testing
• Regression testing
• Stress Testing
• Localization
• Compliance Testing
• Globalization
• Portability Testing
• Interoperability
• Disaster Recover Testing

It can be performed either manual or automated way It can be performed efficiently if automated

54. What is Acceptance Testing?

It is also known as pre-production testing. This is done by the end-users along with the testers to validate the
functionality of the application. After successful acceptance testing. Formal testing conducted to determine
whether an application is developed as per the requirement. It allows the customer to accept or reject the
application. Types of acceptance testing are Alpha, Beta & Gamma.

55. On what basis is the acceptance plan prepared?

The acceptance test plan is prepared using the following inputs.

 Requirement Document: The requirement document specifies what exactly is needed and not needed in
the existing project from the customer’s perspective.

170
 Input from customer: Input from the customer will be in the format of formal emails, informal talks,
discussions, etc.,

 Project plan: Project plan document prepared by the project manager.

All the above three inputs act as good inputs to prepare the acceptance test plan.

56. What is Alpha Testing?

Alpha testing is done by the in-house developers (who developed the software) and testers before we ship the
software to the customers. Sometimes alpha testing is done by the client or outsourcing team with the presence of
developers or testers. It is a part of User Acceptance Testing. The purpose of doing this is to find bugs before the
customers start using the software.

57. What is Beta Testing?

Beta testing is done by a limited number of end-users before delivery. It is done after the Alpha Testing. Usually, it is
done in the client’s place. Learn more about Beta Testing here.

58. What is Gamma Testing?

Gamma testing is done when the software is ready for release with specified requirements. It is done at the client
place. It is done directly by skipping all the in-house testing activities.

59. What is Smoke Testing?

Smoke Testing is done to make sure if the build we received from the development team is testable or not. It is also
called as “Day 0” check. It is done at the “build level”. It helps not to waste the testing time to simply testing the
whole application when the key features don’t work or the key bugs have not been fixed yet.

Don’t miss this detailed Smoke Testing guide.

60. What is Sanity Testing?

Sanity Testing is done during the release phase to check for the main functionalities of the application without going
deeper. It is also called as a subset of Regression testing. It is done at the “release level”. At times due to release
time constraints rigorous regression testing can’t be done to the build, sanity testing does that part by checking
main functionalities.

Don’t miss this detailed Sanity Testing guide.

61. What is the difference between Sanity and Smoke Testing?

Sanity vs Smoke Testing

SMOKE TESTING SANITY TESTING

Smoke Test is done to make sure if the build we received Sanity Test is done during the release phase to check for the

171
SMOKE TESTING SANITY TESTING

from the development team is testable or not main functionalities of the application without going deeper

Smoke Testing is performed by both Developers and Testers Sanity Testing is performed by Testers alone

Smoke Testing exercises the entire application from end to Sanity Testing exercises only the particular component of the
end entire application

Smoke Testing, build may be either stable or unstable Sanity Testing, build is relatively stable

It is done on initial builds. It is done on stable builds.

It is a part of basic testing. It is a part of regression testing.

It is planned when there is no enough time to do in-depth


Usually it is done every time there is a new build release.
testing.

Manual Testing Interview Questions For Experienced

62. What is Retesting?

To ensure that the defects which were found and posted in the earlier build were fixed or not in the current
build. Say, Build 1.0 was released. Test team found some defects (Defect Id 1.0.1, 1.0.2) and posted. Build 1.1 was
released, now testing the defects 1.0.1 and 1.0.2 in this build is retesting.

Complete Guide: Retesting

63. What is Regression Testing?

Repeated testing of an already tested program, after modification, to discover any defects introduced or uncovered
as a result of the changes in the software being tested or in another related or unrelated software components.

Usually, we do regression testing in the following cases:

1. New functionalities are added to the application

2. Change Requirement (In organizations, we call it as CR)

3. Defect Fixing

4. Performance Issue Fix

5. Environment change (E.g., Updating the DB from MySQL to Oracle)

172
Read a detailed guide on Regression Testing

64. What do you mean by regression and confirmation testing?

Regression Testing: Testing team re-execute the tests against the modified application to make sure whether the
modified code breaks anything which was working earlier.

Confirmation Testing: Usually testers report a bug when a test fails. Dev Team releases a new version of the
software after the defect is fixed. Now the testing team will retest to make sure the reported bug is actually fixed or
not.

65. What is GUI Testing?

Graphical User Interface Testing is to test the interface between the application and the end user.

66. What is Recovery Testing?

Recovery testing is performed in order to determine how quickly the system can recover after the system crash or
hardware failure. It comes under the type of non-functional testing.

67. What is Globalization Testing?

Globalization is a process of designing a software application so that it can be adapted to various languages and
regions without any changes.

68. What is Internationalization Testing (I18N Testing)?

Refer Globalization Testing.

69. What is Localization Testing (L10N Testing)?

Localization is a process of adapting globalization software for a specific region or language by adding local specific
components.

70. What is Installation Testing?

It is to check whether the application is successfully installed and it is working as expected after installation.

71. What is Formal Testing?

It is a process where the testers test the application by having pre-planned procedures and proper documentation.

72. What is Risk Based Testing?

Identify the modules or functionalities which are most likely cause failures and then testing those functionalities.

73. What is Compatibility Testing?

It is to deploy and check whether the application is working as expected in a different combination of environmental
components.

173
74. What is Exploratory Testing?

Usually, this process will be carried out by domain experts. They perform testing just by exploring the functionalities
of the application without having the knowledge of the requirements. Check our detailed guide on Exploratory
Testing and also don’t miss these popular Exploratory Testing Tools.

75. What is Monkey Testing?

Perform abnormal action on the application deliberately in order to verify the stability of the application. Check our
in-depth guide on Monkey Testing.

76. What is Usability Testing?

To verify whether the application is user-friendly or not and was comfortably used by an end-user or not. The main
focus in this testing is to check whether the end-user can understand and operate the application easily or not. An
application should be self-exploratory and must not require training to operate it. Check this guide to learn how to
perform Usability Testing.

77. What is Security Testing?

Security testing is a process to determine whether the system protects data and maintains functionality as
intended.

78. What is Soak Testing?

Running a system at high load for a prolonged period of time to identify the performance problems is called Soak
Testing.

79. What is Endurance Testing?

Endurance testing is a non-functional testing type. It is also known as Soak Testing. Refer Soak testing.

80. What is Performance Testing?

This type of testing determines or validates the speed, scalability, and/or stability characteristics of the system or
application under test. Performance is concerned with achieving response times, throughput, and resource-
utilization levels that meet the performance objectives for the project or product.

Complete Tutorial: Performance Testing

81. What is Load Testing?

It is to verify that the system/application can handle the expected number of transactions and to verify the
system/application behavior under both normal and peak load conditions.

82. What is Volume Testing?

It is to verify that the system/application can handle a large amount of data

83. What is Stress Testing?

174
It is to verify the behavior of the system once the load increases more than its design expectations.

84. What is Scalability Testing?

Scalability testing is a type of non-functional testing. It is to determine how the application under test scales with
increasing workload.

85. What is Concurrency Testing?

Concurrency testing means accessing the application at the same time by multiple users to ensure the stability of
the system. This is mainly used to identify deadlock issues.

86. What is Fuzz Testing?

Fuzz testing is used to identify coding errors and security loopholes in an application. By inputting a massive amount
of random data to the system in an attempt to make it crash to identify if anything breaks in the application.

Don’t miss: Fuzz Testing Guide

87. What is Adhoc Testing?

Ad-hoc testing is quite opposite to the formal testing. It is an informal testing type. In Adhoc testing, testers
randomly test the application without following any documents and test design techniques. This testing is primarily
performed if the knowledge of testers in the application under test is very high. Testers randomly test the
application without any test cases or any business requirement document.

88. What is Cross-Browser Testing?

Cross Browser Testing is a type of non-functional test which helps us ensure that our website or web application
works well in various browsers.

Web applications rely on browsers like Google Chrome, Mozilla Firefox, Internet Explorer and Safari to function.
Even though they all support web standards to some extent, there are still slight differences between them. This can
pose a problem for developers who have to test their software on multiple browsers and take note of any
inconsistencies.

Different browsers display websites differently due to styling, and it’s not possible to have every browser installed
on one machine. Each browser is designed by a different company. Every browser has its own individualized
features to make it stand out from the rest. When testing a website, we have to confirm that our site looks the
same on all browsers.

89. What is meant by browser automation?

Browser automation is the process of testing a web application’s functionality in a browser automatically, using a
script. The script launches the browser, navigates to the site, and then interacts with it like an normal end user
would. This involves clicking buttons or links.

Browser automation with automation tools like Selenium, Katalon, Cypress, etc., is significantly quicker than testing
it manually because these tools can test many scenarios in a very short amount of time.

175
QA Interview Questions And Answers

90. What is Interface Testing?

Interface testing is performed to evaluate whether two intended modules pass data and communicate correctly to
one another.

91. What is Reliability Testing?

Perform testing on the application continuously for long period of time in order to verify the stability of the
application

92. What is Bucket Testing?

Bucket testing is a method to compare two versions of an application against each other to determine which one
performs better.

93. What is A/B Testing?

A/B testing is the process of comparing two versions of a webpage or other marketing asset to see which one
performs better. The comparison doesn’t stop with web pages – it can be app interfaces, landing pages, email
marketing, etc. To learn more check A/B Testing Guide

94. What is Split Testing?

Refer A/B testing.

95. What are the principles of Software Testing?

1. Testing shows presence of defects: Although testing can discover software defects, it cannot ensure that
the product is free of errors. Testing may reduce the quantity of glitches, but it will never be able to
eliminate them all.

2. Exhaustive testing is impossible: Since it’s impossible to test the software exhaustively, we can only run a
few select tests and we assume that the software will always produce correct output. More comprehensive
testing would be too costly and time-consuming.

3. Early testing: It’s crucial to test software early on to find defects. In the early stages of SDLC, it’s easier and
less expensive to identify defects. Software testing should begin in the first phase of software development,
during requirement analysis.

4. Defect clustering: According to the Pareto Principle, 80% of software defects arise from 20% of modules. In
other words, most project defects are found in only a few sections of code.

5. Pesticide Paradox: If you want to find any new bugs, you can’t just keep running the same test cases
repeatedly. You need to add or update your existing test cases.

6. Testing is context depending: Depending on the software development context, the testing approach will
differ. Based upon its type, different software requires variations in testing.

176
7. Absence of error fallacy: Not only does the software need to be bug-free 99% of the time, but it must meet
customer requirements if it is ever going to be used.

Click here for more details.

96. What is Exhaustive Testing?

Testing all the functionalities using all valid and invalid inputs and preconditions is known as Exhaustive testing.

97. What is Early Testing?

Defects detected in early phases of SDLC are less expensive to fix. So conducting early testing reduces the cost of
fixing defects.

98. What is Defect Clustering?

Defect clustering in software testing means that a small module or functionality contains most of the bugs or it has
the most operational failures.

99. What is Pesticide Paradox?

Pesticide Paradox in software testing is the process of repeating the same test cases, again and again, eventually,
the same test cases will no longer find new bugs. So to overcome this Pesticide Paradox, it is necessary to review
the test cases regularly and add or update them to find more defects.

100. What is Defect Cascading in Software Testing?

Defect cascading in Software testing means triggering of other defects in an application. When a defect is not
identified or goes unnoticed while testing, it invokes other defects. It leads to multiple defects in the later stages
and results in an increase in a number of defects in the application.

For example, if there is a defect in an accounting system related to negative taxation then the negative taxation
defect affects the ledger which in turn affects other reports such as Balance Sheet, Profit & Loss etc.,

101. What is the difference between Outsourced Testing and Crowdsourced Testing

Outsourced Testing vs Crowdsourced Testing

Outsource Testing Crowdsourced testing

A dedicated team is present to handle your testing Needs A completely unknown pool of testing resources test your
we can say it’s a third party which is unknown to you, test application, you can judge the quality of your product on the
your application or product with a fresh set of mind. basis of number of bugs reported.

Payment is done on the basis of hours spent in testing, this Payment is done on the basis of bug reported, no of severe
estimation is done prior to the testing cycle. As an example bugs and low priority bugs. For example severe bug cost is
testing outsourcing costs around 20 to 40$ per hour. 15$ and low priority bug is 3$ whereas medium priority bugs

177
Outsource Testing Crowdsourced testing

are costing 5$.

Since there are n number of testers working on your


application and they are not legally bound with Crowd
Application data is kept confidential and this is one of the source provider company, they are not bound to keep
code of ethics of every testing provider company. application data confidential. There are chances of data
leakage if crowd source testing is done and no assurance of
data privacy.

Communication is bit tricky, because you have to


Communication is quite easy, because there is one
understand the product quality on the basis of bugs logged
representative always present to handle to share testing
by testers, you have to understand the bug by talking to the
status, quality of your product.
tester individually.

Since there is no team concept, here focus is more on


Quality is not compromised, since the objective is to identify
Quantity rather than quality. There are chances that your
all the bugs, within time and within budget. Entire team
application is tested by 1000 of testers of different
works to achieve this milestone, They present potential and
experiences. They may log 5K bugs of different severity. So
valid bugs and organization is confident enough to fix only
its organization’s responsibility to identify the real bugs and
those bugs and get assured about their product quality.
fix them.

Testing environment is totally dependent on individual


Testing platform and environment is completely owned by
tester, some testers are on testing on MAC machine or some
outsourced company, they are well settled with all useful
are testing on Windows, some are testing on Android or
software, tools, management tools, OS and Devices.
some are testing on Apple.

Skilled testers are in the team, there are fixed no of testers Huge no of testers, with different expertise and different
in the team. Each tester is well skilled in a particular area years of experiences, so chances of quality bugs depends of
like mobile testing, performance testing, automation testing, expertise of testers. Which may be surprisingly good or bad
functional testing. too.

One team, one time zone, restricted deadline, and planned No team concept, Different time zones, no deadlines but
budget, in this way testing cycles are complete. bugs are reported very fast.

Bugs reported are generally predictive in nature because Here no limitations of testing scope, N no of testers, n no of
testers work within a scope of testing. directions of breaking the system, Due to this testing cycle
They don’t touch few areas because it may not in their goes through a real scenario, for example n number of users

178
Outsource Testing Crowdsourced testing

are accessing application they might get some security flaw


budget.
in the application.

High paid in comparison to Crowd sourced testing but lesser Budget friendly, quick results some time real and
than Inhouse Testing team. unexpected issues are identified.

102. What is Walk Through?

A walkthrough is an informal meeting conducts to learn, gain understanding, and find defects. The author leads the
meeting and clarifies the queries raised by the peers in the meeting.

103. What is Inspection?

Inspection is a formal meeting lead by a trained moderator, certainly not by the author. The document under
inspection is prepared and checked thoroughly by the reviewers before the meeting. In the inspection meeting, the
defects found are logged and shared with the author for appropriate actions. Post inspection, a formal follow-up
process is used to ensure a timely and corrective action.

104. Who are all involved in an inspection meeting?

Author, Moderator, Reviewer(s), Scribe/Recorder and Manager.

105. What is a Defect?

The variation between the actual results and expected results is known as a defect. If a developer finds an issue and
corrects it by himself in the development phase then it’s called a defect. Click here for more details.

106. What is a Bug?

If testers find any mismatch in the application/system in testing phase then they call it as Bug. Click here for more
details.

107. What is an Error?

We can’t compile or run a program due to a coding mistake in a program. If a developer unable to successfully
compile or run a program then they call it as an error. Click here for more details.

108. What is a Failure?

Once the product is deployed and customers find any issues then they call the product as a failure product. After
release, if an end user finds an issue then that particular issue is called as a failure. Click here for more details.

109. What is Bug Severity?

179
Bug/Defect severity can be defined as the impact of the bug on customer’s business. It can be Critical, Major or
Minor. In simple words, how much effect will be there on the system because of a particular defect. Click here for
more details.

110. What is Bug Priority?

Defect priority can be defined as how soon the defect should be fixed. It gives the order in which a defect should be
resolved. Developers decide which defect they should take up next based on the priority. It can be High, Medium or
Low. Most of the times the priority status is set based on the customer requirement. Click here for more details.

111. Tell some examples of Bug Severity and Bug Priority?

High Priority & High Severity: Submit button is not working on a login page and customers are unable to login to
the application

Low Priority & High Severity: Crash in some functionality which is going to deliver after couple of releases

High Priority & Low Severity: Spelling mistake of a company name on the homepage

Low Priority & Low Severity: FAQ page takes a long time to load

Click here for more details.

112. What is a Critical Bug?

A critical bug is a show stopper which means a large piece of functionality or major system component is completely
broken and there is no workaround to move further.
For example, Due to a bug in one module, we cannot test the other modules because that blocker bug has blocked
other modules. Bugs which affects the customers business are considered as critical.

Example:

1. “Sign In” button is not working on Gmail App and Gmail users are blocked to login to their accounts.
2. An error message pops up when a customer clicks on transfer money button in a Banking website.

113. What do you mean by Latent Defect and Masked Defect?

Latent Defect:

When users perform a particular task in an unusual or rare situation or without the presence of usual scenarios,
latent defects are revealed.

A latent defect is a defect in the system that has been there for some time but have not yet been invoked because
the conditions required to invoke them have not been met.

This systematic defect encompasses the entire software production process, from pre-production testing to
extended post-release testing.

Latent defects are those which only become apparent under special circumstances – for example, when users try to
perform a task in an unusual way or without the usual conditions present.

180
Masked Defect:

Although these defects have not led to a failure yet, they eventually will because another defect is preventing that
section of the code from being executed. It can only be found when the defect hiding it is exposed by the user
through a specific operation. Some defects are hidden by other, more predominant ones and go undetected until
the latter is found.

114. What is the difference between a Standalone application, Client-Server application and Web application?

Standalone application:

Standalone applications follow one-tier architecture. Presentation, Business, and Database layer are in one system
for a single user.

Client-Server Application:

Client-server applications follow two-tier architecture. Presentation and Business layer are in a client system and
Database layer on another server. It works majorly in Intranet.

Web Application:

Web server applications follow three-tier or n-tier architecture. The presentation layer is in a client system, a
Business layer is in an application server and Database layer is in a Database server. It works both in Intranet and
Internet.

115. What is Bug Life Cycle?

Bug life cycle is also known as Defect life cycle. In Software Development process, the bug has a life cycle. The bug
should go through the life cycle to be closed. Bug life cycle varies depends upon the tools (QC, JIRA etc.,) used and
the process followed in the organization. Click here for more details.

116. What are the different stages in a defect life cycle?

The different stages in a bug life cycle are:

 New

 Assigned

 Open

 Test

 Moved to QA / Ready to test

 Verified

 Fixed

 Closed

 Retested

181
 Reopen

 Duplicate

 Deferred

 Rejected

 Cannot be fixed

 Not reproducible

 Need more information

117. What is Bug Leakage?

A bug which is actually missed by the testing team while testing and the build was released to the Production. If
now that bug (which was missed by the testing team) was found by the end user or customer then we call it as Bug
Leakage.

118. What is Bug Release?

Releasing the software to the Production with the known bugs then we call it as Bug Release. These known bugs
should be included in the release note.

119. What is Defect Age?

Defect age can be defined as the time interval between date of defect detection and date of defect closure.

Defect Age = Date of defect closure – Date of defect detection

Assume, a tester found a bug and reported it on 1 Jan 2016 and it was successfully fixed on 5 Jan 2016. So the
defect age is 5 days.

120. What is Error Seeding?

Error seeding is a process of adding known errors intendedly in a program to identify the rate of error detection. It
helps in the process of estimating the tester skills of finding bugs and also to know the ability of the application
(how well the application is working when it has errors.)

121. What is Error Guessing?

Error guessing is also a method of test case design similar to error seeding. In error guessing, testers design test
cases by guessing the possible errors that might occur in the software application. The intention is to catch the
errors immediately.

122. What is Showstopper Defect?

A showstopper defect is a defect which won’t allow a user to move further in the application. It’s almost like a
crash.

182
Assume that login button is not working. Even though you have a valid username and valid password, you could not
move further because the login button is not functioning.

123. What is HotFix?

A hotfix is a build aimed at resolving a severe issue found in production.

At times, a build executed in the production evironment would have some critical errors and it would be rolled
back. Now development team kept all their work aside and focus on fixing these errors immediately and release a
new build to fix that in the production. This build is referred as a hotfix.

Patches and hotfixes are two distinct types of software updates. Patches are available to the public, while hotfixes
are not.

Hotfixes are also known as quick-fix engineering updates (QFE updates)

124. What’s a bugfix?

A bugfix is a build aimed at resolving a bug which is detected by the testers in the testing cycle.

125. What is a bug bounty?

A bug bounty program lets an organization offer reward to a person who find errors in their software and report
them.

Bug bounty is a concept that has existed since the internet was created. Companies started to understand how
expensive it is for them to hire experts in penetration testing every time they want to find vulnerabilities on their
website or application. So recently, bug bounty programs become mainstream.

The first company to catch on to this concept was Google . It launched its “Vulnerability Reward Program” in 2010
and has paid out over $4 million since then.

126. What are the different strategies for rollout to end-users?

There are four strategies to be followed for the rollout of any software testing project are as follows:

 Pilot

 Gradual Implementation

 Phased Implementation

 Parallel Implementation

127. What is Boundary Value Analysis?

Boundary value analysis (BVA) is based on testing the boundary values of valid and invalid partitions. The Behavior
at the edge of each equivalence partition is more likely to be incorrect than the behavior within the partition, so
boundaries are an area where testing is likely to yield defects. Every partition has its maximum and minimum values
and these maximum and minimum values are the boundary values of a partition. A boundary value for a valid

183
partition is a valid boundary value. Similarly, a boundary value for an invalid partition is an invalid boundary
value. Click here for more details.

128. What is Equivalence Class Partition?

Equivalence Partitioning is also known as Equivalence Class Partitioning. In equivalence partitioning, inputs to the
software or system are divided into groups that are expected to exhibit similar behavior, so they are likely to be
proposed in the same way. Hence selecting one input from each group to design the test cases. Click here for more
details.

129. What is Decision Table testing?

Decision Table is aka Cause-Effect Table. This test technique is appropriate for functionalities which has logical
relationships between inputs (if-else logic). In the Decision table technique, we deal with combinations of inputs. To
identify the test cases with a decision table, we consider conditions and actions. We take conditions as inputs and
actions as outputs. Click here for more details.

130. What is State Transition?

Using state transition testing, we pick test cases from an application where we need to test different system
transitions. We can apply this when an application gives a different output for the same input, depending on what
has happened in the earlier state. Click here for more details.

131. What is an entry criteria?

The prerequisites that must be achieved before commencing the testing process. Click here for more details.

132. What is an exit criteria?

The conditions that must be met before testing should be concluded. Click here for more details.

133. What is SDLC?

Software Development Life Cycle (SDLC) aims to produce a high-quality system that meets or exceeds customer
expectations, works effectively and efficiently in the current and planned information technology infrastructure, and
is inexpensive to maintain and cost-effective to enhance.

Click here for more details.

134. What are the different available models of SDLC?

1. Waterfall

2. Spiral

3. V Model

4. Prototype

5. Agile

184
135. Can you do System testing at any stage of SDLC?

We can do System Testing only when all the units are in place and working properly. It can only be done before User
Acceptance Testing (UAT).

136. What is the procedure of manual testing?

Manual testing is crucial for testing software applications more thoroughly. The procedure of manual testing
comprises of the following.
1. Planning and Control
2. Analysis and Design
3. Implementation and Execution
4. Evaluating and Reporting
5. Test Closure activities

Refer Software Development Life Cycle (SDLC) & Software Testing Life Cycle (STLC)

137. What is STLC (Software Testing Lifecycle)?

STLC (Software Testing Life Cycle) identifies what test activities to carry out and when to accomplish those test
activities. Even though testing differs between Organizations, there is a testing life cycle. Click here for more details.

138. What are the stages in the software testing lifecycle?

Following are the stages in the STLC.

 Requirement Analysis

 Test Planning

 Test Design

 Test Environment Setup

 Test Execution

 Test Closure

139. What is RTM?

Requirements Traceability Matrix (RTM) is used to trace the requirements to the tests that are needed to verify
whether the requirements are fulfilled. We have to ensure that every requirement has atleast 1 test case.
Requirement Traceability Matrix AKA Traceability Matrix or Cross Reference Matrix. Click here for more details.

140. What is Test Metrics?

Software test metrics is to monitor and control process and product. It helps to drive the project towards our
planned goals without deviation. Metrics answer different questions. It’s important to decide what questions you
want answers to. Click here for more details.

141. When to stop testing? (Or) How do you decide when you have tested enough?

185
There are many factors involved in real-time projects to decide when to stop testing.

1. Requirement coverage reaches a specified point

2. Testing deadlines or release deadlines

3. When the complete testing budget is exhausted

4. By reaching the decided pass percentage of test cases

5. The risk in the project is under an acceptable limit

6. All the high priority bugs, blockers are fixed

7. When acceptance criteria is met

8. After the Alpha and Beta testing period ends

9. Depends on Management decision

Don’t miss: ISTQB Quiz

142. What is an API?

The term API stands for Application Programming Interface. In other words, it is a method of communication
between two software components. An API shields the internal process and complexity of a software program while
allowing users to focus only on the inputs and outputs required to use it. Consequently, this makes life much easier
for everyone involved!

When developers are building software, they usually don’t write the code from scratch. Instead, they use other
libraries that have been created by third parties. An API allows two separate components of software to
communicate with each other by providing an interface for them to understand.

APIs can also provide the data an application needs. For example, pretend you’re building a weather app that
displays temperature. You would rather access the meteorological institute’s API for this information instead of
developing the technology to collect it yourself.

143. What is API Testing?

API testing is a type of software testing that involves testing APIs directly and also as a part of integration testing to
check whether the API meets expectations in terms of functionality, reliability, performance, and security of an
application. In API Testing our main focus will be on a Business logic layer of the software architecture. API testing
can be performed on any software system which contains multiple APIs. API testing won’t concentrate on the look
and feel of the application. API testing is entirely different from GUI Testing.

Learn API Testing

144. Which test cases are written first white boxes or black box?

The simple answer is black-box test cases are written first.

186
Let’s see why black-box test cases are written first compared to white box test cases.
Prerequisites to start writing black-box test cases are Requirement documents or design documents. These
documents will be available before initiating a project.
Prerequisites to start writing white box test cases are the internal architecture of the application. The internal
architecture of the application will be available in the later part of the project i.e., designing.

145. What is the workbench concept in Software Testing?

Workbench is a practice of documenting how a specific activity must be performed. It is often referred to as phases,
steps, and tasks.

In every workbench there will be five tasks such as Input, Execute, Check, Production Output, and Rework.

146. What is Random testing?

In random testing is a form of black-box software testing technique where the application is testing by generating
random data.

147. What are the different types of testing?

There are various ways to test software. Software developers conduct some types of testing while other kinds of
software testing are done by QAs. The following are several types of software testing

148. What is a user story?

187
In software development, a user story is a description of a functionality that will be delivered to the end user. It is
typically written from the user’s perspective and captures what the user needs or wants. A good user story should
be small and self-contained, so that it can be easily implemented by the development team.

User stories are a key part of agile software development, and help to ensure that the final product will meet the
needs of the end users. They also help to break down complex functionality into smaller, more manageable pieces.

149. What is SPICE in software testing?

SPICE is an acronym for Software Process Improvement and Capability dEtermination. It is a set of guidelines and
practices that aim to improve the quality of software development and implementation. The main goals of spice are
to improve the quality of software products, reduce development costs, and improve customer satisfaction.

150. What are the different HTTP status codes that a server can return?

The HTTP status code is a three-digit number that tells you the status of an incoming HTTP request. It indicates
whether or not the request has been completed.

The five types of responses a server can send for an HTTP request are as follows.

 Information (100 – 199): Status code 1XX provides a brief response that includes the status line, some
optional headers, and terminates with an empty line.

 Success (200 – 299): Status code 2XX means that the incoming HTTP request was successfully received,
understood, and accepted.

 Redirect (300 – 399): Status code 3XX are signs that tell the client what further actions to take in order to
satisfy the HTTP request. The resource may have been moved temporarily or permanently, and the client
may need to be redirected to another URL.

 A client error (400 – 499): Status code 4XX means a problem with the client who initiated the HTTP request.

 Server error (500 – 599): Status code 5XX means that the server had a problem processing the request.

151. Should you write white box test cases or black box test cases first?

Black-box test cases are usually written first, followed by white-box test cases. To write black box test cases, you
need an outline of the design or project plan and the requirements document; both readily available at the
beginning of a project.

White box testing requires more architecture clarification that isn’t initially available during the initial phase of a
project.

Therefore, white-box test case development typically happens after black-box tests have been completed.

152. What effect does removing a defect during the latter stage, as opposed to the initial stage, have on cost?

It is crucial to fix any defects found in the beginning stages of a project because it will be much more expensive to
do so later on. The cost of fixing a defect grows exponentially as time goes by.

188
Eliminating defects is cheaper during the design phase than waiting until maintenance, but if you wait, it’ll cost you
twenty times more.

153. What is Use Case Testing?

Use case testing is a functional testing technique that helps testers to identify test scenarios based on the
functionality of the software from start to finish.

In use case testing, the tester works through each step in a scenario, or use case, to ensure that the software
behaves as expected. A use case is a description of how a user interacts with the software to achieve a goal.

For example, consider a scenario where a user wants to buy a product from an online store. The steps in this
scenario would be:

 The user browses the store and adds the product to their shopping cart.

 The user goes to the checkout page and enters their payment information.

 The user confirms their order and clicks the “submit” button.

 The software processes the order and displays a confirmation message to the user.

To test this scenario using use case testing, the tester would carry out each step in the scenario and check that the
software behaves as expected at each step.

Use case testing is a powerful technique for finding functional defects in software. It is especially useful for testing
complex applications with many user interactions.

154. What is the difference between project risk and product risk?

Project risk refers to potential adverse events or conditions that could threaten the successful completion of a
project. These risks are often related to project management aspects such as timelines, resource availability, budget
constraints, and stakeholder engagement. For example, a project risk could be the risk of delays due to supply chain
disruptions or the risk of budget overruns due to unexpected costs.

Product risk, on the other hand, pertains to factors that could affect the quality or performance of the product
being developed. This includes risks associated with design flaws, faulty development processes, integration issues,
or unmet user requirements. A common product risk is the possibility of introducing bugs that may cause the
software to malfunction in a production environment.

In summary, while project risks are predominantly concerned with the execution and management of the project,
product risks are focused on the end deliverable’s quality and performance. Both types of risks must be carefully
identified, assessed, and mitigated to ensure successful project completion and a high-quality product.

155. Is it possible to achieve 100% test coverage? How would you ensure it?

The concept of 100% test coverage can really divide software engineers, as it doesn’t guarantee test quality.

High coverage doesn’t automatically mean well-tested software; the focus should be on test quality and critical
system behaviors.

189
Achieving 100% test coverage involves ensuring every part of the codebase is tested, but in practice, this is
challenging and often impractical due to resource and time constraints.

To strive towards high test coverage, one can implement several strategies:

 Automated Testing: Utilize automated testing tools to create and run a comprehensive suite of tests that
cover various scenarios and edge cases.

 Test-Driven Development (TDD): Adopt TDD methodologies, where tests are written before the code itself.
This ensures that the code developed is always accompanied by tests.

 Code Reviews: Conduct thorough code reviews to identify untested parts of the codebase and ensure new
code is covered by tests.

 Coverage Analysis Tools: Use code coverage analysis tools to measure the current level of test coverage
and identify areas that need more attention.

 Incremental Improvement: Focus on improving test coverage incrementally by prioritizing critical and high-
risk areas of the code first.

156. How do you manage scope change requests during the planned sprint?

Managing scope change requests during a planned sprint can be challenging but crucial to maintaining productivity
and project timelines. Effective management starts with a clear change control process and strong communication.

Here are some steps to manage scope change requests during a sprint:

 Assess the Impact: Review the new requirements to understand their impact on the current sprint and
overall project. Consider the time, resources, and potential disruption to the team’s workflow.

 Prioritize and Evaluate: Determine the urgency and importance of the change. Align with stakeholders to
evaluate whether the change adds significant value or if it can be deferred to future sprints.

 Communicate Transparently: Inform the team about the change request as soon as possible. Transparency
helps in setting realistic expectations and prepares the team for potential adjustments.

 Adjust the Sprint Goal: Re-evaluate the sprint goals and backlog items. If the change is deemed critical and
must be accommodated, reprioritize the existing tasks and adjust the sprint plan accordingly.

 Document the Change: Keep detailed records of what changes were made, why they were necessary, and
how the decisions were reached. This documentation can provide valuable insights for post-sprint reviews
and future planning.

 Seek Team Input: Gather feedback from your team regarding the feasibility and timeline adjustments. Their
input is crucial for making informed decisions.

 Monitor Progress: Track the implementation of the change closely. Ensure that the team stays on course
and that the change is integrated smoothly without compromising quality.

Managing scope change requests effectively requires flexibility, strong processes, and continuous collaboration. By
balancing structure with adaptability, teams can navigate changes without derailing the sprint’s progress and
ensure successful project outcomes.

190
157. How do you do test estimations?

Accurately estimating testing efforts is key for good project planning and smart resource allocation.

Here are some steps to consider when performing test estimations:

 Requirement Analysis: Understand and analyse the project requirements thoroughly. This helps in
identifying the scope and complexity of the testing tasks.

 Identify Testing Activities: Break down the testing process into smaller tasks such as test planning, test case
design, test execution, defect logging, and reporting.

 Use Historical Data: Refer to historical data from similar past projects, using them as a reference point for
your estimations.

 Task Breakdown: Detail each testing activity and assign effort estimates to each. This provides a granular
view and helps in identifying potential roadblocks.

 Include Time Buffers: Factor in time buffers for unexpected delays, such as resource unavailability or
complex bug fixes.

 Expert Judgment: Consult with experienced team members and stakeholders to refine the estimates and
ensure they are realistic.

 Review and Revise: Regularly review the estimations throughout the project lifecycle and make necessary
adjustments based on the progress and any changes to the project scope.

Combining these methodologies facilitates a thorough and precise approach to test estimation, ensuring that the
project remains on schedule and within budget.

158. How would you handle testing without proper documentation?

Handling testing without proper documentation can be challenging, but it is not impossible. The first step is to
gather as much information as possible from various stakeholders, including developers, product owners, and
business analysts, to understand the system’s requirements and functionalities. Engaging in exploratory testing
allows testers to learn more about the system on the fly, uncovering issues and gaining insights into its behaviour.

Creating a mind map or a checklist based on the acquired information can help structure the testing process and
ensure coverage of critical areas. Pair testing, where testers work in pairs, can also be highly effective in such
scenarios, as it combines the knowledge and skills of two individuals, increasing the chances of identifying defects.

Another strategy is to use test design techniques such as boundary value analysis, equivalence partitioning, and
error guessing to cover various test scenarios and edge cases. Additionally, testers should document their findings,
test cases, and any discovered issues, creating a knowledge base that can be used for future reference and by other
testers.

Regular communication and collaboration with the development team are essential to clarify any ambiguities and
ensure that the testing aligns with the system’s intended functionality.

By employing these strategies, testers can effectively perform their tasks even in the absence of comprehensive
documentation, ensuring the system’s quality and reliability.

191
Make sure to document the testing process and results thoroughly so it’s easier for future testing and ensure
everything is traceable. Also, don’t forget to report any issues or risks due to missing documentation to the relevant
stakeholders.

159. How do you start quality assurance on a project?

Before starting the quality assurance (QA) of any project, we need to understand the project requirements and
objectives. Firstly, we need to gather all available documentation, such as requirement specifications, design
documents, and user stories, which lets us understand the system’s intended functionality. We need to set clear
and measurable QA goals, which is crucial. Also, we need to ensure these goals match the project objectives and
stakeholder expectations.

Next, we should develop a QA plan that outlines the scope, strategy, resources, schedule, and deliverables for the
QA activities. We should also select the right tools and technologies for test management, automated testing, and
bug tracking, which are essential to streamlining the QA process.

We should build a skilled QA team with a mix of expertise and assigning roles and responsibilities to ensure that all
aspects of quality assurance are covered. We should create comprehensive test plans and test cases based on the
gathered requirements to ensure all functionalities are verified.

We need to be in touch with developers and all stakeholders throughout the project lifecycle to promote
transparency and address any issues promptly. Regular updates and feedback loops ensure everyone is on the same
page and any potential roadblocks are identified and resolved swiftly.

Early engagement in QA activities, such as participating in requirement reviews and design discussions, can also help
identify potential issues before they become more significant problems later.

By following these steps thoroughly, QA can effectively start the quality assurance process and contribute to
delivering a high-quality and reliable product.

160. Can Quality Assurance Professionals help resolve production issues?

Yes, Quality Assurance (QA) professionals can play a crucial role in resolving production issues. Their expertise in
understanding the system’s functionality, along with their planned approach to testing and problem-solving, equips
them with the tools necessary to debug and troubleshoot production problems effectively. QA professionals can
assist by performing root cause analysis to identify the underlying issues causing the problem. They can replicate
the production environment to reproduce the issue, which helps in understanding its impact and scope.

By working closely with developers, they facilitate a collaborative approach to bug fixing and ensuring that any fixes
introduced do not unintentionally affect other parts of the system. Their involvement also ensures that
comprehensive regression testing is performed before the issue is marked as resolved, thereby maintaining the
overall integrity and stability of the production environment. This proactive involvement not only helps in quick
resolution but also contributes to the implementation of preventative measures to avoid similar issues in the future.

161. How would you handle a situation where a defect is reported in production?

When a defect is reported in production, it’s crucial to address it promptly and systematically to minimize its
impact. The first step is to perform a quick assessment to understand the severity and scope of the issue. If

192
necessary, communicate with stakeholders to inform them of the situation and any potential impacts. Next, gather
all relevant information, including logs, error messages, and user reports, to diagnose the problem accurately.
Reproducing the issue in a controlled environment is essential to identify the root cause without further affecting
the production system.

Once the issue is understood, collaborate closely with the development and QA teams to develop a fix. Implement
the fix in a staging environment first to ensure it resolves the issue without introducing new problems. Conduct
thorough regression testing to verify the fix’s effectiveness and stability. After successful testing, deploy the fix to
the production environment with minimal disruption. Finally, monitor the system post-deployment to ensure the
issue is fully resolved and document the incident to prevent similar future occurrences.

This structured approach helps maintain confidence in the system’s reliability while addressing the production
defect efficiently and effectively.

162. What is Canary Testing and when do you perform it?

Canary Testing is a technique used to release a new software feature or update to a small group of users before
rolling it out to everyone. This helps identify any potential issues or risks in a controlled environment. It is
performed when you want to minimize the impact of possible defects and ensure the update works smoothly for a
broader audience.

163. Can you explain what field testing is and describe a scenario where it would be critically important for a
project’s success?

Field testing involves testing a software application in the actual environment where it will be used, rather than in a
controlled or simulated environment. This type of testing helps identify real-world issues that may not surface
during standard lab-based testing. For example, when developing a mobile application for public transportation
schedules, field testing might include using the app at various transit stops, in areas with poor network coverage, or
under different weather conditions. This approach ensures the app performs reliably and offers a seamless user
experience under real-life conditions, which is critical for high user satisfaction and the overall success of the
project.

Manual Testing Interview Questions and Answers for Experienced & Freshers

193
1. What is Exploratory Testing?

Exploratory testing is a hands-on approach in which testers are involved in minimum planning and maximum test
execution. The planning involves the creation of a test charter, a short declaration of the scope of a short (1 to 2
hour) time-boxed test effort, the objectives and possible approaches to be used. The test design and test execution
activities are performed in parallel typically without formally documenting the test conditions, test cases or test
scripts. This does not mean that other, more formal testing techniques will not be used. For example, the tester
may decide to use boundary value analysis but will think through and test the most important boundary values
without necessarily writing them down. Some notes will be written during the exploratory-testing session so that a
report can be produced afterward.

2. What is “use case testing”?

In order to identify and execute the functional requirement of an application from start to finish “use case” is used
and the techniques used to do this is known as “Use Case Testing.”

3. What is the difference between the STLC (Software Testing Life Cycle) and SDLC (Software Development Life
Cycle)?

SDLC deals with development/coding of the software while STLC deals with validation and verification of the
software

4. What is traceability matrix?

The relationship between test cases and requirements is shown with the help of a document. This document is
known as a traceability matrix.

5. What is Equivalence partitioning testing?

Equivalence partitioning testing is a software testing technique which divides the application input test data into
each partition at least once of equivalent data from which test cases can be derived. By this testing method, it
reduces the time required for software testing.

6. What is white box testing and list the types of white box testing?

White box testing technique involves selection of test cases based on an analysis of the internal structure (Code
coverage, branches coverage, paths coverage, condition coverage, etc.) of a component or system. It is also known
as Code-Based testing or Structural testing. Different types of white box testing are

1. Statement Coverage

194
2. Decision Coverage

7. In white box testing, what do you verify?

In white box testing following steps are verified.

1. Verify the security holes in the code

2. Verify the incomplete or broken paths in the code

3. Verify the flow of structure according to the document specification

4. Verify the expected outputs

5. Verify all conditional loops in the code to check the complete functionality of the application

6. Verify the line by line coding and cover 100% testing

8. What is black box testing? What are the different black box testing techniques?

Black box testing is the software testing method which is used to test the software without knowing the internal
structure of code or program. This testing is usually done to check the functionality of an application. The different
black box testing techniques are

1. Equivalence Partitioning

2. Boundary value analysis

3. Cause-effect graphing

9. What is the difference between static and dynamic testing?

Static testing: During Static testing method, the code is not executed, and it is performed using the software
documentation.

Dynamic testing: To perform this testing the code is required to be in an executable form.

10. What are verification and validation?

Verification is a process of evaluating software at the development phase. It helps you to decide whether the
product of a given application satisfies the specified requirements. Validation is the process of evaluating software
at the after the development process and to check whether it meets the customer requirements.

11. What are the different test levels?

There are four test levels

195
1. Unit/component/program/module testing

2. Integration testing

3. System testing

4. Acceptance testing

12. What is Integration testing?

Integration testing is a level of software testing process, where individual units of an application are combined and
tested. It is usually performed after unit and functional testing.

13. What Test Plans consists of?

Test design, scope, test strategies, approach are various details that Test plan document consists of.

1. Test case identifier

2. Scope

3. Features to be tested

4. Features not to be tested

5. Test strategy & Test approach

6. Test deliverables

7. Responsibilities

8. Staffing and training

9. Risk and Contingencies

14. What is the difference between UAT (User Acceptance Testing) and System testing?

System Testing: System testing is finding defects when the system undergoes testing as a whole; it is also known as
end-to-end testing. In such type of testing, the application suffers from beginning till the end.

UAT: User Acceptance Testing (UAT) involves running a product through a series of specific tests which determines
whether the product will meet the needs of its users.

15. Mention the difference between Data Driven Testing and Retesting?

Retesting: It is a process of checking bugs that are actioned by the development team to verify that they are fixed.

196
Data Driven Testing (DDT): In data driven testing process, the application is tested with multiple test data. The
application is tested with a different set of values.

Advanced Manual Software Testing Interview Questions for 3/5/10 Years Experience

16. What are the valuable steps to resolve issues while testing?

 Record: Log and handle any problems which have happened

 Report: Report the issues to higher level manager

 Control: Define the issue management process

17. What is the difference between test scenarios, test cases, and test script?

Difference between test scenarios and test cases is that

Test Scenarios: A Test Scenario is any functionality that can be tested. It is also called Test Condition or Test
Possibility.

Test Cases: It is a document that contains the steps that have to be executed; it has been planned earlier.

Test Script: It is written in a programming language and it’s a short program used to test part of the functionality of
the software system. In other words a written set of steps that should be performed manually.

18. What is Latent defect?

Latent defect: This defect is an existing defect in the system which does not cause any failure as the exact set of
conditions has never been met

19. What are the two parameters which can be useful to know the quality of test execution?

To know the quality of test execution, we can use two parameters

 Defect reject ratio

 Defect leakage ratio

197
Parameters for quality of test execution

20. What is the function of the software testing tool “phantom”?

Phantom is a freeware and is used for windows GUI automation scripting language. It allows us to take control of
windows and functions automatically. It can simulate any combination of keystrokes and mouse clicks as well as
menus, lists and more.

21. Explain what Test Deliverables is?

Test Deliverables are a set of documents, tools and other components that have to be developed and maintained in
support of testing.

There are different test deliverables at every phase of the software development lifecycle

 Before Testing

 During Testing

 After the Testing

22. What is mutation testing?

Mutation testing is a technique to identify if a set of test data or test case is useful by intentionally introducing
various code changes (bugs) and retesting with original test data/ cases to determine if the bugs are detected.

198
23. What all things you should consider before selecting automation tools for the AUT?

 Technical Feasibility

 Complexity level

 Application stability

 Test data

 Application size

 Re-usability of automated scripts

 Execution across environment

24. How will you conduct Risk Analysis?

For the risk analysis following steps need to be implemented

1. Finding the score of the risk

2. Making a profile for the risk

3. Changing the risk properties

4. Deploy the resources of that test risk

5. Making a database of risk

25. What are the categories of debugging?

Categories for debugging

1. Brute force debugging

2. Backtracking

3. Cause elimination

4. Program Slicing

5. Fault tree analysis

26. What is fault masking explain with example?

When the presence of one defect hides the presence of another defect in the system, it is known as fault masking.

Example: If the “Negative Value” cause a firing of unhandled system exception, the developer will prevent the
negative values input. This will resolve the issue and hide the defect of unhandled exception firing.

199
27. Explain what Test Plan is? What is the information that should be covered in Test Plan?

A test plan can be defined as a document describing the scope, approach, resources, and schedule of testing
activities and a test plan should cover the following details.

 Test Strategy

 Test Objective

 Exit/Suspension Criteria

 Resource Planning

 Test Deliverables

28. How can you eliminate the product risk in your project?

It helps you to eliminate product risk in your project, and there is a simple yet crucial step that can reduce the
product risk in your project.

 Investigate the specification documents

 Have discussions about the project with all stakeholders including the developer

 As a real user walk around the website

29. What is the common risk that leads to project failure?

The common risk that leads to a project failure are

 Not having enough human resource

 Testing Environment may not be set up properly

 Limited Budget

 Time Limitations

30. On what basis you can arrive at an estimation for your project?

To estimate your project, you have to consider the following points

 Divide the whole project into the smallest tasks

 Allocate each task to team members

 Estimate the effort required to complete each task

200
 Validate the estimation

31. Explain how you would allocate a task to team members?

Task Member

Analyze software requirement specification All the members

Create the test specification Tester/Test Analyst

Build up the test environment Test administrator

Execute the test cases Tester, a Test administrator

Report defects Tester

32. Explain what is testing type and what are the commonly used testing type?

To get an expected test outcome, a standard procedure is followed which is referred to as Testing Type.

Commonly used testing types are

 Unit Testing: Test the smallest code of an application

 API Testing: Testing API created for the application

 Integration Testing: Individual software modules are combined and tested

 System Testing: Complete testing of the system

 Install/UnInstall Testing: Testing done from the point of client/customer view

 Agile Testing: Testing through Agile technique

33. While monitoring your project what all things you have to consider?

The things that have to be taken in considerations are

 Is your project on schedule

 Are you over budget

 Are you working towards the same career goal

201
 Have you got enough resources

 Are there any warning signs of impending problems

 Is there any pressure from management to complete the project sooner

34. What are the common mistakes which create issues?

 Matching resources to wrong projects

 Test manager lack of skills

 Not listening to others

 Poor Scheduling

 Underestimating

 Ignoring the small problems

 Not following the process

35. What does a typical test report contain? What are the benefits of test reports?

A test report contains the following things:

 Project Information

 Test Objective

 Test Summary

 Defect

The benefits of test reports are:

 Current status of project and quality of product are informed

 If required, stakeholder and customer can take corrective action

 A final document helps to decide whether the product is ready for release

36. What is test management review and why it is important?

Management review is also referred to as Software Quality Assurance or SQA. SQA focusses more on the software
process rather than the software work products. It is a set of activities designed to make sure that the project
manager follows the standard process. SQA helps test manager to benchmark the project against the set standards.

202
37. What are the best practices for software quality assurance?

The best practices for an effective SQA implementation is

 Continuous Improvement

 Documentation

 Tool Usage

 Metrics

 Responsibility by team members

 Experienced SQA auditors

38. When is RTM (Requirement Traceability Matrix) prepared?

RTM is prepared before test case designing. Requirements should be traceable from review activities.

39. What is the difference between Test matrix and Traceability matrix?

Test Matrix: Test matrix is used to capture actual quality, effort, the plan, resources and time required to capture all
phases of software testing

Traceability Matrix: Mapping between test cases and customer requirements is known as Traceability Matrix

40. In manual testing what are stubs and drivers?

Both stubs and drivers are part of incremental testing. In incremental testing, there are two approaches namely
bottom-up and top-down approach. Drivers are used in bottom-up testing and stub is used for a top-down
approach. In order to test the main module, the stub is used, which is a dummy code or program.

41. What is the step you would follow once you find the defect?

Once a defect is found you would follow the step

a) Recreate the defect

b) Attach the screenshot

c) Log the defect

203
42. Explain what is “Test Plan Driven” or “Key Word Driven” method of testing?

This technique uses the actual test case document developed by testers using a spreadsheet containing special “key
Words”. The key words control the processing.

43. What is the DFD (Data Flow Diagram)?

When a “flow of data” through an information system is graphically represented, then it is known as Data Flow
Diagram. It is also used for the visualization of data processing.

44. Explain what LCSAJ is?

LCSAJ stands for ‘linear code sequence and jump.’ It consists of the following three items

a) Start of the linear sequence of executable statements

b) End of the linear sequence

c) The target line to which control flow is transferred at the end of the linear sequence

45. Explain what N+1 testing is?

The variation of regression testing is represented as N+1. In this technique, the testing is performed in multiple
cycles in which errors found in test cycle ‘N’ are resolved and re-tested in test cycle N+1. The cycle is repeated
unless there are no errors found.

46. What is Fuzz testing and when it is used?

Fuzz testing is used to detect security loopholes and coding errors in software. In this technique, random data is
added to the system in an attempt to crash the system. If vulnerability persists, a tool called fuzz tester is used to
determine potential causes. This technique is more useful for bigger projects but only detects a major fault.

47. Mention what the main advantages of statement coverage metric of software testing are?

The benefit of statement coverage metric is that

a) It does not require processing source code and can be applied directly to object code

b) Bugs are distributed evenly through the code, due to which percentage of executable statements covered reflects
the percentage of faults discovered

204
48. How to generate test cases for “replace a string” method?

a) If characters in new string > characters in the previous string. None of the characters should get truncated

b) If characters in new string< characters in the previous string. Junk characters should not be added

c) Spaces after and before the string should not be deleted

d) String should be replaced only for the first occurrence of the string

49. How will you handle a conflict amongst your team members?

 I will talk individually to each person and note their concerns

 I will find a solution to the common problems raised by team members

 I will hold a team meeting, reveal the solution and ask people to co-operate

50. Mention what are the categories of defects?

Mainly there are three defect categories

 Wrong: When a requirement is implemented incorrectly

 Missing: It is a variance from the specification, an indication that a specification was not implemented or a
requirement of the customer is not met

 Extra: A requirement incorporated into the product that was not given by the end customer. It is considered
as a defect because it is a variance from the existing requirements

51. Explain how does a test coverage tool work?

The code coverage testing tool runs parallel while performing testing on the actual product. The code coverage tool
monitors the executed statements of the source code. When the final testing is done, we get a complete report of
the pending statements and also get the coverage percentage.

52. Mention what the difference between a “defect” and a “failure” in software testing is?

In simple terms when a defect reaches the end customer, it is called a failure while the defect is identified internally
and resolved; then it is referred to as a defect.

205
53. Explain how to test documents in a project that span across the software development lifecycle?

The project span across the software development lifecycle in the following manner

 Central/Project test plan: It is the main test plan that outlines the complete test strategy of the project. This
plan is used till the end of the software development lifecycle

 Acceptance test plan: This document begins during the requirement phase and is completed at the final
delivery

 System test plan: This plan starts during the design plan and proceeds until the end of the project

 Integration and Unit test plan: Both these test plans start during the execution phase and last until the final
delivery

54. Explain which test cases are written first black boxes or white boxes?

Black box test cases are written first as to write black box test cases; it requires project plan and requirement
document all these documents are easily available at the beginning of the project. While writing white box test
cases requires more architectural understanding and is not available at the start of the project.

55. Explain what the difference between latent and masked defects is?

 Latent defect: A latent defect is an existing defect that has not caused a failure because the sets of
conditions were never met

 Masked defect: It is an existing defect that has not caused a failure because another defect has prevented
that part of the code from being executed

56. Mention what bottom-up testing is?

Bottom-up testing is an approach to integration testing, where the lowest level components are tested first, then
used to facilitate the testing of higher level components. The process is repeated until the component at the top of
the hierarchy is tested.

57. Mention what the different types of test coverage techniques are?

Different types of test coverage techniques include

 Statement Coverage: It verifies that each line of source code has been executed and tested

 Decision Coverage: It ensures that every decision in the source code is executed and tested

 Path Coverage: It ensures that every possible route through a given part of the code is executed and tested

206
58. Mention what the meaning of breath testing is?

Breath testing is a test suite that exercises the full functionality of a product but does not test features in detail

59. Explain what the meaning of Code Walk Through is?

Code Walk Through is the informal analysis of the program source code to find defects and verify coding techniques

60. Mention what the basic components of defect report format are?

The essential components of defect report format include

 Project Name

 Module Name

 Defect detected on

 Defect detected by

 Defect ID and Name

 Snapshot of the defect

 Priority and Severity status

 Defect resolved by

 Defect resolved on

61. Mention what the purpose behind doing end-to-end testing is?

End-to-end testing is done after functional testing. The purpose behind doing end-to-end testing is that

 To validate the software requirements and integration with external interfaces

 Testing application in real-world environment scenario

 Testing of interaction between application and database

62. Explain what it means by test harness?

A test harness is configuring a set of tools and test data to test an application in various conditions, and it involves
monitoring the output with expected output for correctness.

207
63. Explain in a testing project what testing activities would you automate?

In testing project testing activities, you would automate are

 Tests that need to be run for every build of the application

 Tests that use multiple data for the same set of actions

 Identical tests that need to be executed using different browsers

 Mission critical pages

 A transaction with pages that do not change in a short time

64. What is the MAIN benefit of designing tests early in the life cycle?

It helps prevent defects from being introduced into the code.

65. What is risk-based testing?

Risk-based Testing is the term used for an approach to creating a Test Strategy that is based on prioritizing tests by
risk. The basis of the approach is a detailed risk analysis and prioritizing of risks by risk level. Tests to address each
risk are then specified, starting with the highest risk first.

66. What is the KEY difference between preventative and reactive approaches to testing?

Preventative tests are designed early; reactive tests are designed after the software has been produced.

67. What is the purpose of exit criteria?

The purpose of exit criteria is to define when a test level is completed.

68. What determines the level of risk?

The likelihood of an adverse event and the impact of the event determine the level of risk.

69. When is used Decision table testing?

208
Decision table testing is used for testing systems for which the specification takes the form of rules or cause-effect
combinations. In a decision table, the inputs are listed in a column, with the outputs in the same column but below
the inputs. The remainder of the table explores combinations of inputs to define the outputs produced.

Learn More About Decision Table Testing Technique in the Video Tutorial here

70. Why we use decision tables?

The techniques of equivalence partitioning and boundary value analysis are often applied to specific situations or
inputs. However, if different combinations of inputs result in different actions being taken, this can be more difficult
to show using equivalence partitioning and boundary value analysis, which tend to be more focused on the user
interface. The other two specification-based techniques, decision tables, and state transition testing are more
focused on business logic or business rules. A decision table is a good way to deal with combinations of things (e.g.,
inputs). This technique is sometimes also referred to as a ’cause-effect’ table. The reason for this is that there is an
associated logic diagramming technique called ’cause-effect graphing’ which was sometimes used to help derive the
decision table

71. What is the MAIN objective when reviewing a software deliverable?

To identify defects in any software work product.

72. Which of the following defines the expected results of a test? Test case specification or test design
specification.

Test case specification defines the expected results of a test.

73. What is the benefit of test independence?

It avoids author bias in defining effective tests.

74. As part of which test process do you determine the exit criteria?

The exit criteria are determined on the bases of ‘Test Planning’.

75. What is Alpha testing?

Pre-release testing by end user representatives at the developer’s site.

209
76. What is beta testing?

Testing performed by potential customers at their own locations.

77. Mention what the difference between Pilot and Beta testing is?

The difference between a pilot and beta testing is that pilot testing is actually done using the product by the group
of users before the final deployment, and in beta testing, we do not input real data, but it is installed at the end
customer to validate if the product can be used in production.

78. Given the following fragment of code, how many tests are required for 100% decision coverage?

if width > length

thenbiggest_dimension = width

if height > width

thenbiggest_dimension = height

end_if

elsebiggest_dimension = length

if height > length

thenbiggest_dimension = height

end_if

end_if

79. You have designed test cases to provide 100% statement and 100% decision coverage for the following
fragment of code. if width > length then biggest_dimension = width else biggest_dimension = length end_if The
following has been added to the bottom of the code fragment above. print “Biggest dimension is ”
&biggest_dimensionprint “Width: ” & width print “Length: ” & length How many more test cases are required?

None, existing test cases can be used.

210
80. What is the difference between Testing Techniques and Testing Tools?

Testing technique: – Is a process for ensuring that some aspects of the application system or unit functions properly
there may be few techniques but many tools.

Testing Tools: – Is a vehicle for performing a test process. The tool is a resource to the tester, but itself is insufficient
to conduct testing

Learn More About Testing Tools here

81. We use the output of the requirement analysis, the requirement specification as the input for writing …

User Acceptance Test Cases

82. Repeated Testing of an already tested program, after modification, to discover any defects introduced or
uncovered as a result of the changes in the software being tested or in another related or unrelated software
component:

Regression Testing

83. A wholesaler sells printer cartridges. The minimum order quantity is 5. There is a 20% discount for orders of
100 or more printer cartridges. You have been asked to prepare test cases using various values for the number of
printer cartridges ordered. Which of the following groups contain three test inputs that would be generated using
Boundary Value Analysis?

4, 5, 99

84. What is component testing?

Component testing, also known as unit, module, and program testing, searches for defects in and verifies the
functioning of software (e.g., modules, programs, objects, classes, etc.) that are separately testable. Component
testing may be done in isolation from the rest of the system depending on the context of the development life cycle
and the system. Most often stubs and drivers are used to replace the missing software and simulate the interface
between the software components simply. A stub is called from the software component to be tested; a driver calls
a component to be tested.

Here is an awesome video on Unit Testing

85. What is functional system testing?

211
Testing the end to end functionality of the system as a whole is defined as a functional system testing.

86. What are the benefits of Independent Testing?

Independent testers are unbiased and identify different defects at the same time.

87. In a REACTIVE approach to testing when would you expect the bulk of the test design work to be begun?

The bulk of the test design work begun after the software or system has been produced.

88. What are the different Methodologies in Agile Development Model?

There are currently seven different agile methodologies that I am aware of:

1. Extreme Programming (XP)

2. Scrum

3. Lean Software Development

4. Feature-Driven Development

5. Agile Unified Process

6. Crystal

7. Dynamic Systems Development Model (DSDM)

89. Which activity in the fundamental test process includes evaluation of the testability of the requirements and
system?

A ‘Test Analysis’ and ‘Design’ includes evaluation of the testability of the requirements and system.

90. What is typically the MOST important reason to use risk to drive testing efforts?

Because testing everything is not feasible.

91. What is random/monkey testing? When is it used?

Random testing is often known as monkey testing. In such type of testing data is generated randomly often using a
tool or automated mechanism. With this randomly generated input, the system is tested, and results are analyzed

212
accordingly. These testing are less reliable; hence it is normally used by the beginners and to see whether the
system will hold up under adverse effects.

92. Which of the following are valid objectives for incident reports?

1. Provide developers and other parties with feedback about the problem to enable identification, isolation,
and correction as necessary.

2. Provide ideas for test process improvement.

3. Provide a vehicle for assessing tester competence.

4. Provide testers with a means of tracking the quality of the system under test.

93. Consider the following techniques. Which are static and which are dynamic techniques?

1. Equivalence Partitioning.

2. Use Case Testing.

3. Data Flow Analysis.

4. Exploratory Testing.

5. Decision Testing.

6. Inspections.

Data Flow Analysis and Inspections are static; Equivalence Partitioning, Use Case Testing, Exploratory Testing and
Decision Testing are dynamic.

94. Why are static testing and dynamic testing described as complementary?

Because they share the aim of identifying defects but differ in the types of defect they find.

95. What are the phases of a formal review?

In contrast to informal reviews, formal reviews follow a formal process. A typical formal review process consists of
six main steps:

1. Planning

2. Kick-off

3. Preparation

4. Review meeting

213
5. Rework

6. Follow-up.

96. What is the role of moderator in the review process?

The moderator (or review leader) leads the review process. He or she determines, in co-operation with the author,
the type of review, approach and the composition of the review team. The moderator performs the entry check and
the follow-up on the rework, in order to control the quality of the input and output of the review process. The
moderator also schedules the meeting, disseminates documents before the meeting, coaches other team members,
paces the meeting, leads possible discussions and stores the data that is collected.

Learn More about Review process in Video Tutorial here

97. What is an equivalence partition (also known as an equivalence class)?

An input or output ranges of values such that only one value in the range becomes a test case.

98. When should configuration management procedures be implemented?

During test planning.

99. A Type of Functional Testing, which investigates the functions relating to the detection of threats, such as
virus from malicious outsiders?

Security Testing

100. Testing wherein we subject the target of the test, to varying workloads to measure and evaluate the
performance behaviors and the ability of the target and the test to continue to function properly under these
different workloads?

Load Testing

101. Testing activity which is performed to expose defects in the interfaces and in the interaction between
integrated components is?

Integration Level Testing

214
102. What are the Structure-based (white-box) testing techniques?

Structure-based testing techniques (which are also dynamic rather than static) use the internal structure of the
software to derive test cases. They are commonly called ‘white-box’ or ‘glass-box’ techniques (implying you can see
into the system) since they require knowledge of how the software is implemented, that is, how it works. For
example, a structural technique may be concerned with exercising loops in the software. Different test cases may be
derived to exercise the loop once, twice, and many times. This may be done regardless of the functionality of the
software.

103. When should “Regression Testing” be performed?

After the software has changed or when the environment has changed Regression testing should be performed.

104. What is negative and positive testing?

A negative test is when you put in an invalid input and receives errors. While positive testing is when you put in a
valid input and expect some action to be completed in accordance with the specification.

105. What is the purpose of a test completion criterion?

The purpose of test completion criterion is to determine when to stop testing

106. What can static analysis NOT find?

For example memory leaks.

107. What is the difference between re-testing and regression testing?

Re-testing ensures the original fault has been removed; regression testing looks for unexpected side effects.

108. What are the Experience-based testing techniques?

In experience-based techniques, people’s knowledge, skills, and background are a prime contributor to the test
conditions and test cases. The experience of both technical and business people is important, as they bring different
perspectives to the test analysis and design process. Due to previous experience with similar systems, they may
have insights into what could go wrong, which is very useful for testing.

215
109. What type of review requires formal entry and exit criteria, including metrics?

Inspection

110. Could reviews or inspections be considered part of testing?

Yes, because both help detects faults and improves quality.

111. An input field takes the year of birth between 1900 and 2004 what the boundary values for testing this field
are?

1899,1900,2004,2005

112. Which of the following tools would be involved in the automation of regression test? a. Data tester b.
Boundary tester c. Capture/Playback d. Output comparator.

d. Output comparator

113. To test a function, what has to write a programmer, which calls the function to be tested and pass test data.

Driver

114. What is the one Key reason why developers have difficulty testing their own work?

Lack of Objectivity

115. “How much testing is enough?”

The answer depends on the risk for your industry, contract and special requirements.

116. When should testing be stopped?

It depends on the risks for the system being tested. There are some criteria based on which you can stop testing.

1. Deadlines (Testing, Release)

2. Test budget has been depleted

3. Bug rate fall below a certain level

216
4. Test cases completed with certain percentage passed

5. Alpha or beta periods for testing ends

6. Coverage of code, functionality or requirements are met to a specified point

117. Which of the following is the primary purpose of the integration strategy for integration testing in the small?

The primary purpose of the integration strategy is to specify which modules to combine when and how many at
once.

118. What are semi-random test cases?

Semi-random test cases are nothing, but when we perform random test cases and do equivalence partitioning to
those test cases, it removes redundant test cases, thus giving us semi-random test cases.

119. Given the following code, which statement is true about the minimum number of test cases required for full
statement and branch coverage?

Read p

Read q

IF p+q> 100

THEN Print “Large”

ENDIF

IF p > 50

THEN Print “p Large”

ENDIF

1 test for statement coverage, 2 for branch coverage

120. Which review is normally used to evaluate a product to determine its suitability for the intended use and to
identify discrepancies?

Technical Review.

217
121. Faults found should be originally documented by whom?

By testers.

122. Which is the current formal world-wide recognized documentation standard?

There isn’t one.

123. Which of the following is the review participant who has created the item to be reviewed?

Author

124. A number of critical bugs are fixed in software. All the bugs are in one module, related to reports. The test
manager decides to do regression testing only on the reports module.

Regression testing should be done on other modules as well because fixing one module may affect other modules.

125. Why does the boundary value analysis provide good test cases?

Because errors are frequently made during programming of the different cases near the ‘edges’ of the range of
values.

126. What makes an inspection different from other review types?

It is led by a trained leader, uses formal entry and exit criteria and checklists.

127. Why can be tester dependent on configuration management?

Because configuration management assures that we know the exact version of the testware and the test object.

128. What is V-Model?

A software development model that illustrates how testing activities integrate with software development phases

129. What is maintenance testing?

218
Triggered by modifications, migration or retirement of existing software

130. What is test coverage?

Test coverage measures in some specific way the amount of testing performed by a set of tests (derived in some
other way, e.g., using specification-based techniques). Wherever we can count things and can tell whether or not
each of those things has been tested by some test, then we can measure coverage.

131. Why is incremental integration preferred over “big bang” integration?

Because incremental integration has better early defects screening and isolation ability

132. What is called the process starting with the terminal modules?

Bottom-up integration

133. During which test activity could fault be found most cost-effectively?

During test planning

134. The purpose of the requirement phase is

To freeze requirements, to understand user needs, to define the scope of testing

135. Why we split testing into distinct stages?

We split testing into distinct stages because of the following reasons,

1. Each test stage has a different purpose

2. It is easier to manage to test in stages

3. We can run different test into different environments

4. Performance and quality of the testing is improved using phased testing

136. What is DRE?

219
In order to measure test effectiveness, a powerful metric is used to measure test effectiveness known as DRE
(Defect Removal Efficiency) From this metric we would know how many bugs we have found from the set of test
cases. The formula for calculating DRE is

DRE=Number of bugs while a testing/number of bugs while testing + number of bugs found by a user

137. Which of the following is likely to benefit most from the use of test tools providing test capture and replay
facilities? a) Regression testing b) Integration testing c) System testing d) User acceptance testing

Regression testing

138. How would you estimate the amount of re-testing likely to be required?

Metrics from previous similar projects and discussions with the development team

139. What studies data flow analysis?

The use of data on paths through the code.

140. What is failure?

Failure is a departure from specified behavior.

141. What are Test comparators?

Is it really a test if you put some inputs into some software, but never look to see whether the software produces
the correct result? The essence of testing is to check whether the software produces the correct result and to do
that, and we must compare what the software produces to what it should produce. A test comparator helps to
automate aspects of that comparison.

142. Who is responsible for document all the issues, problems and open point that were identified during the
review meeting

Scribe

143. What is the main purpose of Informal review

220
An inexpensive way to get some benefit

144. What is the purpose of test design technique?

Identifying test conditions and Identifying test cases

145. When testing a grade calculation system, a tester determines that all scores from 90 to 100 will yield a grade
of A, but scores below 90 will not. This analysis is known as:

Equivalence partitioning

146. A test manager wants to use the resources available for the automated testing of a web application. The
best choice is

Tester, test automater, web specialist, DBA

147. During the testing of a module tester, ‘X’ found a bug and assigned it to a developer. But developer rejects
the same, saying that it’s not a bug. What ‘X’ should do?

Send the detailed information of the bug encountered and check the reproducibility

148. A type of integration testing in which software elements, hardware elements, or both are combined all at
once into a component or an overall system, rather than in stages.

Big-Bang Testing

149. In practice, which Life Cycle model may have more, fewer or different levels of development and testing,
depending on the project and the software product. For example, there may be component integration testing
after component testing, and system integration testing after system testing.

V-Model

150. Which technique can be used to achieve input and output coverage? It can be applied to human input, input
via interfaces to a system, or interface parameters in integration testing.

Equivalence partitioning

221
151. “This life cycle model is driven by schedule and budget risks” This statement is best suited for.

V-Model

152. In which order should tests be run?

The most important one must be tested first

153. The later in the development life cycle a fault is discovered, the more expensive it is to fix. Why?

The fault has been built into more documentation, code, tests, etc

154. What is Coverage measurement?

It is a partial measure of test thoroughness.

155. What is Boundary value testing?

Test boundary conditions on, below and above the edges of input and output equivalence classes. For instance, let
say a bank application where you can withdraw maximum Rs.20,000 and a minimum of Rs.100, so in boundary value
testing we test only the exact boundaries, rather than hitting in the middle. That means we test above the
maximum limit and below the minimum limit.

156. What does COTS represent?

Commercial Off The Shelf.

157. The purpose of which is to allow specific tests to be carried out on a system or network that resembles as
closely as possible the environment where the item under test will be used upon release?

Test Environment

158. What can be thought of as being based on the project plan, but with greater amounts of detail?

Phase Test Plan

222
159. What is Rapid Application Development?

Rapid Application Development (RAD) is formally a parallel development of functions and subsequent integration.
Components/functions are developed in parallel as if they were mini projects, the developments are time-boxed,
delivered, and then assembled into a working prototype. This can very quickly give the customer something to see
and use and to provide feedback regarding the delivery and their requirements. Rapid change and development of
the product are possible using this methodology. However the product specification will need to be developed for
the product at some point, and the project will need to be placed under more formal controls before going into
production.

223

You might also like