ST Notes
ST Notes
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.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.
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.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.
6
Restart Firefox
Navigate to -> tools option here we can find IDE
7
2.7 Recording
Let is create a web page which has the following elements in it.
8
This is the required web page. The HTML code should be as follows.
<html>
<head>
<title>Welcome to html</title>
</head>
<body>
<table >
<tr>
9
</tr>
</table>
<table >
<tr>
</tr>
</table>
<table >
<tr>
<td><img src="mobile.jpg"/></td>
</tr>
<tr>
<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>
<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>
</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.
Mandatory Additional
Sl.no Element HTML Tag Property Value property Value
1 Text box input type text 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.
1. ID.
2. Name.
3. Link text.
4. CSS Selectors.
5. XPath.
6. Partial Link text.
7. Class name
8. Tag name.
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.
On Mozilla firefox we generally do not use the default inspector, we use and add-on called 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.
12
HTML source:
<input type=”submit” value=”login”/>
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.
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
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()
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
To identify dynamic elements using Xpath we can take the help of dependent and independent concepts.
Independent elements generally will be unique elements based on which all the action are performed.
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.
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.
17
5. WebDriver
Web driver is an automation tool which can be used to automate web applications .
Installation of webdriver:
To import
18
The browser opened by the webdriver is a light-weighted browser and it does not hold any history and add-ons.
http://code.google.com/p/selenium/downloas/list
selenium –server-standalone-2.35.0.jar
Create a folder in the hard disk, launch eclipse and set the folder as works space.
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.
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;
19
To launch application the code is
package Basics;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
To identify the element webdriver provide a method called findelement() which takes an argument of By
class which has eight element locators.
WebElement un=driver.findElement(By.id("username"));
un.sendKeys("admin");
OR
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().
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();
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.
21
System.out.println(chkBoxStatus2);
Output:
false
true
false
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.
Output:
false
true
true
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.
Multi select:
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).
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.
driver.get("http://demo.actitime.com");
String attValue=driver.findElement(By.id("username")).getAttribute("class");
System.out.println(attValue);
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();
}
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
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
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
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
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.
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
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();
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
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.
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.
Case 2:
By default the value for browser.download.folderList will be 1 which represents download folder.
Case 3:
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.
Note: Don’t forget to set the preference in Firefox class which is done in common for each case.
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.
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.
The right click menu is called context menu. We can use the Actions class ContextClick() to perform
right click.
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...
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();
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.
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();
System.setProperty("webdriver.ie.driver", "D:\\Seleniumprogs\\workspace\\Batch18web\\
IEDriverServer.exe");
WebDriver driver=new InternetExplorerDriver();
Requirements.
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
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();");
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();
Driver.switchTo().parentFrame();
Right click on the element in Firefox in the context menu, if it shows This frame which means the
element is inside the frame.
Excel Library:
Requirements:
Apache poi
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.
poi-3.9-20121203.jar
poi-ooxml-3.9-20121203.jar
poi-ooxml-schemas-3.9-20121203.jar
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;
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;
} 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;
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;
@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
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");
}
}
@Test(enabled=false)
public void testEditCustomer() {
System.out.println("Executing Edit 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
If we set a test method to depend on another test method and if the assertion fails the dependant
test method will be skipped.
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.
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;
43
System.out.println("Quit Browser");
}
}
CreateCustomers.java
package com.mindq.actitime.tasks;
import org.testng.annotations.Test;
DeleteCustomers.java
package com.mindq.actitime.tasks;
import org.testng.annotations.Test;
CreateReport.Java
package com.mindq.actitime.reports;
import org.testng.annotations.Test;
DeleteReport.java
package com.mindq.actitime.reports;
import org.testng.annotations.Test;
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.
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".
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.
46
INTERVIEW QUESTIONS:
A.Selenium
Code can be made in any one language such as Java, C#, Ruby, Python, Pearl, php etc.
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
QTP:
Works on Windows
GUI Spy
Around 1.5GB
From HP
Works on Windows
47
Test’s web and desktop applications
GUI Spy
Around 1.5GB
From HP
3)How many element locators are there in selenium and what are they?
1. Id
2. Name
3. Link Text
4. Css selector
5. Xpath
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.
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.
i)Text()
ii)Contains()
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?
9)Can you name some of the methods under web driver or browser Driver?
findElement()
get()
close()
quit()
gettext()
getTitle()
getWindowHandles()
getCurrentUrl()
By Using Title, Text, URL and Element Check points on the Page.
Comparing the expected title with the actual title from the application. To get the actual title we can use
driver.getTitle().
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().
By Using driver.getCurrentURL().
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.
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.
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.
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().
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
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 ().
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
1. Implicitly Wait.
2. Explicitly Wait.
3. Fluent Wait.
Impicit Wait:
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.
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)
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.
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 ().
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.
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.
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.
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
driver.switchto().frame().
driver.switchto().defaultContent().
driver.switchto().parentframe().
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.
File src=((TakesScreenShot)driver).getScreenShotAS(output.FILE);
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();
53
i)@Test ii)@BeforeMethod
iii)@AfterMethod
iv)@BeforeClass
v)@AfterClass
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().
Does that ignore is to deliberately pay no attention to while skip is to move by hopping on alternate feet.
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.
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.
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']
Making entire xpath with object put it on a normal brace it will become object
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']
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')]
//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]
//input[@type='checkbox']
Identify the dependent and independent element, dependent element is the final target element.
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
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
html/body/table[4]/tbody/tr/td[1]
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
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.
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
Dynamic Techniques:
Structural Techniques
61
Statement Coverage Testing
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.
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.
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.
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.
Project introduction
understanding functional requirement
creating test scenarios
creating test cases
Test execution
Bug reporting and tracking
64
Test sign off.
===================
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:
=====================
Programming Software's:
======================
Application Software:
======================
65
ex: web applications => Google,chrome
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.
=> The objective of testing is to release Quality product to the end User or client.
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.
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.
66
=> Ensure that software is bug free.
=> Ensure that software meets customer requirements and the software specifications.
------------------------------------------------------------------------------------------------------------------------------
Class 2
============
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:
=> A company manufacturing smart phones implements quality control to ensure each phone functions correctly
before reaching customers.
1] Functional testing.
2] performance testing.
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.
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.
ex: While testing, the tester found that entering a specific special character
Error:
==========
We cant compile or run the program due to coding mistake in the program. then it is called as an error.
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?
------------------------------------------------------------------------------------------------------------------------------
Class3
=======
=========================
1] Understanding Requirements:
requirements.
2] Test planning:
4] Test Execution:
5] Defect reporting:
69
Identify the logs, prioritize the bug in defect tracking tool.[Jira]
6] Documentation:
7] collaboration:
8] Exploratory testing:
perform Exploratory testing to uncover edge cases and unexpected behaviours not
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:
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.
Enough testing is achieved when the quality is acceptable with in the time frame.
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.
Manual Testing:
==================
71
Reusability => Test cases need to be manually repeated for every test cycle.
Skills Required => Relatively very simple, doesn't require any programming language.
Automation Testing:
=======================
Execution => Test scripts are written and executed by automation tools.
Reusability => Test scripts can be reused across multiple test cycles.
Skills Required => Requires any programming language and familiarity with the tools.
============================
1] Based on functionality:
Functional Testing:
Non-functional Testing:
72
Focus on the performance, usability and reliability.
1] Manual Testing.
2] Automation Testing.
73
6] Based on the software changes:
Manual Testing:
========
2] short time projects where automation setup is not required and cost-effective.
Automation Testing:
===================
----------------------------------------------------------------------------------------------------------
SDLC:
=============
=> SDLC is a process used by the software industry to design, develop, and test software's.
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:
===============
plan, budget.
2] Requirement analysis:
SRS => software requirement specification => client side will prepare by taking the
3] Design: Figma
=> High level design: Defines modules, data flow, and integration points.
=> Low level design: focuses on the detailed designs for each module.
4] Development:
5] Testing:
75
functional testing
non-functional testing
6] Deployment:
7] Maintenance:
=========================
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.
-------------------------------------------------------------------------------------------------------------
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.
=======================
1] Requirement analysis:
In this phase, all possible requirements of the system are collected from the stakeholders and analyzed.
2] System design:
This phase defines the hardware and software requirements, system workflow, and overall system behaviour.
3] Implementation [Coding]:
The system design is implemented in this phase by writing the actual code.
The developed components are integrated and rigorously tested to identify the bugs and verifies the system
Types of testing performed: unit testing, integration testing, system testing, UAT [Acceptance testing].
5] Deployment:
77
Users are going to use the system, and any deployment issues are solved.
6] Maintenance:
The waterfall model is required in software testing for its structured, sequential approach, which brings several
advantages and easy to understand.
3] Banking systems.
4] contract-based development.
The hospital approaches a software company with clear requirements for an application to manage
A system architect designs the application layout, database schema, and various functionalities.
Stage 4: Testing:
78
Testers validate each module against the requirements.
Stage 5: Deployment
Stage 6: Maintenance:
After deployment, the development team provides ongoing support to fix bugs or handle issues with
database or UI improvements.
==========================================
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].
==========================================
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".
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:
===========
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.
Advantages:
============
81
4] less cost to change the requirements.
Disadvantages:
==================
2] Incremental approach
3] changing requirements.
4] Frequent feedback.
example:
=============
82
perform integration testing for fund transfer and statements modules.
83
84
Spiral Model:
===================
=> spiral model is also is a Risk-driven software development process model. It is a combination of both waterfall
and Iterative model.
Phases:
========
1] Planning
2] Risk analysis.
4] Evaluation.
Planning => It includes the cost, It also involves the understanding the system
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:
=================
85
Disadvantages:
===============
Example
===============
Risk analysis: Risks like weak password implementation and data breaches are analyzed.
86
V Model:
================
the v-model is a type of SDLC model where process executes in a sequential manner in V-shape.
=> It is based in the application of a testing phase for each corresponding development stage.
=> 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.
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:
===============
what is validation?
the process of evaluating the final product to check if it meets the business needs and requirements.
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.
verification:
validation:
88
3] After the software was developed or feature is implemented.
Phases of V-model:
======================
1] Requirement analysis
Advantages:
================
1] This is highly disciplined model and phases are completed at one time.
Disadvantages:
================
Example:
===========
Activities => The business analyst gathers the requirements for core functionalities like
89
Acceptance testing => verify that users can transfer funds successfully with valid inputs.
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.
Activities => Detail the design of individual modules[ex: logic for user login].
Testers execute the test cases to verify the functionality of individual modules.
==================================
=======================
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.
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:
==================
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.
91
if(accountForm = null || AccNo =null){
if(amount <=0){
DeductfromAccount(accountFrom, amount);
addToAccount(AccNo, amount);
return true;
=============================
understand the code Logic: Read through the code to understand its functionality.
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 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.
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:
=============
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.
example:
=============
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.
===============
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.
===============
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:
==================
4] Detailed testing => helps to testers to understand how the system works internally.
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.
example:
95
================
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.
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.
====================
===============================
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:
BVA is applied when inputs are numeric or sequential in nature. such as Forms with range validations [Ex: salary,
scores].
Types Of BVA:
==================
ex: For a form with age [18-60] and salary [10,000 to 1,00,000].
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] 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.
where to use?
============
Types of ECP:
===============
valid input partition: Tests with in the range of acceptable inputs => Ex: the length of the phone number [0 to 9].
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 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.
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
ex: Login system : User enters a valid username, and the system transitions to
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
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.
===================================
=============================
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
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 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.
=====================================
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
======================================
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.
example:
================
101
Scenario: online shopping cart discount rules
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].
=======================
e-commerce Applications
payment gateway:
ex: Transaction approval based on payment method, amount, and user authentication.
List all the possible inputs or conditions that influence the outcome.
102
Create the table:
List all possible combinations of inputs as rows and their corresponding outputs.
create the test case for each unique combination to ensure all scenarios should be cleared.
Scenario: A system requires all the following conditions for a successful login.
Actions:
Home work
=================
bases on above conditions we have to write the all the possible test cases for Deny access.
======================
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.
==========================
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:
============================
1] requirement analysis
write detailed use cases including Action, preconditions, main flow and expected flow.
develop the test cases for each flow of the use case.
104
negative testing: verify invalid or unexpected conditions.
example:
=============
actor: End-user.
precondition: user must have valid credentials, and the login page must be accessible.
Basic flow:
Alternative flow:
exception flow:
step 1: when user open the login page but it is not loading.
Positive test case: Enter the valid credentials => verify the user to login successfully.
105
Negative test case: Enter invalid credentials => 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 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.
=====================
106
Advantages:
===========
3] simplified debugging.
web applications
mobile applications.
e-commerce websites.
Banking systems.
Example:
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.
expected output:
Subtotal: 1000.
107
Validation:
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
=> 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.
====================
Database integration.
web applications.
======================
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.
==================
Test planning: create a system test strategy, define the objectives, and list of the resources needed.
Test case design: write the test cases for different scenarios.
test closure: ensure the system is ready for UAT [User acceptance testing].
Example:
==========
109
Scenario: Testing an online e-commerce application.
1] Functional testing:
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.
3] execution phase.
4] validation phase.
5] closure phase.
================
1] Requirement analysis.
110
2] Environment setup.
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.
when to use?
111
========================
Advantages:
=================
Saves time => prevents testers from wasting time in unstable build.
Disadvantages:
===============
===========
Scenario: A new version of a banking app is delivered for testing. smoke testing ensures the basic features work.
Tests performed:
balance check: navigate the account section and verify account balance is displayed or not.
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.
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:
======
Advantages:
==============
Disadvantages:
====================
Misses unrelated issues => Does not test the application holistically.
113
Relies on Testers expertise => Required skill testers to identify impacted areas.
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.
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.
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:
===================
Automation complexity: Requires significant effort to setup and maintain automation framework.
Example:
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.
execute the test cases for the critical paths like user registration, adding products to the cart and checkout.
Steps:
115
========
execute test cases systematically and log effects if any issues are found.
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:
===================
Advantages:
=============
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.
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.
steps to execute:
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.
Interface Testing is performed during the integration testing phase, where two different components are
integrated.
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.
6] document results.
two or more software's components interact such as, e-commerce application, banking applications, CRM
platforms.
example:
============
System overview:
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:
==================
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?
example:
==============
objective: to manually test the functionality, usability of the application before sending to beta testing.
Test data:
119
User credentials: [email protected] / Password123
payment method: Dummy credit cards [ex: 4111 1111 2222 3333].
steps:
======
expected result:
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.
120
Features of beta testing:
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.
beta tested is conducted at the final stage of the software development life cycle.
example:
===========
A food delivery company is launching a new app that allows users to browse restaurants, place orders, and track
deliveries.
Steps:
=======
testers use the app in real world environment and report their experiences.
121
Task 2 : place an order.
Alpha testing:
=> Alpha testing performed by testers who are usually internal employees of the organization.
Beta testing:
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.
=========================
the purpose of doing the monkey testing is to find the bugs and errors in the software application using
experimental techniques.
========================
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.
=====================
Monkey test tool: Automated random testing tools for mobile and web pages.
example:
A tester opens the app and starts performing completely random actions without following the defined testcases
for instance, the tester: logs with random credentials.
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:
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:
the tester ensures that each combination behaves as expected: ex: login successful, invalid login message, etc...].
Ad-Hoc Testing:
=============
=> 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.
=======================
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.
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:
3] Test freely.
4] verify fixes.
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
=> The performance testing is to identify an eliminate the performance in the software application.
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.
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:
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.
==========================
=> 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,
======================
=============================
1] Requirements gathering:
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].
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
steps:
analyze data to ensure response times within acceptable limits[ex: <5 Seconds].
Expected outcome:
================
response time should remain under <5 seconds for all users.
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.
Manual testers: For smaller scale systems or in the absence of automated tools, manual testers simulate stress
scenarios.3
129
when to perform stress Testing:
During the final stage of testing: to ensure the system is ready for deployment.
Define the scenarios such as sudden increase in concurrent users, data overload, or extreme inputs.
Manually simulate multiple users by opening numerous sessions, or submitting bulk data.
Observe the system behaviour, such as responsive time, error messages, and server stability.
Example:
Scenario: e-commerce website is preparing for a flash sale where traffic is expected to spike significantly.
Steps:
Observations:
monitor responsive times, page load error, and date base behaviour.
130
outcome:
If the site crashes at 12,000 users, developers can optimize server resources database queries to handle expected
workload.
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.
=> the primary objective of performing endurance testing is to conform that application is efficient enough to
handle increased load without response time failure.
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.
identify the critical operations that the system must sustain over time such as user logins, transactions.
131
prepare test environment: production.
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:
observations:
verify the video streaming quality and system responsiveness remains consistent.
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.
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.
=> Create test scenarios => define incremental load increases [10%, 50%].
=> Use load testing tools => Load Runner, Apache JMeters, Gatling.
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 help in detecting the every possible security risk in the system.
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
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 :
=> 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.
Example:
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:
===========================
Software Testing life cycle is a sequence of specific activities conducted during the testing process to ensure
software quality goals are met.
=> It consists of series of activities carried out methodologically to help in verifying the software product.
135
Phases:
Requirement analysis
Test planning
Environment setup
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.
Deliverables:
RTM is a tool or document that ensures project requirements are linked with stakeholders and
=> The main purpose of this RTM is to verify that all requirements of clients are covered in
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:
136
=> Effort estimation documentation.
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 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:
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
=> if bugs are reported then it can be reverted back to the development team for correction and
137
Deliverables:
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
Deliverables:
Requirement analysis:
Requirements => Verify the login functionality, product search, and checkout process.
Test planning => Functional Testing of the login, product search, and checkout modules.
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
Test closure :
Test summary report : 25 test cases executed, 3 defects identified and resolved.
=====================================
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.
New:
when a new defect is logged and posted for the first. It is assigned as a status "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:
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.
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".
Priority :
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
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.
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.
================================
1] Requirement gathering
141
In this stage the project team identifies and documents the needs and expectations of
2] design:
3] development:
4] Testing:
Functional testing:
Non-functional testing:
5] deployment:
6] review:
Addressing and resolving any issue that may arise after deployment.
Core principles:
==================
142
Agile principles:
=> we can develop and test and release piece of software to the customer with a few no
of features.
there will good communication between customer, business analyst, developers and testers.
Agile Tools:
Scrum:
Scrum is a popular framework that is used to whenever we want to develop complex products.
=> 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 Roles:
1] Product Owner
2] Scrum master:
3] Development Team:
Scrum Events:
==================
1] Sprint planning:
144
3] Sprint Review:
4] Sprint Retrospective:
5] sprint
Scrum workflow:
=============
Product backlog creation => List all the features and requirements.
sprint planning => select items from the product backlog for the sprint.
===================
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.
=> 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.
UI test case.
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.
=====================
7] identify Gaps:
Looking for the missed test scenarios are edge cases that are not covered.
147
Eliminate the duplicate test cases.
Test Scenarios:
Test cases:
=> written in structured format, including test steps, test data, expected results etc...
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.
148
Walkthroughs:
A Walkthrough is a semi-formal review process where the author of a document or code presents it to a
Technical Reviews:
A Technical Review is a structured and formal process conducted by the technical experts to evaluate the
Inspection :
Inspection is formal review process involving a detailed and systematic execution of a document or code to
detect defects.
Dynamic Techniques:
Statement Coverage Testing ensures that each executable statement[test case] in the code is executed at
least once.
procedure :
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 ensures that each possible branch[true/ false]. of every decision point in the code
procedure :
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
Path Coverage Testing ensures that all possible paths in the executed. this technique focusing on covering
procedure :
Loop Coverage Testing ensures that loops in the code are executed in different scenarios:
Zero iterations.
single iteration
multiple iterations.
maximum iteration.
procedure:
150
Interview Questions:
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.
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
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:
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:
---
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.
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
---
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:
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:
________________________________________
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.
---
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:
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.
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:
Advanced Questions:
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:
Advanced Questions:
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.
Write test steps in a simple way that anyone can follow them easily
158
Make the test cases reusable
Provide a test case description, test data, expected result, precondition, postcondition.
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.
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.
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.
Some of the popular configuration management tools are Ansible, Chef, Puppet, Terraform, Saltstack, etc.
Modification request (MR) in software development is used by clients to change the existing functionality of a
software.
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.
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.
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.
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.,
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
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.
1. Statement Coverage
2. Decision Coverage
3. Condition Coverage
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.
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.
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.
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.
2. References
3. Introduction
6. Features to be tested
8. Approach
15. Responsibility
162
16. Schedule
18. Approvals
19. Glossaries
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.
Test Scenario gives the idea of what we have to test. Test Scenario is like a high-level 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.
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.
An environment configured for testing. Test bed consists of hardware, software, network configuration, an
application under test, other related software.
Test Environment is the combination of hardware and software on which Test Team performs testing.
Example:
OS: Windows
163
Client Side Validation: JavaScript
Browser: IE/FireFox/Chrome
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.
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.
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 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).
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.
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.
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.
1. Test Strategy
2. Test Plan
4. Test Scenarios
5. Test Cases/Scripts
6. Test Data
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
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
Debugging is the act of finding and solving errors in a computer program that stops it from running properly.
Backtracking
Cause elimination
Program slicing
Poor Scheduling
Underestimating
166
Not following the exact process
2. Integration Testing
3. System Testing
4. Acceptance 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.
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.
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
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.
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.
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?
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
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.
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.
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.
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.
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
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
It can be performed either manual or automated way It can be performed efficiently if automated
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.
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.,
All the above three inputs act as good inputs to prepare the acceptance test plan.
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.
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.
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.
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.
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.
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
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.
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.
3. Defect Fixing
172
Read a detailed guide on Regression 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.
Graphical User Interface Testing is to test the interface between the application and the end user.
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.
Globalization is a process of designing a software application so that it can be adapted to various languages and
regions without any changes.
Localization is a process of adapting globalization software for a specific region or language by adding local specific
components.
It is to check whether the application is successfully installed and it is working as expected after installation.
It is a process where the testers test the application by having pre-planned procedures and proper documentation.
Identify the modules or functionalities which are most likely cause failures and then testing those functionalities.
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.
Perform abnormal action on the application deliberately in order to verify the stability of the application. Check our
in-depth guide on Monkey 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.
Security testing is a process to determine whether the system protects data and maintains functionality as
intended.
Running a system at high load for a prolonged period of time to identify the performance problems is called Soak
Testing.
Endurance testing is a non-functional testing type. It is also known as Soak Testing. Refer Soak 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.
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.
174
It is to verify the behavior of the system once the load increases more than its design expectations.
Scalability testing is a type of non-functional testing. It is to determine how the application under test scales with
increasing workload.
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.
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.
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.
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.
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
Interface testing is performed to evaluate whether two intended modules pass data and communicate correctly to
one another.
Perform testing on the application continuously for long period of time in order to verify the stability of the
application
Bucket testing is a method to compare two versions of an application against each other to determine which one
performs better.
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
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.
Testing all the functionalities using all valid and invalid inputs and preconditions is known as Exhaustive testing.
Defects detected in early phases of SDLC are less expensive to fix. So conducting early testing reduces the cost of
fixing defects.
Defect clustering in software testing means that a small module or functionality contains most of the bugs or it has
the most operational failures.
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.
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
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
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
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.
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.
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.
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.
If testers find any mismatch in the application/system in testing phase then they call it as Bug. Click here for more
details.
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.
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.
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.
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.
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
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.
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.
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.
New
Assigned
Open
Test
Verified
Fixed
Closed
Retested
181
Reopen
Duplicate
Deferred
Rejected
Cannot be fixed
Not reproducible
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.
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.
Defect age can be defined as the time interval between date of defect detection and date of defect closure.
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.
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.)
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.
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.
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.
A bugfix is a build aimed at resolving a bug which is detected by the testers in the testing cycle.
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.
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
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.
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.
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.
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.
The prerequisites that must be achieved before commencing the testing process. Click here for more details.
The conditions that must be met before testing should be concluded. Click here for more details.
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.
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).
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)
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.
Requirement Analysis
Test Planning
Test Design
Test Execution
Test Closure
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.
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.
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.
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.
144. Which test cases are written first white boxes or black box?
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.
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.
In random testing is a form of black-box software testing technique where the application is testing by generating
random data.
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
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.
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.
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.
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.
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.
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.
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.
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.
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
The relationship between test cases and requirements is shown with the help of a document. This document is
known as a traceability matrix.
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
5. Verify all conditional loops in the code to check the complete functionality of the application
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
3. Cause-effect graphing
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.
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.
195
1. Unit/component/program/module testing
2. Integration testing
3. System testing
4. Acceptance 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.
Test design, scope, test strategies, approach are various details that Test plan document consists of.
2. Scope
3. Features to be tested
6. Test deliverables
7. Responsibilities
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?
17. What is the difference between test scenarios, test cases, and test script?
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.
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?
197
Parameters for quality of test execution
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.
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
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
2. Backtracking
3. Cause elimination
4. Program Slicing
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.
Have discussions about the project with all stakeholders including the developer
Limited Budget
Time Limitations
30. On what basis you can arrive at an estimation for your project?
200
Validate the estimation
Task Member
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.
33. While monitoring your project what all things you have to consider?
201
Have you got enough resources
Poor Scheduling
Underestimating
35. What does a typical test report contain? What are the benefits of test reports?
Project Information
Test Objective
Test Summary
Defect
A final document helps to decide whether the product is ready for release
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?
Continuous Improvement
Documentation
Tool Usage
Metrics
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
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?
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.
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.
LCSAJ stands for ‘linear code sequence and jump.’ It consists of the following three items
c) The target line to which control flow is transferred at the end of the linear sequence
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.
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?
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
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 hold a team meeting, reveal the solution and ask people to co-operate
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
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
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?
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
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?
Project Name
Module Name
Defect detected on
Defect detected by
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
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?
Tests that use multiple data for the same set of actions
64. What is the MAIN benefit of designing tests early in the life cycle?
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.
The likelihood of an adverse event and the impact of the event determine the level of risk.
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
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
72. Which of the following defines the expected results of a test? Test case specification or test design
specification.
74. As part of which test process do you determine the exit criteria?
209
76. What is beta testing?
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?
thenbiggest_dimension = width
thenbiggest_dimension = height
end_if
elsebiggest_dimension = 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?
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
81. We use the output of the requirement analysis, the requirement specification as the input for writing …
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
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.
211
Testing the end to end functionality of the system as a whole is defined as a functional system 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.
There are currently seven different agile methodologies that I am aware of:
2. Scrum
4. Feature-Driven Development
6. Crystal
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?
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.
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.
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.
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.
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.
An input or output ranges of values such that only one value in the range becomes a test case.
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?
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.
After the software has changed or when the environment has changed Regression testing should be performed.
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.
Re-testing ensures the original fault has been removed; regression testing looks for unexpected side effects.
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
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
The answer depends on the risk for your industry, contract and special requirements.
It depends on the risks for the system being tested. There are some criteria based on which you can stop testing.
216
4. Test cases completed with certain percentage passed
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.
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
ENDIF
IF p > 50
ENDIF
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.
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.
It is led by a trained leader, uses formal entry and exit criteria and checklists.
Because configuration management assures that we know the exact version of the testware and the test object.
A software development model that illustrates how testing activities integrate with software development phases
218
Triggered by modifications, migration or retirement of existing software
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.
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?
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
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
220
An inexpensive way to get some benefit
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
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
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
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.
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?
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