0% found this document useful (0 votes)
789 views

SQA Interview Preparation by Umar Arshad

The document discusses software testing concepts like the software development lifecycle (SDLC), software testing lifecycle (STLC), and principles of software testing. It explains that SDLC is a systematic process for building software to ensure quality, correctness, and meeting requirements. STLC refers to the testing process that is executed systematically and includes requirements analysis, test planning, case development, environment setup, execution, and defect reporting. The principles of testing discussed are that testing finds defects, exhaustive testing is impossible, early testing is important, defects cluster in some areas, repetitive testing becomes less effective over time, testing depends on context, and absence of errors does not mean requirements are met.

Uploaded by

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

SQA Interview Preparation by Umar Arshad

The document discusses software testing concepts like the software development lifecycle (SDLC), software testing lifecycle (STLC), and principles of software testing. It explains that SDLC is a systematic process for building software to ensure quality, correctness, and meeting requirements. STLC refers to the testing process that is executed systematically and includes requirements analysis, test planning, case development, environment setup, execution, and defect reporting. The principles of testing discussed are that testing finds defects, exhaustive testing is impossible, early testing is important, defects cluster in some areas, repetitive testing becomes less effective over time, testing depends on context, and absence of errors does not mean requirements are met.

Uploaded by

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

Software Testing Interview Questions & Answers

Prepared By Mr. Umar Arshad


Content
SDLC, STLC

Test Plans, Environments, Strategy, Scenario, Cases

Functional Testing

Non-Functional Testing

Agile

Database + SQL

OOP

Automation Testing

What is SDLC? imp

The Software Development Lifecycle is a systematic process for building software that ensures
the quality and correctness of the software built. SDLC process aims to produce high-quality
software which meets customer expectations. The software development should be complete
in the pre-defined time frame and cost.

Why SDLC?

Here, are prime reasons why SDLC is important for developing a software system.

 It offers a basis for project planning, scheduling, and estimating


 Provides a framework for a standard set of activities and deliverables
 It is a mechanism for project tracking and control
 Increases visibility of project planning to all involved stakeholders of the development
process
 Increased and enhance development speed
 Improved client relations
 Helps you to decrease project risk and project management plan overhead

SDLC Phases? imp

The entire SDLC process divided into the following stages:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Phase 1: Requirement collection and analysis
 Phase 2: Feasibility study:
 Phase 3: Design:
 Phase 4: Coding:
 Phase 5: Testing:
 Phase 6: Installation/Deployment:
 Phase 7: Maintenance:

1. Requirements Gathering/Analysis.
This is a process with much communication taking place between stakeholders, end
users and the project team. Meetings with managers, stake holders and users are held
in order to determine the requirements like; who is going to use the system? How will
they use the system?  What data should be input into the system?  What data should be
output by the system?  These are general questions that get answered during a
requirement gathering phase. The QA engineer playing the role to configure the
requirements using requirements traceability matrix.

2. Design: 
In this phase the software design is prepared from the requirement
specifications which were studied in the first phase. System Design helps in specifying
hardware and system requirements and also helps in defining overall system
architecture.
In this phase the QA Engineers comes up with the Test strategy, where they mention
what to test, how to test.
3. Implementation / Coding: 
Upon receiving system design documents, the work is divided in modules/units and
actual coding is started. Since, in this phase the code is produced so it is the main focus
for the developer. This is the longest phase of SDLC. In this phase the QA Engineers
comes up with the Test Environment setup and test Case Documentation.
4. Testing:  After the code is developed it is tested against the requirements to make sure
that the product is actually solving the needs addressed and gathered during the
requirements phase. During this phase all types of  like unit testing, integration testing,

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Smoke Te sting, functional testing, Sanity Testing, system testing, acceptance
testing are done as well as non-functional testing are also done.

5. Deployment: After successful testing the product is delivered / deployed to the


customer for their use.
As soon as the product is given to the customers they will first do the beta testing/User
Acceptance Testing. If any changes are required or if any bugs are caught, then they
will report it to the engineering team. Once those changes are made or the bugs are
fixed then the final deployment will happen.

Popular SDLC models

Here, are some most important phases of SDLC life cycle:

Waterfall model

Waterfall model works well for smaller projects where requirements are very well
understood.
The waterfall is a widely accepted SDLC model. In this approach, the whole process of the
software development is divided into various phases. In this SDLC model, the outcome of one
phase acts as the input for the next phase.

This SDLC model is documentation-intensive, with earlier phases documenting what need be
performed in the subsequent phases.

Incremental Model

The incremental model is not a separate model. It is essentially a series of waterfall cycles. The
requirements are divided into groups at the start of the project. For each group, the SDLC
model is followed to develop software. The SDLC process is repeated, with each release adding
more functionality until all requirements are met. In this method, every cycle act as the
maintenance phase for the previous software release. Modification to the incremental model
allows development cycles to overlap. After that subsequent cycle may begin before the
previous cycle is complete.

V-Model

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


In this type of SDLC model testing and the development, the phase is planned in parallel. So,
there are verification phases on the side and the validation phase on the other side. V-Model
joins by Coding phase.

Agile Model - imp

Agile methodology is a practice which promotes continue interaction of development and


testing during the SDLC process of any project. In the Agile method, the entire project is divided
into small incremental builds. All of these builds are provided in iterations, and each iteration
lasts from one to three weeks. In ‘Agile Model’ after every sprint there is a demo-able feature
to the customer. Hence customer can see the features whether they are satisfying their need
or not.
Each release is thoroughly tested to ensure software quality is maintained. It is used for time
critical applications.

Spiral Model

The spiral model is a risk-driven process model. This SDLC model helps the team to adopt
elements of one or more process models like a waterfall, incremental, waterfall, etc.

This model adopts the best features of the prototyping model and the waterfall model. The
spiral methodology is a combination of rapid prototyping and concurrency in design and
development activities.

What are the principles of Software Testing?

1. Testing shows presence of defects

Software Testing reduces the probability of undiscovered defects remaining in the software
but even if no defects are found, it is not a proof of correctness.

2. Exhaustive testing is impossible

 if you were testing this Operating system, you would realize that defects are likely to be
found in multi-tasking activity and need to be tested thoroughly which brings us to our next
principle Defect Clustering.

3. Early testing

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Early Testing - Testing should start as early as possible in the Software Development Life
Cycle. So that any defects in the requirements or design phase are captured in early stages.

4. Defect clustering

Defect Clustering which states that a small number of modules contain most of the defects
detected. If the same tests are repeated over and over again, eventually the same test cases
will no longer find new bugs.

5. Pesticide Paradox

Repetitive use of the same pesticide mix to eradicate insects during farming will over time
lead to the insects developing resistance to the pesticide Thereby ineffective of pesticides on
insects. The same applies to software testing. If the same set of repetitive tests are
conducted, the method will be useless for discovering new defects. To overcome this, the
test cases need to be regularly reviewed & revised, adding new & different test cases to help
find more defects.

6. Testing is context depending

Testing is context dependent which basically means that the way you test an e-commerce
site will be different from the way you test a commercial off the shelf application. All the
developed software’s are not identical. You might use a different approach, methodologies,
techniques, and types of testing depending upon the application type. 

7. Absence of error - Fallacy

It is possible that software which is 99% bug-free is still unusable. This can be the case if the
system is tested thoroughly for the wrong requirement. The absence of Error is a Fallacy i.e.
Finding and fixing defects does not help if the system build is unusable and does not fulfill the
user's needs & requirements.

What is STLC? imp

It is the testing process which is executed in systematic and planned manner. In STLC process,
different activities are carried out to improve the quality of the product.

Following steps are involved in Software Testing Life Cycle (STLC).

1. Requirement Analysis (RTM)


2. Test Planning (Test Strategy, Test Plan, Test Bed Creation)
3. Test Case Development (Test Procedures, Test Scenarios, Test Cases)
4. Environment Setup
5. Test Execution

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


6. Defect Reporting

What is Software Testing? imp

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.

What are Quality Assurance and Quality Control?    imp

Quality Assurance: Quality Assurance involves in process-oriented activities. It ensures the


prevention of defects in the process used to make Software Application. So the defects don’t
arise when the Software Application is being developed. The process is:

 Plan - Organization should plan and establish the process related objectives and
determine the processes that are required to deliver a high-Quality end product.
 Do - Development and testing of Processes and also "do" changes in the processes
 Check - Monitoring of processes, modify the processes, and check whether it meets the
predetermined objectives
 Act - A Quality Assurance tester should implement actions that are necessary to achieve
improvements in the processes

Quality Control: Quality Control involves in product-oriented activities. It executes the


program or code to identify the defects in the Software Application.

What are the Quality assurance and Quality Control standards?

Quality assurance system standards, including ISO 9001, are defined as frameworks that
provide regulations to organizations to ensure that their processes, inputs, products, and
services are capable of meeting every customer requirement.

 Ensuring maximum satisfaction of clients by meeting their quality requirements

 Safety of products and services during usage

 Complying with international regulations and local legislative rules

 Being environmentally responsible

 Confidentiality of stakeholders including customers, employees, partners, and investors

 Assuring a safer workplace for employees

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Optimum allocation of resources and minimization of waste

What is Verification & Validation in software testing? imp

 Validation: Are we building the right system?


 Verification: Are we building the system right?
In other words, validation is concerned with checking that the system will meet the customer’s
actual needs. validation is an extremely subjective process. Validation includes activities such as
requirements modelling, prototyping and user evaluation.

While verification is concerned with whether the system is well-engineered, error-free, and so
on. Verification will help to determine whether the software is of high quality, but it will not
ensure that the system is useful. Verification includes all the activities associated with the
producing high quality software: testing, inspection, design analysis, specification analysis, and
so on. It is a relatively objective process.

What is Static Testing?

Static Testing involves in reviewing the documents to identify the defects in the early stages of
SDLC.

What is Dynamic Testing?

Dynamic testing involves in the execution of code. It validates the output with the expected
outcome.

There are 3 methods of software testing. 1) White box, 2) Black box

What is White Box Testing? imp

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.

What is Black Box Testing? imp

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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. 

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.

What is Positive and Negative Testing?

Positive Testing: It is to determine what system supposed to do. It helps to check whether
the application is justifying the requirements or not.

Negative Testing: It is to determine what system not supposed to do. It helps to find the
defects from the software.

What is Test Plan and contents available in a Test Plan? imp

Test plan document is a document which contains the plan for all the testing activities to be
done to deliver a quality product. Test Plan document is derived from the Product Description,
SRS, or Use Case documents for all future activities of the project. It is usually prepared by the
Test Lead or Test Manager.

1. Test plan identifier


2. References
3. Introduction
4. Test items (functions)
5. Software risk issues
6. Features to be tested
7. Features not to be tested
8. Approach
9. Items pass/fail criteria
10. Suspension criteria and resolution requirements
11. Test deliverables
12. Remaining test tasks
13. Environmental needs
14. Staff and training needs
15. Responsibility
16. Schedule

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


17. Plan risks and contingencies
18. Approvals
19. Glossaries

What is Test Strategy? imp

Test Strategy is a high-level document (static document) and usually developed by project


manager. It is a document which 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 strategy doc is project based document it can change
according to project domain and requirements.

What is Test Suite? imp

Test Suite is a collection of test cases. The test cases which are intended to test an application.

What is Test Scenario? imp

Test Scenario gives the idea of what we have to test. Test Scenario is like a high-level test case.

What is Test Case? imp

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

What is Test Bed? imp

An environment configured for testing. Test bed consists of hardware, software, network
configuration, an application under test, other related software.

What is Test Environment? imp

Test Environment is the combination of hardware and software on which Test Team performs
testing. Example:

 Application Type: Web Application


 OS: Windows
 Web Server: IIS

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Web Page Design: Dot Net
 Client Side Validation: JavaScript
 Server Side Scripting: ASP Dot Net
 Database: MS SQL Server
 Browser: IE/FireFox/Chrome

What is Test Data?

Test data is the data that is used by the testers to run the test cases. Whilst running the test
cases, testers need to enter some input data. To do so, testers prepare test data. It can be
prepared manually and also by using tools.

What is Test Harness? imp

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 expected output.

What is Test Closure?

Test Closure is the note prepared before test team formally completes the testing process. This
note contains the total no. of test cases, total no. of test cases executed, total no. of defects
found, total no. of defects fixed, total no. of bugs not fixed, total no of bugs rejected etc.,

What is Risk Factor and its Types?

In software testing Risks are the possible problems that might endanger the objectives of the
project stakeholders. It is the possibility of a negative or undesirable outcome. A risk is
something that has not happened yet and it may never happen; it is a potential problem.

The types of Risk in a Test Project can be broadly categorized as

1. Strategy Risk: This includes Budget, Communication and Management risks


2. Project Definition Risks: This includes Project target, Scope, and requirements risks.
3. Human Resources Risk: This includes Skill, Team members and organization risks.

What are the tasks of Test Closure activities in Software Testing?

Test Closure activities fall into four major groups.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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.

Result: Archiving results, logs, reports, and other documents and work products in the CMS
(configuration management system).

List out Test Deliverables?

1. Test Strategy
2. Test Plan
3. Effort Estimation Report
4. Test Scenarios
5. Test Cases/Scripts
6. Test Data
7. Requirement Traceability Matrix (RTM)
8. Defect Report/Bug Report
9. Test Execution Report
10. Graphs and Metrics
11. Test summary report
12. Test incident report
13. Test closure report
14. Release Note
15. Installation/configuration guide
16. User guide
17. Test status report
18. Weekly status report (Project manager to client)

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Functional Testing
What is Unit/Module Testing? imp

Unit Testing is also called as 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.

What is Integration Testing? imp

Integration Testing is the process of testing the interface between the two software
units. Integration testing is done by three ways. Big Bang Approach, Top-Down Approach,
Bottom-Up Approach

What is System Testing? imp

Testing the fully integrated application to evaluate the system’s compliance with its specified
requirements is called System Testing End to End testing. Verifying the completed system
to ensure that the application works as intended or not.

System testing is carried out by specialist testers or independent testers.


System testing should investigate both functional and non-functional requirements of the
testing.

What is Smoke Testing? imp

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.

What is Sanity Testing? imp

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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”. We perform sanity testing when we don’t have enough time for regression
testing.

What is Regression Testing? imp

Repeated testing of an already tested program, after modification, to discover any defects
introduced or uncovered as a result of the changes in the software being tested or in another
related or unrelated software components.

Usually, we do regression testing in the following cases:

1. New functionalities are added to the application


2. Change Requirement (In organizations, we call it as CR)
3. Defect Fixing
4. Performance Issue Fix
5. Environment change (E.g., Updating the DB from MySQL to Oracle)

What is Retesting Testing? imp

Retesting is done to make sure that the tests cases which failed in last execution are passed
after the defects are fixed. Retesting is carried out based on the defect fixes. In Retesting, the
cases which are failed earlier can be included to check if the functionality failure in an earlier
build.

What is Exploratory Testing? imp


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.

What is Monkey Testing?

Perform abnormal action on the application deliberately in order to verify the stability of the
application.

What is Big Bang Approach?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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.

What is Top-Down Approach?

Testing takes place from top to bottom. High-level modules are tested first and then low-level
modules and finally integrating the low-level modules to a high level to ensure the system is
working as intended. Stubs are used as a temporary module if a module is not ready for
integration testing.

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.

What is Functional Testing? imp

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.

What is Non-Functional Testing? imp

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.

What is User Acceptance Testing / UAT? imp

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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.

There are 3 Types of Software testing (Alpha, Beta, Gamma)

What is Alpha Testing? imp

Alpha testing is done by the in-house developers (who developed the software) and testers.
Sometimes alpha testing is done by the client or outsourcing team with the presence of
developers or testers.

It has two phases:

 In the first phase of alpha testing, the software is tested by in-house developers. They
use debugger software. The goal is to catch bugs quickly.
 In the second phase of alpha testing, the software is handed over to the software QA
staff, for additional testing in an environment that is similar to the intended use.

What is Beta Testing? imp

Beta testing is done by a limited number of end users before delivery. Usually, it is done in the
client place.

What is Gamma Testing?

Gamma testing is done when the software is ready for release with specified requirements. It is
done at the client place. It is done directly by skipping all the in-house testing activities.

Non-Functional Testing
What is Performance Testing? imp

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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.

What is Load Testing? imp

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.

What is Volume Testing? imp

It is to verify that the system/application can handle a large amount of data.

What is Stress Testing? imp

It is to verify the behavior of the system once the load increases more than its design
expectations.

What is Scalability Testing?

Scalability testing is a type of non-functional testing. It is to determine how the application


under test scales with increasing workload.

What is Concurrency Testing?

Concurrency testing means accessing the application at the same time by multiple users to
ensure the stability of the system. This is mainly used to identify deadlock issues.

What is GUI Testing? imp

Graphical User Interface Testing is to test the interface between the application and the end
user.

What is Recovery Testing?

Recovery testing is performed in order to determine how quickly the system can recover after
the system crash or hardware failure. It comes under the type of non-functional testing.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


What is Installation Testing?
It is to check whether the application is successfully installed and it is working as expected after
installation.

What is Formal Testing? imp


It is a process where the testers test the application by having pre-planned procedures and
proper documentation.

What is Risk Based Testing? imp

Identify the modules or functionalities which are most likely cause failures and then testing
those functionalities.

What is Compatibility Testing?


It is to deploy and check whether the application is working as expected in a different
combination of environmental components.

What is Usability Testing?

To verify whether the application is user-friendly or not and was comfortably used by an end
user or not. The main focus in this testing is to check whether the end user can understand and
operate the application easily or not. An application should be self-exploratory and must not
require training to operate it.

What is Security Testing? imp

Security testing is a process to determine whether the system protects data and maintains
functionality as intended.

What is Soak Testing? imp

Running a system at high load for a prolonged period of time to identify the performance
problems is called Soak or Endurance Testing.

What is Fuzz Testing? Imp

Fuzz testing is used to identify coding errors and security loopholes in an application. By
inputting massive amount of random data to the system in an attempt to make it crash to
identify if anything breaks in the application.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


What is Adhoc Testing? imp

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.

What is Interface Testing?

Interface testing is performed to evaluate whether two intended modules pass data and
communicate correctly to one another.

What is Reliability Testing?


Perform testing on the application continuously for long period of time in order to verify the
stability of the application.

What is Bucket Testing? imp

Bucket or Split testing is a method to compare two versions of an application against each other
to determine which one performs better.

What is Defect Cascading in Software Testing?

Defect cascading in Software testing means triggering of other defects in an application. When
a defect is not identified or goes unnoticed while testing, it invokes other defects. It leads to
multiple defects in the later stages and results in an increase in a number of defects in the
application.

For example, if there is a defect in an accounting system related to negative taxation then the
negative taxation defect affects the ledger which in turn affects other reports such as Balance
Sheet, Profit & Loss etc.,

What is Walk Through? imp

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.

What is Inspection? imp

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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.

Who are all involved in an inspection meeting?

Author, Moderator, Reviewer(s), Scribe/Recorder and Manager.

What is a Defect? imp

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. 

What is a Bug? imp

If testers find any mismatch in the application/system in testing phase, then they call it as Bug.

What is an Error? imp

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. 

What is a Failure? imp

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. 

What is Bug Severity? imp

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.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


What is Bug Priority? imp

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. 

Tell some examples of Bug Severity and Bug Priority? Imp

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: key feature failed but there’s no impact on customer
business, e.g. calculation fault in yearly report which end user won’t use on daily basis.

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

What is a Critical Bug?

A critical bug is a show stopper which means a large piece of functionality or major system
component is completely broken and there is no workaround to move further.
For example, Due to a bug in one module, we cannot test the other modules because that
blocker bug has blocked other modules. Bugs which affects the customers’ business are
considered as critical.

Example:

1. “Sign In” button is not working on Gmail App and Gmail users are blocked to login to their
accounts.
2. An error message pops up when a customer clicks on transfer money button in a Banking
website.

What is the difference between a Standalone application, Client-Server


application and Web application?

Standalone application:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


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.

What is Bug Life Cycle? imp

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. 

1. New: When a defect is logged and posted for the first time. Its state is given as new.
2. Assigned: After the tester has posted the bug, the lead of the tester approves that the
bug is genuine and he assigns the bug to corresponding developer and the developer
team. Its state given as assigned.
3. Open:  At this state the developer has started analyzing and working on the defect fix.
4. Fixed:  When developer makes necessary code changes and verifies the changes then
he/she can make bug status as ‘Fixed’ and the bug is passed to testing team.
5. Pending retest:  After fixing the defect the developer has given that particular code for
retesting to the tester. Here the testing is pending on the testers end. Hence its status is
pending retest.
6. Retest:  At this stage the tester does the retesting of the changed code which developer
has given to him to check whether the defect got fixed or not.
7. Verified:  The tester tests the bug again after it got fixed by the developer. If the bug is
not present in the software, he approves that the bug is fixed and changes the status to
“verified”.
8. Reopen:  If the bug still exists even after the bug is fixed by the developer, the tester
changes the status to “reopened”. The bug goes through the life cycle once again.
9. Closed:  Once the bug is fixed, it is tested by the tester. If the tester feels that the bug no
longer exists in the software, he changes the status of the bug to “closed”. This state
means that the bug is fixed, tested and approved.
10. Duplicate: If the bug is repeated twice or the two bugs mention the same concept of the
bug, then one bug status is changed to “duplicate “.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


11. Rejected: If the developer feels that the bug is not genuine, he rejects the bug. Then the
state of the bug is changed to “rejected”.
12. Deferred: The bug, changed to deferred state means the bug is expected to be fixed in
next releases. The reasons for changing the bug to this state have many factors. Some of
them are priority of the bug may be low, lack of time for the release or the bug may not
have major effect on the software.
13. Not a bug:  The state given as “Not a bug” if there is no change in the functionality of
the application. For an example: If customer asks for some change in the look and field
of the application like change of color of some text then it is not a bug but just some
change in the looks of the application.

What is Bug Leakage?

A bug which is actually missed by the testing team while testing and the build was released to
the Production. If now that bug (which was missed by the testing team) was found by the end
user or customer, then we call it as Bug Leakage.

What is Bug Release?

Releasing the software to the Production with the known bugs then we call it as Bug Release.
These known bugs should be included in the release note.

What is Defect Age?

Defect age can be defined as the time interval between date of defect detection and date of
defect closure.

Defect Age = Date of defect closure – Date of defect detection

Assume, a tester found a bug and reported it on 1 Jan 2016 and it was successfully fixed on 5
Jan 2016. So the defect age is 5 days.

What is Error Seeding? imp

Error seeding is a process of adding known errors intendedly in a program to identify the rate of
error detection.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


What is Showstopper Defect? imp

A showstopper defect is a defect which won’t allow a user to move further in the application.
It’s almost like a crash.

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.

What is HotFix?

A bug which needs to handle as a high priority bug and fix it immediately.

Testing Techniques
What is Boundary Value Analysis? imp

Boundary value analysis (BVA) is based on testing the boundary values of valid and invalid
partitions.  Every partition has its maximum and minimum values and these maximum and
minimum values are the boundary values of a partition. 

What is Decision Table testing? imp

Decision Table is a Cause-Effect Table. This test technique is appropriate for functionalities


which has logical relationships between inputs (if-else logic). In Decision table technique, we
deal with combinations of inputs. To identify the test cases with decision table, we consider
conditions and actions. We take conditions as inputs and actions as outputs.

How to make Decision Table for Upload Screen?

Now consider a dialogue box which will ask the user to upload photo with certain conditions
like –

1. You can upload only '.jpg' format image


2. file size less than 32kb
3. resolution 137*177.

If any of the conditions fails, the system will throw corresponding error message stating the
issue and if all conditions are met photo will be updated successfully.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Let's create the decision table for this case.

Condition Case 1 Case 2 Case 3 Case 4 Case 5 Case 6 Case 7 Case 8


s

Format .jpg .jpg .jpg .jpg Not .jpg Not .jpg Not .jpg Not .jpg

Size Less Less than >= 32kb >= 32kb Less than Less than >= 32kb >= 32kb
than 32kb 32kb 32kb
32kb

resolution 137*177 Not 137*177 Not 137*177 Not 137*177 Not


137*177 137*177 137*177 137*177

Output Photo Error Error Error Error Error Error


uploaded message message message message message message
resolution size size and for format format for format
mismatch mismatch resolution mismatch and and size
mismatch resolution mismatch
mismatch

Equivalence Class Partitioning

Equivalence Partitioning or Equivalence Class Partitioning is type of black box testing technique
which can be applied to all levels of software testing like unit, integration, system, etc. In this
technique, input data units are divided into equivalent partitions that can be used to derive test
cases which reduces time required for testing because of small number of test cases.

 It divides the input data of software into different equivalence data classes.
 You can apply this technique, where there is a range in the input field.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Example 1: Equivalence and Boundary Value

 Let's consider the behavior of Order Pizza Text Box Below


 Pizza values 1 to 10 is considered valid. A success message is shown.
 While value 11 to 99 are considered invalid for order and an error message will
appear, "Only 10 Pizza can be ordered"

Submit
Order Pizza:      

Here is the test condition

1. Any Number greater than 10 entered in the Order Pizza field(let say 11) is considered
invalid.
2. Any Number less than 1 that is 0 or below, then it is considered invalid.
3. Numbers 1 to 10 are considered valid
4. Any 3 Digit Number say -100 is invalid.

What is State Transition?

Using state transition testing, we pick test cases from an application where we need to test
different system transitions. We can apply this when an application gives a different output for
the same input, depending on what has happened in the earlier state. 

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


What is entry criteria?

The prerequisites that must be achieved before commencing the testing process. 

What is exit criteria?

The conditions that must be met before testing should be concluded. 

What is main differences between UX and UI

UX design refers to the term “user experience design”, while UI stands for “user interface
design”. 

There is an analogy I like to use to describe the different parts of a (digital) product:

If you imagine a product as the human body, the bones represent the code which give it
structure. The organs represent the UX design: measuring and optimizing against input for
supporting life functions. And UI design represents the cosmetics of the body; its presentation,
its senses and reactions.

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).

What is RTM? imp

Requirements Traceability Matrix (RTM) is used to trace the requirements to the tests that are
needed to verify whether the requirements are fulfilled. Requirement Traceability Matrix
AKA Traceability Matrix or Cross Reference Matrix. 

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


When to stop testing? (Or) How do you decide when you have tested enough?
imp

There are many factors involved in the real-time projects to decide when to stop testing.

1. Testing deadlines or release deadlines


2. By reaching the decided pass percentage of test cases
3. The risk in the project is under acceptable limit
4. All the high priority bugs, blockers are fixed
5. When acceptance criteria is met.

How much testing is enough?


There is no definitive answer to this question. Testing is not absolute and has no limits.
However, we can use risk metrics (risk-based testing) to identify the likely scenarios that can
cause the most harm or the sections of the software that is mostly used so that we focus our
time and effort to the sections that are most important.

Testing should provide enough information about the status or health of an application, so the
stakeholders can make an informed decision on whether to release the software or spend more
time on testing.

The following questions contain short answers to provide quick hints to some ISTQB Interview
Questions.

What are the different Test Levels?


 Component Testing
 Integration Testing
 System Testing
 Acceptance Testing

What information should be included in a defect or bug report?


 A brief summary of the defect
 A full description of the defect including steps to reproduce
 Screenshot attachments if required
 Date the defect was found and raised
 Who reported the defect

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Severity and/or Priority of the defect
 Which component is the defect assigned

What is the Test Management Reviews & Audit?

 Management Review: Management Review is also known as Software Quality


Assurance or (SQA). It focuses more on the software process rather than the
software work products. Quality Assurance is a set of activities designed to ensure
that the project manager follows the standard process which is already pre-defined.
In other words, Quality Assurance makes sure the Test Manager is doing the right
things in the right way.

 Audit: An audit is the examination of the work products and related information to
assesses whether the standard process was followed or not.

Mobile Application Testing


What you need and what stages you need to test when you receive the Mobile Application,
there are some major concern i have listed and you should know.

1. Functional testing

Testing is done by certifying the requirements. like whether the application is working
based on the requirements or not.

2. Android/IOS UI/Responsiveness testing

This is an user-centric testing of the application. In this test phase, items such as visibility
of text in various screens of the app, interactive messages, alignment of elements, the look
and feel of the app for different screens, size of fields etc are tested under this.

Most important point of this testing:

- Device Selection (must prefer Real device always)

- Device emulators are cost effective and they come in handy during the initial development
phase.

- But, to test the real-life scenarios, physical devices are the must. Both emulators and
physical devices are to be used in a balanced manner for an optimized result.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


3. Compatibility testing

This testing is done mostly in the form of two matrices of OS Vs app and Device model Vs
app. Usually, a list of supported OS (and sometimes devices) is provided by the product
owner or customer.

4. Interface Testing

This testing is done after all the modules of the app are completely developed, tested
individually and all the bugs are fixed verified.

5. Network Testing

During this testing, request/response to/from the service is tested for various conditions.

This test is mainly done to verify the response time in which the activity is performed like
refreshing data after sync or loading data after login etc.

6. Performance Testing

Performance of the application under some peculiar conditions are checked.

Those conditions include:

-Low memory in the device.

-The battery in extremely at a low level.

-Poor/Bad network reception.

7. Installation/Uninstallation testing

This is to ensure smooth installation and uninstallation of the application without ending up
in errors, partial installation etc.

8. Security Testing

Testing of the data flow for encryption and decryption mechanism is to be tested in this
phase. Access to stored data is also tested in this phase.

9. Field testing

Field testing is done specifically for the mobile data network and not in-house but by going
out and using the app as a normal user.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


It is basically done to verify the behavior of the app when the phone has a 2G or 3G
connection. Field testing verifies if the app is crashing under slow network connection or if it
is taking too long to load the information.

10. Interrupt Testing

This is the Offline Scenario Verification. Conditions where the communication breaks in the
middle are called as offline conditions.

Some of the conditions where interruptions of a network can be tested are as follows:

- Data cable removal during data transfer process.

- Network outage during the transaction posting phase.

- Network recovery after an outage.

- Battery removal or Power On/Off when it is in the transactional phase.

Agile Testing
Q #1) What is Agile Testing?
Answer: Agile Testing is a practice that a QA follows in a dynamic environment where
testing requirements keep changing according to customer needs. It is done parallel to the
development activity where the testing team receives frequent small codes from the
development team for testing.

Q #2) What is the difference between burn-up and burn-down charts?


Answer: Burn-up and burn-down charts are used to keep track of the progress of the
project.
Burn-up charts represent how much work has been completed in any project whereas Burn-
down chart represents the remaining work in a project.

Q #3) Define the roles in Scrum?


Answer:
There are mainly three roles that a Scrum team have:
1. Project Owner has the responsibility of managing the product backlog. Works with
end-users and customers and provides proper requirements to the team to build the
proper product.
2. Scrum Master works with the scrum team to make sure each sprint gets completed
on time. Scrum master ensures proper workflow for the team.
3. Scrum Team: Each member of the team should be self-organized, dedicated and
responsible for the high quality of the work.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #4) What is Product Backlog & Sprint Backlog?
Answer: The Product backlog is maintained by the project owner which contains every
feature and requirement of the product.
Sprint backlog can be treated as the subset of product backlog which contains features
and requirements related to that particular sprint only.

Q #5) Explain Velocity in Agile.


Answer: Velocity is a metric that is calculated by the addition of all efforts estimates
associated with user stories completed in an iteration. It predicts how much work Agile can
complete in a sprint and how much time will it require to complete a project.

Q #6) Explain the difference between a traditional Waterfall model and Agile testing?
Answer: Agile testing is done parallel to the development activity whereas a traditional
waterfall model testing is done at the end of the development.
As done in parallel, agile testing is done on small features whereas, in a waterfall model,
testing is performed on the whole application.

Q #7) Explain Pair Programming and its benefits?


Answer: Pair programming is a technique in which two programmer works as a team in
which one programmer writes code and other one reviews that code. They both can switch
their roles.
Benefits:
 Improved code quality: As the second partner reviews the code simultaneously, it
reduces the chances of mistake.
 Knowledge transfer is easy: One experienced partner can teach another partner
about the techniques and codes.

Q #8) What is Re-factoring?


Answer: Modification of the code without changing its functionality to improve the
performance is called Re-factoring.

Q #9) Explain the Iterative and Incremental Development in Agile?


Answer:
Iterative Development: Software is developed and delivered to the customer and based on
the feedback again developed in cycles or releases and sprints. Example: Release 1
software is developed in 5 sprints and delivered to the customer. Now, the customer wants
some changes, then the development team plan for 2 nd release which can be completed in
some sprints and so on.
Incremental Development: Software is developed in parts or increments. In each
increment, a portion of the complete requirement is delivered.

Q #10) How do you deal when requirements change frequently?


Answer: This question is to test the analytical capability of the candidate.
The answer can be: Work with PO to understand the exact requirement to update test
cases. Also, understand the risk of changing the requirement. Apart from this, one should
be able to write a generic test plan and test cases. Don’t go for the automation until
requirements are finalized.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #11) What is a test stub?
Answer: Test stub is a small code that mimics(copy) a specific component in the system
and can replace it. Its output is the same as the component it replaces.

Q #12) What qualities should a good Agile tester have?


Answer:
 He should be able to understand the requirements quickly.
 He should know Agile concepts and principals.
 As requirements keep changing, he should understand the risk involved in it.
 The agile tester should be able to prioritize the work based on the requirements.
 Communication is a must for an Agile tester as it requires a lot of communication
with developers and business associates.

Q #13) What is the difference between Epic, User stories & Tasks?
Answer:
User Stories: It defines the actual business requirement. Generally created by the business
owner.
Task: To accomplish the business requirements development team create tasks.
Epic: A group of related user stories is called an Epic.

Q #14) What is a Taskboard in Agile?


Answer: Taskboard is a dashboard that shows the progress of the project.
It contains:
 User Story: It has the actual business requirement.
 To Do: Tasks that can be worked on.
 In Progress: Tasks in progress.
 To Verify: Tasks pending for verification or testing
 Done: Completed tasks.

Q #15) What is Test Driven Development (TDD)?


Answer: It is a Test-first development technique in which we add a test first before we write
the complete production code. Next, we run the test and based on the result refactor the
code to fulfill the test requirement.

Q #16) How QA can add value to an agile team?


Answer: QA can provide value addition by think outside the box about the various
scenarios to test a story. They can provide quick feedback to the developers about whether
new functionality is working fine or not.

Q #17) What is Scrum ban?


Answer: It is a software development model that is a combination of Scrum and Kanban.
Scrum ban is considered for maintaining projects in which there are frequent changes or
unexpected user stories. It can reduce the minimum completion time for user stories.

Q #18) What is the Application Binary Interface?


Answer: Application Binary Interface or ABI is defined as an interface for complied
application programs or we can say it describes the low-level interface between an
application and the operating system.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #19) What is the Zero sprint in Agile?
Answer: It can be defined as a pre-preparation step to the first sprint. Activities like setting
development environment, preparing backlog, etc need to be done before starting the first
sprint and can be treated as Sprint zero.

Q #20) What is Spike?


Answer: There may be some technical issues or design problem in the project which needs
to be resolved first. To provide the solution to this problem “Spikes” are created.
Spikes are of two types- Functional and Technical.

Q #21) Name some Agile quality strategies.


Answer: Some Agile quality strategies are-
1. Re-factoring
2. Small feedback cycles
3. Dynamic code analysis
4. Iteration

Q #22) What is the importance of daily stand up meetings?


Answer: Daily stand up meeting is essential for any team in which team discuss,
1. How much work has been completed?
2. What are the plans to resolve technical issues?
3. What steps need to done to complete the projects etc?
Q #23) What is a tracer bullet?
Answer: It can be defined as a spike with the current architecture or the current set of best
practices. The purpose of a tracer bullet is to examine how an end-to-end process will work
and examine feasibility.
Q #24) How the velocity of the sprint is measured?
Answer: If capacity is measured as a percentage of a 40 hours weeks then, completed
story points * team capacity
If capacity is measured in man-hours then Completed story points/team capacity.

Q #25) How many types of SCRUM Meeting?

There are 5 types of Scrum meetings which occur at a particular time during a Sprint cycle
and each particular type serves a distinct purpose.

1. Sprint Planning Meeting


2. Daily Scrum Meeting
3. Sprint Review Meeting
4. Sprint Retrospective Meeting
5. Backlog Refinement Meeting

Sprint Planning Meeting

At the beginning of every Sprint, Sprint planning meeting is held. Usually, the entire team is
expected to be present during this meeting, including the product owner and the Scrum

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


master. The goal of this meeting is to develop realistic Sprint backlog and define the highest
priority tasks which need to be done during the length of each Sprint. 

Daily Scrum Meeting 

Daily Scrum meeting, or daily standups – as many people call them, are short 15 minutes
meetings which occur on daily basis. They are typically held at the same time and same
place every day and are strictly time boxed to no longer than 15 minutes. This ensures the
discussion to stay light, relevant, and quick.

 What did you accomplish yesterday?


 What are you working on today?
 Are there any impediments in your way?
 

Sprint Review Meeting

At the end of each Sprint, a Sprint Review meeting is held. The core objective of this
meeting is to demonstrate the functionality of the product and what has been achieved
during a particular Sprint. Generally, product owner, Scrum Master, and other stakeholders
are present to review the product. 

Sprint Retrospective Meeting

A retrospective is a meeting held after a product ships to discuss what happened during the
product development and release process, with the goal of improving things in the future
based on those learnings and conversations.

I Hope, these questions will help you in preparing for the Agile testing and methodology
interview.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Database & SQL Concepts

Database is a collection of related data and data is a collection of facts and figures that can be
processed to produce information.

Database management system stores data in such a way that it becomes easier to retrieve,
manipulate, and produce information.
3-tier Architecture
A 3-tier architecture separates its tiers from each other based on the complexity of the users
and
how they use the data present in the database. It is the most widely used architecture to design
a DBMS.
Database Data Tier − At this tier, the database resides along with its query processing
languages. We also have the relations that define the data and their constraints at this level.
Application Middle Tier − At this tier reside the application server and the programs that
access the database. For a user, this application tier presents an abstracted view of the
database. End-users are unaware of any existence of the database beyond the application.
At the other end, the database tier is not aware of any other user beyond the application tier.
Hence, the application layer sits in the middle and acts as a mediator between the end-user
and the database.
User Presentation Tier − End-users operate on this tier and they know nothing about any
existence of the database beyond this layer. At this layer, multiple views of the database can
be provided by the application. All views are generated by applications that reside in the
application tier.

Q #1) What is SQL?


Answer: Structured Query Language SQL is a database tool that is used to create and
access the database to support software applications.
Q #2) What are tables in SQL?
Answer: The table is a collection of record and its information at a single view.
Q #3) What are the different types of statements supported by SQL?
Answer:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


There are 3 types of SQL statements:
a) DDL (Data Definition Language): It is used to define the database structure such as
tables. It includes three statements such as CREATE, ALTER, DROP and Truncate.

Some of the DDL Commands are listed below:


CREATE: It is used for creating the table.
CREATE TABLE table_name

column_name1 data_type(size),

column_name2 data_type(size),

column_name3 data_type(size),

ALTER: The ALTER table is used for modifying the existing table object in the database.
ALTER TABLE table_name

 ADD column_name datatype

OR

ALTER TABLE table_name

DROP COLUMN column_name

b) DML (Data Manipulation Language): These statements are used to manipulate the


data in records. Commonly used DML statements are INSERT, UPDATE, and DELETE.
The SELECT statement is used as a partial DML statement, used to select all or relevant
records in the table.

c) DCL (Data Control Language): These statements are used to set privileges such as
GRANT and REVOKE database access permission to the specific user.
Q #4) How do we use the DISTINCT statement? What is its use?
Answer: The DISTINCT statement is used with the SELECT statement. If the record
contains duplicate values then the DISTINCT statement is used to select different values
among duplicate records.
Syntax:
SELECT DISTINCT column_name(s)

 FROM table_name;

Q #5) What are the different Clauses used in SQL?


Answer:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


WHERE Clause: This clause is used to define the condition, extract and display only those
records which fulfill the given condition.
Syntax:
SELECT column_name(s)

 FROM table_name

 WHERE condition;

GROUP BY Clause: It is used with SELECT statement to group the result of the executed
query using the value specified in it. It matches the value with the column name in tables
and groups the end result accordingly.

Syntax:
SELECT column_name(s)

 FROM table_name

 GROUP BY column_name;

HAVING clause: This clause is used in association with the GROUP BY clause. It is


applied to each group of results or the entire result as a single group. It is much similar as
WHERE clause but the only difference is you cannot use it without GROUP BY clause
Syntax:
SELECT column_name(s)

 FROM table_name

 GROUP BY column_name

 HAVING condition;

ORDER BY clause: This clause is used to define the order of the query output either in
ascending (ASC) or in descending (DESC). Ascending (ASC) is set as the default one but
descending (DESC) is set explicitly.
Syntax:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


SELECT column_name(s)

 FROM table_name

 WHERE condition

 ORDER BY column_name ASC|DESC;

USING clause: USING clause comes in use while working with SQL JOIN. It is used to
check equality based on columns when tables are joined. It can be used instead of the ON
clause in JOIN.
Syntax:
SELECT column_name(s)

 FROM table_name

 JOIN table_name

 USING (column_name);

Q #6) Why do we use SQL constraints? Which constraints we can use while creating
a database in SQL?
Answer: Constraints are used to set the rules for all records in the table. If any constraints
get violated then it can abort the action that caused it.
Constraints are defined while creating the database itself with the CREATE TABLE
statement or even after the table is created once with the ALTER TABLE statement.

There are 5 major constraints are used in SQL, such as


 NOT NULL: That indicates that the column must have some value and cannot be left
NULL.
 UNIQUE: This constraint is used to ensure that each row and column has a unique
value and no value is being repeated in any other row or column.
 PRIMARY KEY: This constraint is used in association with NOT NULL and UNIQUE
constraints such as on one or the combination of more than one column to identify
the particular record with a unique identity.
 FOREIGN KEY: It is used to ensure the referential integrity of data in the table. It
matches the value in one table with another using the PRIMARY KEY.
 CHECK: It ensures whether the value in columns fulfills the specified condition.
Q #7) What are different JOINS used in SQL?
Answer:

4 major types of Joins are used while working on multiple tables in SQL databases:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


INNER JOIN: It is also known as SIMPLE JOIN which returns all rows from BOTH tables
when it has at least one matching column.
Syntax:
SELECT column_name(s)

 FROM table_name1 

 INNER JOIN table_name2

 ON column_name1=column_name2;

For Example,
In this example, we have a table Employee with the following data:

The second table’s name is Joining.

Enter the following SQL statement:


SELECT Employee.Emp_id, Joining.Joining_Date

  FROM Employee

  INNER JOIN Joining

  ON Employee.Emp_id = Joining.Emp_id

  ORDER BY Employee.Emp_id;

There will be 4 records selected. Results are:

Employee and Orders tables have a matching customer_id value.


LEFT JOIN (LEFT OUTER JOIN): This join returns all rows from the LEFT table and its
matched rows from a RIGHT table.
Syntax:
SELECT column_name(s)

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 FROM table_name1

 LEFT JOIN table_name2

 ON column_name1=column_name2;

For Example,
In this example, we have a table Employee with the following data:

The second table’s name is Joining.

Enter the following SQL statement:


SELECT Employee.Emp_id, Joining.Joining_Date

FROM Employee

LEFT OUTER JOIN Joining

ON Employee.Emp_id = Joining.Emp_id

ORDER BY Employee.Emp_id;

There will be 4 records selected. You will see the following results:

RIGHT JOIN (RIGHT OUTER JOIN): This joins returns all rows from the RIGHT table and
its matched rows from the LEFT table.
Syntax:
SELECT column_name(s)

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


FROM table_name1

RIGHT JOIN table_name2

ON column_name1=column_name2;

For Example,
In this example, we have a table Employee with the following data:

The second table’s name is Joining.

Enter the following SQL statement:


SELECT Employee.Emp_id, Joining.Joining_Date FROM Employee

RIGHT JOIN Joining

ON Employee.Emp_id = Joining.Emp_id

ORDER BY Employee.Emp_id;

Output:
Emp_id Joining_Date

E0012 2016/04/18

E0013 2016/04/19

E0014 2016/05/01

FULL JOIN (FULL OUTER JOIN): This joins returns all results when there is a match either
in the RIGHT table or in the LEFT table.
Syntax:
SELECT column_name(s)

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 FROM table_name1

 FULL OUTER JOIN table_name2

 ON column_name1=column_name2;

For Example,
In this example, we have a table Employee with the following data:

The second table’s name is Joining.

Enter the following SQL statement:


SELECT Employee.Emp_id, Joining.Joining_Date

FROM Employee

FULL OUTER JOIN Joining

ON Employee.Emp_id = Joining.Emp_id

ORDER BY Employee.Emp_id;

There will be 8 records selected. These are the results that you should see.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #8) What are transactions and their controls?
Answer: A transaction can be defined as the sequence task that is performed on databases
in a logical manner to gain certain results. Operations like Creating, updating, deleting
records performed in the database come from transactions.
In simple words, we can say that a transaction means a group of SQL queries executed on
database records.

There are 4 transaction controls such as


 COMMIT: It is used to save all changes made through the transaction.
 ROLLBACK: It is used to roll back the transaction. All changes made by the
transaction are reverted back and the database remains as before.
 SET TRANSACTION: Set the name of the transaction.
 SAVEPOINT: It is used to set the point where the transaction is to be rolled back.
Q #9) What are the properties of the transaction?
Answer: Properties of the transaction are known as ACID properties. These are:
 Atomicity: Ensures the completeness of all transactions performed. Checks whether
every transaction is completed successfully or not. If not, then the transaction is
aborted at the failure point and the previous transaction is rolled back to its initial
state as changes are undone.
 Consistency: Ensures that all changes made through successful transactions are
reflected properly on the database.
 Isolation: Ensures that all transactions are performed independently and changes
made by one transaction are not reflected on others.
 Durability: Ensures that the changes made in the database with committed
transactions persist as it is even after a system failure.

Q #10) How many Aggregate functions are available in SQL?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Answer: SQL Aggregate functions determine and calculate values from multiple columns in
a table and return a single value.
There are 7 aggregate functions in SQL:
 AVG(): Returns the average value from specified columns.
 COUNT(): Returns number of table rows.
 MAX(): Returns the largest value among the records.
 MIN(): Returns smallest value among the records.
 SUM(): Returns the sum of specified column values.
 FIRST(): Returns the first value.
 LAST(): Returns last value.

Q #11) What are Scalar functions in SQL?


Answer: Scalar functions are used to return a single value based on the input values.
Scalar Functions are as follows:
 UCASE(): Converts the specified field in the upper case.
 LCASE(): Converts the specified field in lower case.
 MID(): Extracts and returns character from the text field.
 FORMAT(): Specifies the display format.
 LEN(): Specifies the length of the text field.
 ROUND(): Rounds up the decimal field value to a number.

Q #12) What are triggers?


Answer: Triggers in SQL is kind of stored procedures used to create a response to a
specific action performed on the table such as INSERT, UPDATE or DELETE. You can
invoke triggers explicitly on the table in the database.
Action and Event are two main components of SQL triggers. When certain actions are
performed, the event occurs in response to that action.

Syntax:
CREATE TRIGGER name {BEFORE|AFTER} (event [OR..]}

ON table_name [FOR [EACH] {ROW|STATEMENT}]

EXECUTE PROCEDURE functionname {arguments}

Q #13) What is View in SQL?


Answer: A View can be defined as a virtual table that contains rows and columns with fields
from one or more tables.
Syntax:
CREATE VIEW view_name AS

SELECT column_name(s)

FROM table_name

WHERE condition

Q #14) How we can update the view?


Answer: SQL CREATE and REPLACE can be used for updating the view.
Execute the below query to update the created view.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Syntax:
CREATE OR REPLACE VIEW view_name AS

 SELECT column_name(s)

 FROM table_name

 WHERE condition

Q #15) Explain the working of SQL Privileges?


Answer: SQL GRANT and REVOKE commands are used to implement privileges in SQL
multiple user environments. The administrator of the database can grant or revoke
privileges to or from users of database objects by using commands like SELECT, INSERT,
UPDATE, DELETE, ALL, etc.
GRANT Command: This command is used to provide database access to users other than
the administrator.
Syntax:
GRANT privilege_name

 ON object_name

 TO {user_name|PUBLIC|role_name}

 [WITH GRANT OPTION];

In the above syntax, the GRANT option indicates that the user can grant access to another
user too.

REVOKE command: This command is used to provide database deny or remove access to
database objects.
Syntax:
REVOKE privilege_name

 ON object_name

 FROM {user_name|PUBLIC|role_name};

Q #16) How many types of Privileges are available in SQL?


Answer: There are two types of privileges used in SQL, such as
 System privilege: System privilege deals with the object of a particular type and
provides users the right to perform one or more actions on it. These actions include
performing administrative tasks, ALTER ANY INDEX, ALTER ANY CACHE GROUP
CREATE/ALTER/DELETE TABLE, CREATE/ALTER/DELETE VIEW etc.
 Object privilege: This allows to perform actions on an object or object of another
user(s) viz. table, view, indexes etc. Some of the object privileges are EXECUTE,
INSERT, UPDATE, DELETE, SELECT, FLUSH, LOAD, INDEX, REFERENCES etc.
Q #17) What is SQL Injection?
Answer: SQL Injection is a type of database attack technique where malicious SQL
statements are inserted into an entry field of database in a way that once it is executed, the
database is exposed to an attacker for the attack. This technique is usually used for
attacking data-driven applications to have access to sensitive data and perform
administrative tasks on databases.
For Example,

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


SELECT column_name(s) FROM table_name WHERE condition;

Q #18) What is SQL Sandbox in SQL Server?


Answer: SQL Sandbox is a safe place in the SQL server environment where untrusted
scripts are executed. There are 3 types of SQL sandbox:
 Safe Access Sandbox: Here a user can perform SQL operations such as creating
stored procedures, triggers etc. but cannot have access to the memory as well as
cannot create files.
 External Access Sandbox: Users can access files without having the right to
manipulate the memory allocation.
 Unsafe Access Sandbox: This contains untrusted codes where a user can have
access to memory.
Q #19) What is the difference between SQL and PL/SQL?
Answer: SQL is a Structured Query Language to create and access databases whereas
PL/SQL comes with procedural concepts of programming languages.
Q #20) What is the difference between SQL and MySQL?
Answer: SQL is a Structured Query Language that is used for manipulating and accessing
the relational database. On the other hand, MySQL itself is a relational database that uses
SQL as the standard database language.
Q #21) What is the use of the NVL function?
Answer: NVL function is used to convert the null value to its actual value.
Q #22) What is the Cartesian product of the table?
Answer: The output of Cross Join is called a Cartesian product. It returns rows combining
each row from the first table with each row of the second table. For Example, if we join two
tables having 15 and 20 columns the Cartesian product of two tables will be 15×20=300
rows.
Q #23) What do you mean by Subquery?
Answer: Query within another query is called as Subquery. A subquery is called inner
query which returns output that is to be used by another query.
Q #24) How many row comparison operators are used while working with a
subquery?
Answer: There are 3-row comparison operators that are used in subqueries such as IN,
ANY and ALL.
Q #25) What is the difference between clustered and non-clustered indexes?
Answer: The differences between the two are as follows:
 One table can have only one clustered index but multiple non-clustered indexes.
 Clustered indexes can be read rapidly rather than non-clustered indexes.
 Clustered indexes store data physically in the table or view whereas, non-clustered
indexes do not store data in the table as it has separate structure from the data row.
Q #26) What is the difference between DELETE and TRUNCATE?
Answer: The differences are:
 The basic difference in both is DELETE command is DML command and the
TRUNCATE command is DDL.
 DELETE command is used to delete a specific row from the table whereas the
TRUNCATE command is used to remove all rows from the table.
 We can use the DELETE command with WHERE clause but cannot use the
TRUNCATE command with it.
Q #27) What is the difference between DROP and TRUNCATE?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Answer: TRUNCATE removes all rows from the table which cannot be retrieved back,
DROP removes the entire table from the database and it also cannot be retrieved back.
Q #28) How to write a query to show the details of a student from Students table
whose
name start with K?
Answer: Query:
SELECT * FROM Student WHERE Student_Name like ‘K%’;

Here ‘like’ operator is used to perform pattern matching.

Q #29) What is the difference between Nested Subquery and Correlated Subquery?
Answer: Subquery within another subquery is called Nested Subquery.  If the output of a
subquery depends on column values of the parent query table then the query is called
Correlated Subquery.
SELECT adminid(SELEC Firstname+' '+Lastname  FROM Employee WHERE

 empid=emp. adminid)AS EmpAdminId FROM Employee;

The result of the query is the details of an employee from the Employee table.

Q #30) What is Normalization? How many Normalization forms are there?


Answer: Normalization is used to organize the data in such a manner that data redundancy
will never occur in the database and avoid insert, update and delete anomalies.
There are 5 forms of Normalization:
 First Normal Form (1NF): It removes all duplicate columns from the table. It creates
a table for related data and identifies unique column values.
 First Normal Form (2NF): Follows 1NF and creates and places data subsets in an
individual table and defines the relationship between tables using the primary key.
 Third Normal Form (3NF): Follows 2NF and removes those columns which are not
related through the primary key.
 Fourth Normal Form (4NF): Follows 3NF and does not define multi-valued
dependencies. 4NF is also known as BCNF.
Q #31) What is a Relationship? How many types of Relationships are there?
Answer: The relationship can be defined as the connection between more than one table in
the database.
There are 4 types of relationships:
 One to One Relationship
 Many to One Relationship
 Many to Many Relationship
 One to Many Relationship
Q #32) What do you mean by Stored Procedures? How do we use it?
Answer: A stored procedure is a collection of SQL statements that can be used as a
function to access the database. We can create these stored procedures earlier before
using it and can execute them wherever required by applying some conditional logic to it.
Stored procedures are also used to reduce network traffic and improve performance.
Syntax:
CREATE Procedure Procedure_Name

 (

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 //Parameters

 )

 AS

 BEGIN

 SQL statements in stored procedures to update/retrieve records

 END

Q #33) State some properties of Relational databases?


Answer: Properties are as follows:
 In relational databases, each column should have a unique name.
 The sequence of rows and columns in relational databases is insignificant.
 All values are atomic and each row is unique.
Q #34) What are Nested Triggers?
Answer: Triggers may implement data modification logic by using INSERT, UPDATE, and
DELETE statements. These triggers that contain data modification logic and find other
triggers for data modification are called Nested Triggers.
Q #35) What is a Cursor?
Answer: A cursor is a database object which is used to manipulate data in a row-to-row
manner.
Cursor follows steps as given below:
 Declare Cursor
 Open Cursor
 Retrieve row from the Cursor
 Process the row
 Close Cursor
 Deallocate Cursor
Q #36) What is Collation?
Answer: Collation is a set of rules that check how the data is sorted by comparing it. Such
as character data is stored using correct character sequence along with case sensitivity,
type, and accent.
Q #37) What do we need to check in Database Testing?
Answer: In Database testing, the following thing is required to be tested:
 Database connectivity
 Constraint check
 Required application field and its size
 Data Retrieval and processing with DML operations
 Stored Procedures
 Functional flow
Q #38) What is Database White Box Testing?
Answer: Database White Box testing involves:
 Database Consistency and ACID properties
 Database triggers and logical views
 Decision Coverage, Condition Coverage, and Statement Coverage
 Database Tables, Data Model, and Database Schema
 Referential integrity rules

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #39) What is Database Black Box Testing?
Answer: Database Black Box testing involves:
 Data Mapping
 Data stored and retrieved
 Use of Black Box testing techniques such as Equivalence Partitioning and Boundary
Value Analysis (BVA)
Q #40) What are Indexes in SQL?
Answer: The index can be defined as the way to retrieve the data more quickly. We can
define indexes using CREATE statements.
Syntax:
CREATE INDEX index_name

 ON table_name (column_name)

Further, we can also create a Unique Index using the following syntax:

CREATE UNIQUE INDEX index_name

 ON table_name (column_name)

UPDATE: We have added few more short questions for practice.


Q #41) What does SQL stand for?
Answer: SQL stands for Structured Query Language.
Q #42) How to select all records from the table?
Answer: To select all the records from the table we need to use the following syntax:
Select * from table_name;

Q #43) Define join and name different types of joins?


Answer: Join keyword is used to fetch data from two or more related tables. It returns rows
where there is at least one match in both the tables included in the join. Read more here.
Type of joins are:
1. Right join
2. Outer join
3. Full join
4. Cross join
5. Self join.
Q #44) What is the syntax to add a record to a table?
Answer: To add a record in a table INSERT syntax is used.
For Example,
INSERT into table_name VALUES (value1, value2..);

Q #45) How do you add a column to a table?


Answer: To add another column in the table, use the following command:
ALTER TABLE table_name ADD (column_name);

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Recommended reading =>> How to add a column to a table in MySQL
Q #46) Define the SQL DELETE statement.
Answer: DELETE is used to delete a row or rows from a table based on the specified
condition.
The basic syntax is as follows:
DELETE FROM table_name

WHERE <Condition>

Q #47) Define COMMIT?


Answer: COMMIT saves all changes made by DML statements.
Q #48) What is the Primary key?
Answer: A Primary key is a column whose values uniquely identify every row in a table.
Primary key values can never be reused.
Q #49) What are Foreign keys?
Answer: When a table’s primary key field is added to related tables in order to create the
common field which relates the two tables, it called a foreign key in other tables. Foreign
key constraints enforce referential integrity.
Q #50) What is CHECK Constraint?
Answer: A CHECK constraint is used to limit the values or type of data that can be stored
in a column. They are used to enforce domain integrity.
Q #51) Is it possible for a table to have more than one foreign key?
Answer: Yes, a table can have many foreign keys but only one primary key.
Q #52) What are the possible values for the BOOLEAN data field?
Answer: For a BOOLEAN data field, two values are possible: -1(true) and 0(false).
Q #53) What is a stored procedure?
Answer: A stored procedure is a set of SQL queries that can take input and send back
output.
Q #54) What is identity in SQL?
Answer: An identity column in where SQL automatically generates numeric values. We can
define a start and increment value of the identity column.
Q #55) What is Normalization?
Answer: The process of table design to minimize the data redundancy is called
normalization. We need to divide a database into two or more table and define the
relationship between them.
Q #56) What is a Trigger?
Answer: The Trigger allows us to execute a batch of SQL code when table event occurs
(INSERT, UPDATE or DELETE commands are executed against a specific table).
Q #57) How to select random rows from a table?
Answer: Using a SAMPLE clause we can select random rows.
For Example,
SELECT * FROM table_name SAMPLE(10);

Q #58) Which TCP/IP port does SQL Server run?


Answer: By default SQL Server runs on port 1433.
Q #59) Write a SQL SELECT query that only returns each name only once from a
table?
Answer: To get the result as each name only once, we need to use the DISTINCT
keyword.
SELECT DISTINCT name FROM table_name;

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #60) Explain DML and DDL?
Answer: DML stands for Data Manipulation Language. INSERT, UPDATE and DELETE 
are DML statements.
DDL stands for Data Definition Language. CREATE, ALTER, DROP, RENAME are DDL
statements.

Q #61) Can we rename a column in the output of the SQL query?


Answer: Yes, using the following syntax we can do this.
SELECT column_name AS new_name FROM table_name;

Q #62) Give the order of SQL SELECT?


Answer: Order of SQL SELECT clauses is: SELECT, FROM, WHERE, GROUP BY,
HAVING, ORDER BY. Only the SELECT and FROM clauses are mandatory.
Q #63) Suppose a Student column has two columns, Name and Marks. How to get
names and marks of the top three students.
Answer: SELECT Name, Marks FROM Student s1 where 3 <= (SELECT COUNT(*) FROM
Students s2 WHERE s1.marks = s2.marks)
Q #64) What is SQL comments?
Answer: SQL comments can be inserted by adding two consecutive hyphens (–).
Q #65) Difference between TRUNCATE, DELETE and DROP commands?
Answer:
 DELETE removes some or all rows from a table based on the condition. It can be
rolled back.
 TRUNCATE removes ALL rows from a table by de-allocating the memory pages.
The operation cannot be rolled back
 DROP command removes a table from the database completely.
Q #66) What are the properties of a transaction?
Answer: Generally, these properties are referred to as ACID properties. They are:
1. Atomicity
2. Consistency
3. Isolation
4. Durability.
Q #67) What do you mean by ROWID?
Answer: It’s an 18 character long pseudo column attached with each row of a table.
Q #68) Define UNION, MINUS, UNION ALL, INTERSECT?
Answer:
 MINUS – returns all distinct rows selected by the first query but not by the second.
 UNION – returns all distinct rows selected by either query
 UNION ALL – returns all rows selected by either query, including all duplicates.
 INTERSECT – returns all distinct rows selected by both queries.
Q #69) What is a transaction?
Answer: A transaction is a sequence of code that runs against a database. It takes the
database from one consistent state to another.
Q #70) What is the difference between UNIQUE and PRIMARY KEY constraints?
Answer: The differences are as follows:
 A table can have only one PRIMARY KEY whereas there can be any number of
UNIQUE keys.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 The primary key cannot contain Null values whereas the Unique key can contain Null
values.
Q #71) What is a composite primary key?
Answer: The primary key created on more than one column is called composite primary
key.
Q #72) What is an Index?
Answer: An Index is a special structure associated with a table to speed up the
performance of queries. The index can be created on one or more columns of a table.
Q #73) What is the Subquery?
Answer: A Subquery is a subset of select statements whose return values are used in
filtering conditions of the main query.
Q #74) What do you mean by query optimization?
Answer: Query optimization is a process in which a database system compares different
query strategies and select the query with the least cost.
Q #75) What is Collation?
Answer: Set of rules that define how data is stored, how case-sensitivity and Kana
character can be treated etc.
Q #76) What is Referential Integrity?
Answer: Set of rules that restrict the values of one or more columns of the tables based on
the values of the primary key or unique key of the referenced table.
Q #77) What is the Case function?
Answer: Case facilitates if-then-else type of logic in SQL. It evaluates a list of conditions
and returns one of the multiple possible result expressions.
Q #78) Define a temp table?
Answer: A temp table is a temporary storage structure to store the data temporarily.
Q #79) How can we avoid duplicating records in a query?
Answer: By using the DISTINCT keyword, duplication of records in a query can be avoided.
Q #80) Explain the difference between Rename and Alias?
Answer: Rename is a permanent name given to a table or column whereas Alias is a
temporary name given to a table or column.
Q #81) What is a View?
Answer: A view is a virtual table that contains data from one or more tables. Views restrict
data access of the table by selecting only required values and make complex queries easy.
Q #82) What are the advantages of Views?
Answer: Advantages of Views are:
 Views restrict access to the data because the view can display selective columns
from the table.
 Views can be used to make simple queries to retrieve the results of complicated
queries. For Example, views can be used to query information from multiple tables
without the user knowing.
Q #83) List the various privileges that a user can grant to another user?
Answer:  SELECT, CONNECT, RESOURCES.
Q #84) What is schema?
Answer: A schema is a collection of database objects of a User.
Q #85) What is a Table?
Answer: A table is the basic unit of data storage in the database management system.
Table data is stored in rows and columns.
Q #86) Does View contain Data?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Answer: No, Views are virtual structures.
Q #87) Can a View based on another View?
Answer: Yes, A View is based on another View.
Q #88) What is the difference between the HAVING clause and WHERE clause?
Answer: Both specify a search condition but Having clause is used only with the SELECT
statement and typically used with GROUP BY clause.
If GROUP BY clause is not used then Having behaved like WHERE clause only.
Q #89) What is the difference between Local and Global temporary tables?
Answer: If defined inside a compound statement a local temporary table exists only for the
duration of that statement but a global temporary table exists permanently in the DB but its
rows disappear when the connection is closed.
Q #90) What is CTE?
Answer: A CTE or common table expression is an expression that contains temporary
result set which is defined in a SQL statement.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Test Automation Interview Questions and Answers
This section focuses on Test Automation Interview Questions and Answers. Rather than
being tool specific, e.g. QTP or Selenium, WebDriver, the questions are more about the
approach to test automation.

What criteria do you consider for automating a test?


I would consider the following points to help me decide if a test should be automated:

 How often does the test need to be executed? i.e. is that going to be a regression test?
Sometimes the test will need to be executed once, but with a large set of data.

 How much time does automating this test will save me so that I can use my time in
exploratory testing.

 How important is the test to the business; i.e. is the test scenario a typical user journey
through the application.

 How complex is it to automate the test and how likely is it that the complexity doesn’t
cause many false positives which increases results analysis time?

 How likely is it that this test catches a defect?

 How likely is it that a feature or functionality will break and what is the impact of it on
the business? If it is high impact, then it should be automated to ensure it passes from
release to release

What kind of tests should NOT be automated?


This interview question is similar to the previous question but focuses on which tests
Not to be automated and left for manual testing. Possible answers can be:

 Usability Testing – at times this can be an impossible task to perform by automation as


the computer cannot efficiently judge if the system is of any use to its users.

 Tests that only need to be executed once – unless the same test needs to be executed
for a large dataset then it makes sense to automate.

 Tests without predictable results – test automation should give us confidence in the
results of the tests. If there are intermittent failures then the tests cannot be reliable and
cannot be dependent on.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Tests that need to be verified visually.

 Tests that need to be executed quickly. At first, writing an automated test takes longer. If
we want a quick check, we should test manually, however, if that test is a good one which
should be run regularly, then it should be automated in time

What are Pros and Cons of automating tests at UI layer?


Pros:

 UI automated tests execute in a way that simulates a user interacting with the system. So
it is very good for validating user journeys and flows

 Can cover end-to-end flows that communicate with 3rd party systems

 Because tests are run against the system, they can be shown to the customer who can
understand what tests are run

 Can catch high severity or showstopper bugs

 Can check UI functionality where it is not possible to test otherwise

Cons:

 UI automated tests can be very brittle (i.e. fail due to UI changes even though
functionality hasn’t changed).

 Slow feedback to the team. Execution is slow as you have to wait for the system to
launch and connections with 3rd party system can take a long time.

 Limitation on what can be checked from the UI. There is some information that is not
present from the UI.

 Because tests are slow from UI, we can’t have a lot of tests running against the UI.

 Can be time-consuming to construct automated test scripts for the UI.

 Usually, have to depend on a 3rd party tool or vendor for UI testing

Why would you want to automate a test? Is it to:


 Increase test coverage?

 Improve quality?

 Save time for exploratory testing?

 Find more bugs?

 Replace manual testers?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


This is a common test automation interview question and answer to this is quite
straightforward. Although some of the above reasons seem plausible, the main
reason why you would want to automate a test is that you want to repeat the same
test many times.

Web Testing Interview Questions


In this section, we discuss some common Web Testing Interview Questions and Answers.
These questions are specific to web testing.

How do you test the login feature of a web application?


This is a very common software testing interview question and the aim is to see how
broad you can think about the feature. Most interviewees start with the obvious answer
of checking input fields with positive and negative values, invalid email, valid email but
incorrect password, SQL injection, etc. But most of these tests can be done and should
be done by the developers as part of integration testing.

Here the focus is on testing at the system level, tests which cannot be done without a
fully integrated system.

Possible answers to this testing interview question can be:

 Sign in with valid login, Close browser and reopen and see whether you are still logged
in or not.

 Session management is important – how do we keep track of logged in users, is it via


cookies or web sessions?

 Sign in, then log out and then go back to the login page to see if you are truly logged
out.

 Log in, then go back to the same page, do you see the login screen again?

 Sign in with one browser, then open another browser to see if you need to sign in again?

 Log in, change the password, and then log out, then see if you can log in again with the
old password.

What Types of Testing is Specifically Important for Web Testing?


This is also an important Software Testing interview question for web application testing
roles. Note, this question is asking about the types of testing.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Although you would do functional testing, usability testing, accessibility testing, etc,
these are all also applicable to desktop application testing. The question is asking
specifically for web testing.

Two types of testing which are very important for testing web applications
are Performance Testing and Security Testing. The difference between a web application
and desktop application is that web applications are open to the world, with potentially
many users accessing the application simultaneously at various times, so load testing
and stress testing are important.

Web applications are also vulnerable to all forms of attacks, mostly DDOS, so security
testing is also very important to consider when testing web applications.

How do You Verify the Results of Your Search on Search Results


Page?
This is another common Software Testing Interview Question for e-commerce
testing roles. This question refers to verifying the results are what we expect to see.

Suppose you search for a product on Amazon.com website. On the search results page,
you will see a list of items related to your search. How can you verify that the results that
you see are really the ones that you are supposed to see?

The answer to this question is rather simple. At first instance, we need to know where
the data is coming from. Are they coming from a database? Or some XML files from 3rd
party websites?

Once we have this information, we can start comparing the results we see on the result
page with the results from the source, e.g. database.

Another option is to use mocks to generate the data that we need so we can fully
control the data that we see on the search results page.

How is Web Application Testing different to Desktop


Application Testing?
Web Applications are typically hosted on a server which we can access via a web
browser, whereas desktop applications are installed on the client’s machine.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


This setup opens a lot of new testing challenges: Performance and Security testing
become important as the application is open to a wide audience. Good design and
usability are also important.

Other important factors that come to play are testing on multiple browsers, multiple
devices, redirection, and responsiveness.

Also, we should not forget about Javascript, CSS, Cookies, W3C standards, traffic
monitoring, third-party tags testing, all of which are important in Web Application
Testing.

There is a login form which is connected to an Authentication


Web Service. What tests would you perform at which layer?
 All the input/output validation should be tested at the API layer calling the
Authentication Web Service. Tests such as valid/invalid username/password combinations
as well as verifying correct error messages.

 The location of the display of error messages, their color and font should be tested at
login web page. Also, if applicable, Javascript and Cookie tests needs to be tested at front-
end login page.

There are many ways to test a website and there could be lots
of test cases to execute, how can you make sure the web
application is fit for release?
 We can Automate majority of test cases, but most importantly we can use test
techniques such as Pair-wise testing to reduce combinations and/or model-based testing
to plan user journeys to ensure major functionality of web application works.

 We can also use analytics to gain insight into what users do on the website, which page
is most popular and which feature is most used by users.

API Testing
Many of the new modern web applications are built using web-services, micro-services,
and APIs. As testers, we should be knowledgeable and experienced in testing APIs and
Web Services.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Here are some fundamental API Testing Interview Questions mainly aimed at software
testers.

Q #1) What is API Testing?


Answer: API is a collection of routines, tools, protocols that together are required for
building the software application. Any system software or application software which
consists of multiple APIs can perform Application Programming Interface (API) testing.
This form of testing includes interaction between various or says multiple APIs as well as
the interaction between API and application program. The procedure mainly includes
making API calls using software and observing system response after receiving the output.

Q #2) Enlist some common tests that are performed on APIs.


Answer: There can be multiple reasons for performing API testing.
Let us see some common test examples, where this form of testing is used to verify:
 Any data structure updated by API which requires proper validation.
 Input condition-based return values.
 Call to another API or if any other event is triggered or some interruption is raised.
 The return values can also be null or wrong results.
 Modification of some resources like an update of the database, process killing, etc.
Q #3) What is the API test environment?
Answer: Setting up a test environment of API is a complex method where the configuration
of the server and database is done as per the requirement of the software application.
Graphical User Interface (GUI) is not available in this form of testing.
After installation, API is verified for its proper functioning. In this process initial environment
that invokes API is being set up with a defined set of parameters so that test results can be
examined.

Q #4) Explain the API testing approach.


Answer: Mentioned below are the factors which determine the approach:
 Write appropriate test cases for the APIs and use testing techniques like boundary
value analysis, equivalence class, etc. for verifying the functionality.
 Verify the calls of the combination of two or more value-added parameters.
 Define the scope and basic functionality of the API program.
 Define the accurate input parameters.
 Test case execution and comparison of the results with expected results.
 Determining API behavior under conditions like the connection with files, etc.
Q #5) Explain in brief the different types of output observed of an API.
Answer: API is considered as the essential connecting part of this digital world. It basically
resides in the business logic layer where it performs functions like processing commands,
application coordination, initiates logical decisions, etc.
The main consideration is returning correct results under any type of conditions. Mainly, the
output or results observed of an API are divided into three sections as follows:

 Returning the result status values as ‘Pass’ or ‘Fail’.


 Result as data or any specific information.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 An event where the call to any API function will initiate the call to another API
function.
Q #6) Enlist some best practices that are followed to make API testing successful.
Answer: Performing tests repeatedly define some best practices for making testing
successful.
Enlisted below are some best practices for API testing:
 Test cases should be grouped under category with expected results that happen
consistently and other typical results.
 Test cases should include selected parameters as well as API call declarations.
 API load tests are performed to determine system application stress.
 Maintain the limits of the variables used in the tests as well as avoid ‘Test Chaining’.
 To make ease for the testers, API call is being prioritized and call sequencing is
planned.
 Every input combination and dependencies are considered for complete test
coverage.
 Automation of the test cases, documentation is done as and when required.
Q #7) What are the tools used for API testing?
Answer: Best API Testing tools:
 SOAPUI
 Runscope
 LOADUI
 Automated API testing
 Curl
There are a few more others than the above-listed tools that are used for API testing.

Q #8) What are the tools used for API test automation?
Answer: Automation testing is a must when we talk about agile development in API testing.
However, the language in which the code is written is also an important factor as it decides
the tool language.
Some important API test automation tools are:
 SOAPUI: It is an open-source API testing tool which is considered as the best
testing tool because of its feature like creating complex validation scripts and test
cases, efficient test coverage, etc.
 HP QTP/UFT: This is now known as HP UFT i.e. Unified Functional Testing. This
tool is basically used for systems without user interface like web services, etc.
 PARASOFT: This testing tool runs on various platforms and is used to test API
which does not have a Graphical User interface (GUI).
 HTTP master
 NUnit and JUnit testing tools are used where the code is written in .Net and Java
respectively.
Q #9) What is the API framework?
Answer: API framework is described by the config file which consists of the list of all APIs
that are required to be activated and are activated for any particular program run. This is
essential as every test run does not require all APIs.
The purpose of the ‘Config’ file is to describe and enlist every configurable component
within a test run.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #10) Explain API documentation.
Answer: As it is a well aware fact that, for any foundation, there has to be good
documentation. API documentation likewise, serves as a quick reference for accessing the
library or working within a program.
When we go through any such documents, it must consist of a proper plan, content source,
proper layout or sketch for delivery, information related to each function, etc.

API documentation tools are:


 JavaDoc
 Doxygen
Enlisted below are the categories in which every function is being documented which
mainly revolve around the parameters:
 Function description
 Sequence, syntax, and elements required for each parameter.
 Syntax and type of error message that can occur.
 Links related to functions.
Q #11) Name some most used templates for API documentation.
Answer: Some free templates which makes API documentation much easier and
simple are:
 Slate
 FlatDoc
 Swagger
 API blueprint
 RestDoc
 Miredot
 Web service API Specification.
Q #12) Enlist some of the API examples which are very well known and popular.
Answer: There are several such examples. Enlisted below are some most popular
ones:
 Google Maps API: These are designed mainly for mobile and desktop use with the
help of a flash interface and JavaScript.
 Amazon Advertising API: Amazon is known for their products and thus their
advertising API accesses their product to discover their functionality and thus
advertise accordingly.
 Twitter: The API for twitter is usually in two categories, one for accessing data and
the other for interacting with the twitter search.
 YouTube: This API used for YouTube includes various functionalities including
videos, live streaming, player, etc.
Q #13) What are the testing methods that come under API testing?
Answer: API testing generally involves the following testing methods:
 Unit testing and Functional testing
 Load testing for testing the performance under load.
 Discovery testing for listing, creating and deleting the number of calls that have been
documented in API.
 Usability testing and Reliability testing for obtaining consistent results.
 Security testing and Penetration testing for validating all types of authentication.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Automation testing for creating and executing scripts that require API calls execution
regularly.
 End to end Integration testing and Web UI testing.
 API documentation testing for determining its efficiency and effectiveness.
Q #14) Differentiate API testing and Unit Testing.
Answer: The difference between API testing and Unit testing can be understood from the
below table:
UNIT testing API Testing

Unit testing is usually performed by developers API testing is performed by the testers for end to
where every functionality is tested separately. end testing of the functionality.

As they have the limited scope of testing, thus basic As they have the broader scope of testing, all
functionalities are only considered for testing. issues that are functional are considered for
testing.

It is a form of white box testing. It is a form of black box testing.

Usually, unit testing is done before the code is API testing is performed after the build is ready for
included in the build. testing.

The Source code is involved in this form of testing. Source code is not involved in this form of testing.

Q #15) What challenges are included under API testing?


Answer: Challenges are the part of every form of testing and the same goes with API
testing too.
Mentioned below are some common challenges that are faced in API testing:
 The first and foremost challenge is selecting an appropriate parameter and then its
combination.
 Parameter categorization
 Proper sequencing of call is required as this may lead to inadequate coverage in
testing.
 Output verification and validation
 Another important challenge is providing input values, which is very difficult as GUI is
not available in this case.
Q #16) What are the types of issues observed while performing API testing?
Answer: When testing is performed, then there have to be issues associated with them.
Issues observed while performing this form of testing are not new or much different but they
are common in this category.
Find below the list of such issues/defects:
 Inconsistent or absence of error handling mechanism
 Repetition or redundancy of the functionalities
 Missing required functionality in some cases
 Passing incorrect argument to the input values

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Improper messaging
 Stress and performance issues
 Reliability issues with respect to connection with other APIs
 Multithreading and improper handling issues.
Q #17) Why API testing is determined as the most suitable form for Automation
testing?
Answer: Yes, it’s true that API testing is now preferred over GUI testing and is considered
as most suitable.
Below are the few reasons behind this statement.
 Verify all the functional paths of the system under test very effectively.
 Provides the most stable interface.
 Easier to maintain and provides fast feedback.
Q #18) How is UI level testing different from API testing?
Answer: The main consideration of the UI (User Interface) level testing is to test the
graphical interface part of the application include features like font, layout, etc.
Whereas, the main consideration of the API testing is establishing communication between
different software systems and it mainly resides in business logic layer. It never
concentrates on the look of the application.

Q #19) What is TestApi?


Answer: TestApi is known as the library of test building blocks which are essential for
developers and testers for creating testing tools as well as automated test suites.
Q #20) What do you know about API errors and warnings?
Answer: When something goes wrong i.e. the outcome is not as expected then the error
occurs and warnings are described as a message in the proper format. There can be one or
multiple warnings within the same module.
Different types of warnings that can occur are:
 Parameter validation warning
 Missing module warning
Different types of errors that can occur are:
 Documentation errors
 Missing module errors
 Parameter validation errors
 Some standard error messages.

Q #21) What are HTTP Request and HTTP Response?

An HTTP request method is made up of four components:

 Request Method – Get, Post, Put, Delete (these are the common ones)

 Request URI – the URL of the resource

 Request Header – Accept-Language, Accept-Encoding, User-Agent, Host

 Request Body – this is the data to be sent to the resource

An HTTP response method is made up of three components:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Response Status Code – 200, 301, 404, 500 (these are the most common ones)

 Response Header Fields – Date, Server, Last-Modified, Content-Type

 Response Body – this is the data that comes back to the client from the server

 Hope this article will be very helpful for your API Testing interview preparation.

Selenium WebDriver
Q #1) What is Automation Testing?
Automation testing or Test Automation is a process of automating the manual process to
test the application/system under test. Automation testing involves the use of a separate
testing tool which lets you create test scripts which can be executed repeatedly and doesn’t
require any manual intervention.

Q #2) What are the benefits of Automation Testing?


Benefits of Automation testing are:

1. Supports execution of repeated test cases


2. Aids in testing a large test matrix
3. Enables parallel execution
4. Encourages unattended execution
5. Improves accuracy thereby reducing human-generated errors
6. Saves time and money
Q #3) Why should Selenium be selected as a test tool?
Selenium

1. is a free and open source


2. have a large user base and helping communities
3. have cross Browser compatibility (Firefox, Chrome, Internet Explorer, Safari etc.)
4. have great platform compatibility (Windows, Mac OS, Linux etc.)
5. supports multiple programming languages (Java, C#, Ruby, Python, Pearl etc.)
6. has fresh and regular repository developments
7. supports distributed testing
Q #4) What is Selenium? What are the different Selenium components?
Selenium is one of the most popular automated testing suites. Selenium is designed in a
way to support and encourage automation testing of functional aspects of web-based
applications and a wide range of browsers and platforms. Due to its existence in the open
source community, it has become one of the most accepted tools amongst the testing
professionals.

Selenium is not just a single tool or a utility, rather a package of several testing tools and for
the same reason, it is referred to as a Suite. Each of these tools is designed to cater
different testing and test environment requirements.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


The suite package constitutes the following sets of tools:

 Selenium Integrated Development Environment (IDE) – Selenium IDE is a record


and playback tool. It is distributed as a Firefox Plugin.
 Selenium Remote Control (RC) – Selenium RC is a server that allows a user to
create test scripts in the desired programming language. It also allows executing test
scripts within the large spectrum of browsers.
 Selenium WebDriver – WebDriver is a different tool altogether that has various
advantages over Selenium RC. WebDriver directly communicates with the web
browser and uses its native compatibility to automate.
 Selenium Grid – Selenium Grid is used to distribute your test execution on multiple
platforms and environments concurrently.
Q #5) What are the testing types that can be supported by Selenium?
Selenium supports the following types of testing:

1. Functional Testing
2. Regression Testing
Q #6) What are the limitations of Selenium?
Following are the limitations of Selenium:

 Selenium supports testing of only web-based applications


 Mobile applications cannot be tested using Selenium
 Captcha and Barcode readers cannot be tested using Selenium
 Reports can only be generated using third-party tools like TestNG or JUnit.
 As Selenium is a free tool, thus there is no ready vendor support through the user
can find numerous helping communities.
 The user is expected to possess prior programming language knowledge.
Q #7) What is the difference between Selenium IDE, Selenium RC, and WebDriver?
Feature Selenium IDE Selenium RC WebDriver

Browser Selenium IDE comes as Selenium RC supports a WebDriver supports a


Compatibility a Firefox plugin, thus it varied range of versions of varied range of versions
supports only Firefox Mozilla Firefox, Google of Mozilla Firefox, Google
Chrome, Internet Explorer Chrome, Internet Explorer
and Opera. and Opera.
Also supports
HtmlUnitDriver which is a
GUI less or headless
browser.

Record and Selenium IDE supports Selenium RC doesn't WebDriver doesn't


Playback record and playback supports record and support record and
feature playback feature. playback feature

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Feature Selenium IDE Selenium RC WebDriver

Server Selenium IDE doesn't Selenium RC requires server WebDriver doesn't


Requirement require any server to be to be started before require any server to be
started before executing the test scripts. started before executing
executing the test the test scripts
scripts

Architecture Selenium IDE is a Selenium RC is a JavaScript WebDriver uses the


Javascript based based Framework. browser's native
framework compatibility to
automation

Object Oriented Selenium IDE is not an Selenium RC is semi object WebDriver is a purely
object oriented tool oriented tool. object oriented tool

Dynamic Finders Selenium IDE doesn't Selenium RC doesn't WebDriver supports


(for locating web support dynamic support dynamic finders. dynamic finders
elements on a finders
webpage)

Handling Alerts, Selenium IDE doesn't Selenium RC doesn't WebDriver offers a wide
Navigations, explicitly provides aids explicitly provides aids to range of utilities and
Dropdowns to handle alerts, handle alerts, navigations, classes that helps in
navigations, dropdowns dropdowns. handling alerts,
navigations, and
dropdowns efficiently and
effectively.

WAP Selenium IDE doesn't Selenium RC doesn't WebDriver is designed in


(iPhone/Android) support testing of support testing of a way to efficiently
Testing iPhone/Andriod iPhone/Android support testing of
applications applications. iPhone/Android
applications. The tool
comes with a large range
of drivers for WAP based
testing.
For example,
AndroidDriver,
iPhoneDriver

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Feature Selenium IDE Selenium RC WebDriver

Listener Support Selenium IDE doesn't Selenium RC doesn't WebDriver supports the
support listeners support listeners. implementation of
Listeners

Speed Selenium IDE is fast as it Selenium RC is slower than WebDriver communicates


is plugged in with the WebDriver as it doesn't directly with the web
web-browser that communicates directly with browsers. Thus making it
launches the test. Thus, the browser; rather it sends much faster.
the IDE and browser selenese commands over to
communicates directly Selenium Core which in turn
communicates with the
browser.

Q #8) When should I use Selenium IDE?


Selenium IDE is the simplest and easiest of all the tools within the Selenium Package. Its
record and playback feature makes it exceptionally easy to learn with minimal
acquaintances to any programming language. Selenium IDE is an ideal tool for a naïve
user.

Q #9) What is Selenese?


Selenese is the language which is used to write test scripts in Selenium IDE.

Q #10) What are the different types of locators in Selenium?


The locator can be termed as an address that identifies a web element uniquely within the
webpage. Thus, to identify web elements accurately and precisely we have different types
of locators in Selenium:
 ID
 ClassName
 Name
 TagName
 LinkText
 PartialLinkText
 Xpath
 CSS Selector
 DOM
Q #11) What is the difference between assert and verify commands?
Assert: Assert command checks whether the given condition is true or false. Let’s say we
assert whether the given element is present on the web page or not. If the condition is true
then the program control will execute the next test step but if the condition is false, the
execution would stop and no further test would be executed.
Verify: Verify command also checks whether the given condition is true or false.
Irrespective of the condition being true or false, the program execution doesn’t halt i.e. any

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


failure during verification would not stop the execution and all the test steps would be
executed.
Q #12) What is an XPath?
XPath is used to locate a web element based on its XML path. XML stands for Extensible
Markup Language and is used to store, organize and transport arbitrary data. It stores data
in a key-value pair which is very much similar to HTML tags. Both being markup languages
and since they fall under the same umbrella, XPath can be used to locate HTML elements.
The fundamental behind locating elements using XPath is the traversing between various
elements across the entire page and thus enabling a user to find an element with the
reference of another element.

Q #13) What is the difference between “/” and “//” in Xpath?


Single Slash “/” – Single slash is used to create Xpath with absolute path i.e. the xpath
would be created to start selection from the document node/start node.
Double Slash “//” – Double slash is used to create Xpath with relative path i.e. the xpath
would be created to start selection from anywhere within the document.
Q #14) What is Same origin policy and how it can be handled?
The problem of same origin policy disallows to access the DOM of a document from an
origin that is different from the origin we are trying to access the document.

Origin is a sequential combination of scheme, host, and port of the URL. For example, for a
URL https://www.softwaretestinghelp.com/resources/, the origin is a combination of http,
softwaretestinghelp.com, 80 correspondingly.

Thus the Selenium Core (JavaScript Program) cannot access the elements from an origin
that is different from where it was launched. For Example, if I have launched the JavaScript
Program from “https://www.softwaretestinghelp.com”, then I would be able to access the
pages within the same domain such as “https://www.softwaretestinghelp.com/resources” or
“https://www.softwaretestinghelp.com/istqb-free-updates/”. The other domains like
google.com, seleniumhq.org would no more be accessible.

So, In order to handle the same origin policy, Selenium Remote Control was introduced.
Q #15) When should I use Selenium Grid?
Selenium Grid can be used to execute same or different test scripts on multiple platforms
and browsers concurrently so as to achieve distributed test execution, testing under
different environments and saving execution time remarkably.
Q #16) What do we mean by Selenium 1 and Selenium 2?
Selenium RC and WebDriver, in a combination, are popularly known as Selenium 2.
Selenium RC alone is also referred to as Selenium 1.
Q #17) Which is the latest Selenium tool?
WebDriver

Q #18) How do I launch the browser using WebDriver?


The following syntax can be used to launch Browser:
WebDriver driver = new FirefoxDriver();
WebDriver driver = new ChromeDriver();
WebDriver driver = new InternetExplorerDriver();

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Q #19) What are the different types of Drivers available in WebDriver?
The different drivers available in WebDriver are:

 FirefoxDriver
 InternetExplorerDriver
 ChromeDriver
 SafariDriver
 OperaDriver
 AndroidDriver
 IPhoneDriver
 HtmlUnitDriver
Q #20) What are the different types of waits available in WebDriver?
There are two types of waits available in WebDriver:
1. Implicit Wait
2. Explicit Wait
Implicit Wait: Implicit waits are used to provide a default waiting time (say 30 seconds)
between each consecutive test step/command across the entire test script. Thus, the
subsequent test step would only execute when the 30 seconds have elapsed after
executing the previous test step/command.
Explicit Wait: Explicit waits are used to halt the execution till the time a particular condition
is met or the maximum time has elapsed. Unlike Implicit waits, explicit waits are applied for
a particular instance only.
Q #21) How to type in a textbox using Selenium?
The user can use sendKeys(“String to be entered”) to enter the string in the textbox.

Syntax:
WebElement username = drv.findElement(By.id(“Email”));
// entering username
username.sendKeys(“sth”);
Q #22) How can you find if an element in displayed on the screen?
WebDriver facilitates the user with the following methods to check the visibility of the web
elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons,
labels etc.

1. isDisplayed()
2. isSelected()
3. isEnabled()
Syntax:
isDisplayed():
boolean buttonPresence = driver.findElement(By.id(“gbqfba”)).isDisplayed();
isSelected():
boolean buttonSelected = driver.findElement(By.id(“gbqfba”)).isSelected();
isEnabled():
boolean searchIconEnabled = driver.findElement(By.id(“gbqfb”)).isEnabled();
Q #23) How can we get a text of a web element?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Get command is used to retrieve the inner text of the specified web element. The command
doesn’t require any parameter but returns a string value. It is also one of the extensively
used commands for verification of messages, labels, errors etc displayed on the web pages.

Syntax:
String Text = driver.findElement(By.id(“Text”)).getText();
Q #24) How to select value in a dropdown?
The value in the dropdown can be selected using WebDriver’s Select class.

Syntax:
selectByValue:
Select selectByValue = new Select(driver.findElement(By.id(“SelectID_One”)));
selectByValue.selectByValue(“greenvalue”);
selectByVisibleText:
Select selectByVisibleText = new Select (driver.findElement(By.id(“SelectID_Two”)));
selectByVisibleText.selectByVisibleText(“Lime”);
selectByIndex:
Select selectByIndex = new Select(driver.findElement(By.id(“SelectID_Three”)));
selectByIndex.selectByIndex(2);
Q #25) What are the different types of navigation commands?
Following are the navigation commands:
navigate().back() – The above command requires no parameters and takes back the user
to the previous webpage in the web browser’s history.
Sample code:
driver.navigate().back();
navigate().forward() – This command lets the user to navigate to the next web page with
reference to the browser’s history.
Sample code:
driver.navigate().forward();
navigate().refresh() – This command lets the user to refresh the current web page there by
reloading all the web elements.
Sample code:
driver.navigate().refresh();
navigate().to() – This command lets the user to launch a new web browser window and
navigate to the specified URL.
Sample code:
driver.navigate().to(“https://google.com”);
Q #26) How to click on a hyper link using linkText?
driver.findElement(By.linkText(“Google”)).click();
The command finds the element using link text and then click on that element and thus the
user would be re-directed to the corresponding page.

The above-mentioned link can also be accessed by using the following command.

driver.findElement(By.partialLinkText(“Goo”)).click();

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


The above command finds the element based on the substring of the link provided in the
parenthesis and thus partialLinkText() finds the web element with the specified substring
and then clicks on it.

Q #27) How to handle frame in WebDriver?


An inline frame acronym as iframe is used to insert another document within the current
HTML document or simply a web page into a web page by enabling nesting.

Select iframe by id
driver.switchTo().frame(“ID of the frame“);
Locating iframe using tagName
driver.switchTo().frame(driver.findElements(By.tagName(“iframe”).get(0));
Locating iframe using index
frame(index)
driver.switchTo().frame(0);
frame(Name of Frame)
driver.switchTo().frame(“name of the frame”);
frame(WebElement element)
Select Parent Window
driver.switchTo().defaultContent();
Q #28) When do we use findElement() and findElements()?
findElement(): findElement() is used to find the first element in the current web page
matching to the specified locator value. Take a note that only first matching element would
be fetched.
Syntax:
WebElement element = driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
findElements(): findElements() is used to find all the elements in the current web page
matching to the specified locator value. Take a note that all the matching elements would be
fetched and stored in the list of WebElements.
Syntax:
List <WebElement> elementList
= driver.findElements(By.xpath(“//div[@id=’example’]//ul//li”));
Q #29) How to find more than one web element in the list?
At times, we may come across elements of the same type like multiple hyperlinks, images
etc arranged in an ordered or unordered list. Thus, it makes absolute sense to deal with
such elements by a single piece of code and this can be done using WebElement List.

Sample Code
// Storing the list

List <WebElement> elementList = driver.findElements(By.xpath("//div[@id='example']//ul//li

// Fetching the size of the list

int listSize = elementList.size();

for (int i=0; i<listSize; i++)

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


// Clicking on each service provider link

serviceProviderLinks.get(i).click();

// Navigating back to the previous page that stores link to service providers

driver.navigate().back();

Q #30) What is the difference between driver.close() and driver.quit command?


close(): WebDriver’s close() method closes the web browser window that the user is
currently working on or we can also say the window that is being currently accessed by the
WebDriver. The command neither requires any parameter nor does it return any value.
quit(): Unlike close() method, quit() method closes down all the windows that the program
has opened. Same as close() method, the command neither requires any parameter nor
does is return any value.
Q #31) Can Selenium handle windows based pop up?
Selenium is an automation testing tool which supports only web application testing.
Therefore, windows pop up cannot be handled using Selenium.

Q #32) How can we handle web-based pop-up?


WebDriver offers the users a very efficient way to handle these pop-ups using Alert
interface. There are the four methods that we would be using along with the Alert interface.
 void dismiss() – The dismiss() method clicks on the “Cancel” button as soon as the
pop-up window appears.
 void accept() – The accept() method clicks on the “Ok” button as soon as the pop-up
window appears.
 String getText() – The getText() method returns the text displayed on the alert box.
 void sendKeys(String stringToSend) – The sendKeys() method enters the specified
string pattern into the alert box.
Syntax:
// accepting javascript alert
                Alert alert = driver.switchTo().alert();
alert.accept();
Q #33) How can we handle windows based pop up?
Selenium is an automation testing tool which supports only web application testing, that
means, it doesn’t support testing of windows based applications. However Selenium alone
can’t help the situation but along with some third-party intervention, this problem can be
overcome. There are several third-party tools available for handling window based pop-ups
along with the selenium like AutoIT, Robot class etc.

Q #34) How to assert the title of the web page?


//verify the title of the web page
assertTrue(“The title of the window is incorrect.”,driver.getTitle().equals(“Title of the page”));
Q #35) How to mouse hover on a web element using WebDriver?
WebDriver offers a wide range of interaction utilities that the user can exploit to automate
mouse and keyboard events. Action Interface is one such utility which simulates the single
user interactions.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Thus, In the following scenario, we have used Action Interface to mouse hover on a drop
down which then opens a list of options.

Sample Code:
// Instantiating Action Interface

Actions actions=new Actions(driver);

// howering on the dropdown

actions.moveToElement(driver.findElement(By.id("id of the dropdown"))).perform();

// Clicking on one of the items in the list options

WebElement subLinkOption=driver.findElement(By.id("id of the sub link"));

subLinkOption.click();

Q #36) How to retrieve CSS properties of an element?


The values of the css properties can be retrieved using a get() method:

Syntax:
driver.findElement(By.id(“id“)).getCssValue(“name of css attribute”);
driver.findElement(By.id(“id“)).getCssValue(“font-size”);
Q #37) How to capture screenshot in WebDriver?
import org.junit.After;

import org.junit.Before;

import org.junit.Test;

import java.io.File;

import java.io.IOException;

import org.apache.commons.io.FileUtils;

import org.openqa.selenium.OutputType;

import org.openqa.selenium.TakesScreenshot;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.firefox.FirefoxDriver;

 
public class CaptureScreenshot {

WebDriver driver;

@Before

public void setUp() throws Exception {

driver = new FirefoxDriver();

driver.get("https://google.com");

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


}

@After

public void tearDown() throws Exception {

driver.quit();

 
@Test

public void test() throws IOException {

// Code to capture the screenshot

File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

// Code to copy the screenshot in the desired location

FileUtils.copyFile(scrFile, new File("C:\\CaptureScreenshot\\google.jpg"))

Q #38) What is Junit?
Junit is a unit testing framework introduced by Apache. Junit is based on Java.
Q #39) What are Junit annotations?
Following are the JUnit Annotations:

 @Test: Annotation lets the system know that the method annotated as @Test is a
test method. There can be multiple test methods in a single test script.
 @Before: Method annotated as @Before lets the system know that this method
shall be executed every time before each of the test methods.
 @After: Method annotated as @After lets the system know that this method shall be
executed every time after each of the test method.
 @BeforeClass: Method annotated as @BeforeClass lets the system know that this
method shall be executed once before any of the test methods.
 @AfterClass: Method annotated as @AfterClass lets the system know that this
method shall be executed once after any of the test methods.
 @Ignore: Method annotated as @Ignore lets the system know that this method shall
not be executed.
Q #40) What is TestNG and how is it better than Junit?
TestNG is an advanced framework designed in a way to leverage the benefits by both the
developers and testers. With the commencement of the frameworks, JUnit gained
enormous popularity across the Java applications, Java developers and Java testers with
remarkably increasing the code quality. Despite being easy to use and straightforward,
JUnit has its own limitations which give rise to the need of bringing TestNG into the picture.
TestNG is an open source framework which is distributed under the Apache Software
License and is readily available for download.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


TestNG with WebDriver provides an efficient and effective test result format that can, in
turn, be shared with the stakeholders to have a glimpse on the product’s/application’s health
thereby eliminating the drawback of WebDriver’s incapability to generate test reports.
TestNG has an inbuilt exception handling mechanism which lets the program to run without
terminating unexpectedly.
There are various advantages that make TestNG superior to JUnit. Some of them are:

 Added advance and easy annotations


 Execution patterns can set
 Concurrent execution of test scripts
 Test case dependencies can be set
Q #41) How to set test case priority in TestNG?
Setting Priority in TestNG
Code Snippet
package TestNG;

import org.testng.annotations.*;

public class SettingPriority {

@Test(priority=0)

public void method1() {

@Test(priority=1)

public void method2() {

@Test(priority=2)

public void method3() {

Test Execution Sequence:


1. Method1
2. Method2
3. Method3
Q #42) What is a framework?
The framework is a constructive blend of various guidelines, coding standards, concepts,
processes, practices, project hierarchies, modularity, reporting mechanism, test data
injections etc. to pillar automation testing.

Q #43) What are the advantages of the Automation framework?


The advantage of Test Automation framework
 Reusability of code
 Maximum coverage
 Recovery scenario

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 Low-cost maintenance
 Minimal manual intervention
 Easy Reporting
Q #44) What are the different types of frameworks?
Below are the different types of frameworks:
1. Module Based Testing Framework: The framework divides the entire “Application
Under Test” into the number of logical and isolated modules. For each module, we
create a separate and independent test script. Thus, when these test scripts have
taken together builds a larger test script representing more than one module.
2. Library Architecture Testing Framework: The basic fundamental behind the
framework is to determine the common steps and group them into functions under a
library and call those functions in the test scripts whenever required.
3. Data Driven Testing Framework: Data Driven Testing Framework helps the user
segregate the test script logic and the test data from each other. It lets the user store
the test data into an external database. The data is conventionally stored in “Key-
Value” pairs. Thus, the key can be used to access and populate the data within the
test scripts.
4. Keyword Driven Testing Framework: The Keyword Driven testing framework is an
extension to Data-driven Testing Framework in a sense that it not only segregates
the test data from the scripts, it also keeps the certain set of code belonging to the
test script into an external data file.
5. Hybrid Testing Framework: Hybrid Testing Framework is a combination of more
than one above mentioned frameworks. The best thing about such a setup is that it
leverages the benefits of all kinds of associated frameworks.
6. Behavior Driven Development Framework: Behavior Driven Development
framework allows automation of functional validations in an easily readable and
understandable format to Business Analysts, Developers, Testers, etc.
Q #45) How can I read test data from excels?
Test data can efficiently be read from excel using JXL or POI API. 

Q #46) What is the difference between POI and jxl jar?


# JXL jar POI jar

1 JXL supports “.xls” format i.e. binary based format. POI jar supports all of these
JXL doesn’t support Excel 2007 and “.xlsx” format i.e. formats
XML based format

2 JXL API was last updated in the year 2009 POI is regularly updated and
released

3 The JXL documentation is not as comprehensive as POI has a well prepared and
that of POI highly comprehensive
documentation

4 JXL API doesn’t support rich text formatting POI API supports rich text

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


# JXL jar POI jar

formatting

5 JXL API is faster than POI API POI API is slower than JXL API

Q #47) What is the difference between Selenium and QTP?


Feature Selenium Quick Test Professional (QTP)

Browser Selenium supports almost all the QTP supports Internet Explorer,
Compatibility popular browsers like Firefox, Chrome, Firefox and Chrome. QTP only
Safari, Internet Explorer, Opera etc supports Windows Operating System

Distribution Selenium is distributed as an open QTP is distributed as a licensed tool


source tool and is freely available and is commercialized

Application Selenium supports testing of only web QTP supports testing of both the web
under Test based applications based application and windows based
application

Object Object Repository needs to be created QTP automatically creates and


Repository as a separate entity maintains Object Repository

Language Selenium supports multiple QTP supports only VB Script


Support programming languages like Java, C#,
Ruby, Python, Perl etc

Vendor As Selenium is a free tool, user would Users can easily get the vendor’s
Support not get the vendor’s support in support in case of any issue
troubleshooting issues

Q #48) Can WebDriver test Mobile applications?


WebDriver cannot test Mobile applications. WebDriver is a web-based testing tool, therefore
applications on the mobile browsers can be tested.

Q #49) Can captcha be automated?


No, captcha and barcode reader cannot be automated.

Q #50) What is Object Repository? How can we create an Object Repository in


Selenium?
Object Repository is a term used to refer to the collection of web elements belonging to
Application Under Test (AUT) along with their locator values. Thus, whenever the element is

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


required within the script, the locator value can be populated from the Object Repository.
Object Repository is used to store locators in a centralized location instead of hardcoding
them within the scripts.

In Selenium, objects can be stored in an excel sheet which can be populated inside the
script whenever required.

Q #51) What is exception handling?

When you start working with Selenium webdriver, you will come across different
exceptions based on the code you write. When an exception occurs, the normal
flow of program halts and an exception object is created. Exception Handling is a
mechanism to handle runtime errors such as ClassNotFoundException,
IOException, SQLException, RemoteException, etc.

That’s all for now.

Hope in this article you will find answers to most frequently asked Selenium and WebDriver
Interview questions. The answers provided here are also helpful for understanding the
Selenium basics and advanced WebDriver topics.

Jmeter
Q #1) Explain the architecture of JMeter.
Answer: Jmeter is a Java-based open-source application that is basically designed for the
purpose of Load Testing. It supports all major protocols that are supported in Load Runner.
Unlike any browser, JMeter works on levels of protocols and does not execute JavaScript
present in HTML web pages.

Q #2) Does JMeter simulate actual browser behavior?


Answer: No, JMeter does not support the actual browser behavior. It does not render the
HTML webpages as the normal browser does. The response can be viewed in HTML format
but the actual timings are not present in the generated samples.
Q #3) What is Distributed testing?
Answer: Distributed Testing means using multiple machines for load testing in which one of
the machines can be made master and others can be kept as a slave. It is very important to
note that all the machines should be on the  same network and should have the same
version of Java and JMeter
Q #4) What is the use of Regular Expression in JMeter?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Answer: Regular Expression is used for extracting some values dynamically from the
responses. These values can be used in the subsequent request or can be saved for
reporting purposes. Regular Expression is used in both Pre-Processors as well as Post
Processors.
Q #5) What are the types of processors in JMeter?
Answer: Basically there are two types of processors in JMeter namely Pre-Processor and
Post Processor.
Pre-Processors execute before the main sampler and can change the scope of the sampler
whereas Post Processors execute after the main sampler and are applicable to all samplers
in the same scope of Test Plan. They can be used to extract some fields from the server
response and store them in variables.

Q #6) What are the different ways of Data Parameterization in JMeter?


Answer: Data Parametrization makes the scripts reusable where the values is not required
to be hardcoded for the same request with different parameters.
Below is the data parametrization that is supported in JMeter:
 CSV Data Set Config
 User-Defined Variables.
Q #7) What are the maximum recommended threads on a single system?
Answer: It depends on the hardware configuration of your system which includes a
processor, JVM, allocated memory -Xmx, etc.
Other factors that impact thread count are the number of components in your test plan i.e.
the number of config elements or processors and it also depends on whether you are using
GUI/Non-GUI Mode.

Q #8) Explain the difference between Gaussian and Poisson Timers.


Answer: Both Gaussian and Poisson Timers work on a mathematical formula with some
constant delay and additional offset. Difference between the two lies in the fact that how the
lambda value is calculated in the case of Poisson timer and how deviation is calculated in
the case of Gaussian Timer.
Q #9) What are the major differences between JMeter and Load Runner.
Answer: JMeter is considered as the major competitor of Load Runner in the
industry. Enlisted are some of the major differences:
Load Runner Jmeter

Licensed Software Open Source tool.

Developed by Mercury Developed by Apache.

UI is very impressive It lacks in UI

It has more technical capabilities. Less technically sound as compared to Load Runner.

Supports SAP, Siebel and Peoplesoft. Doesn’t support SAP and Siebel
Q #10) What is the use of co-relation in JMeter?
Answer: Co-relation is a process of extracting the values from the server response and
storing it in a variable to be used in any other request which is to follow.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


For Example, for testing any login functionality if you have to use the session ID/cookie ID,
you can extract the values from the response of GET Request of the login page and then
dynamically use the same while making POST request for a login.
Q #11) What are the different types of listeners?
Answer: Listeners are used for storing the execution results of load testing in different
forms be it in a table, graph, tree or in any other presentable format so that it can be
presented to the client. There are different type of inbuild listeners in JMeter and many
others can be imported into it by using plugins as per the requirement.
Some of the inbuild listeners are:
 View results in Table
 View results in Tree
 Graph results
 Aggregate graph
 Aggregate report
 Assertion results
 Response time graph
Q #12) Explain the flow of the Test Script Recorder.
Answer: HTTP(s) Test Script Recorder is used to record all the Http(s) requests going to
the server from your application. Some configurations require to be done in JMeter in order
to make it work.
Steps followed to record https traffic are:
 Add HTTP(s) Test script recorder to WorkBench.
 Enter the port number to start your proxy server.
 Choose the target either as “Workbench” or add a Recording Controller in your test
plan and select the same target for storing all the recordings under it.
 Start the proxy server.
 Configure your browser with manual proxy settings pointing to the same port number
used in the test script recorder.
Q #13) Can JMeter record actions from mobile? If yes, how?
Answer: Yes, JMeter can record HTTP or Https request going to the server from your
mobile application also. It is required that mobile and JMeter are on the same network.
Below is the configuration required:
 Configure your proxy server in JMeter to run at a specified port.
 Set up the proxy on your mobile wifi settings and enter the same port number that is
used in the recorder.
 Install the Root CA certificate on your mobile.
 Hit server requests from your mobile and observe it getting captured by the specified
controller.
Q #14) How to do master-slave configuration in JMeter?
Answer: Master-slave configuration is a part of distributed testing in which more than one
machine is used to perform load testing of the server under test.
It is very important that all machines are on the same network and all have the same
version of JMeter. In distributed testing, one machine considered as the master and the
others are kept as slaves by doing some configurations.

The process is specified below:

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


 On the master machine, edit the JMeter.properties file and add the IP addresses of
slave machines against the remote_host field in the file.
 Save the file and open the JMeter again.
 Now, from the RUN menu in JMeter, select Remote Start and choose the IP of the
machine to be invoked.
 Choose RUN menu and select Remote Start all to start all the slave machines for
your testing.
Q #15) What are the JMeter supported protocols?
Answer: JMeter supports various standard protocols like:
 HTTP/HTTPs
 SOAP
 LDAP
 FTP
 SMTP
 TCP
Q #16) Explain the syntax of JMeter variables and functions.
Answer: Just as in any other programming language, variables and functions are used in
JMeter also in order to make the scripts reusable.
Syntax of Variable – ${var}
There are many inbuilt functions that are available in JMeter to perform various actions.
Function string can be generated from the Function Dialogue Box itself.

For Example, if you want to get the machine IP stored in a machineIP variable, you can
use the string ${__machineIP(machineIP)}.
Q #17) Why is it recommended to run JMeter in GUI mode?
Answer: JMeter tests can be run both GUI as well as Non-GUI Mode. It is highly
recommended to run the load test in Non-GUI mode because the AWT event thread can kill
the tests in case of high load scenarios.
The various Non-GUI mode supported with JMeter are:
 Command-line
 ANT plugin
 MAVEN plugin
 Jenkins
Q #18) Is it possible to run selenium scripts in JMeter? If yes, how?
Answer: Yes, it is possible to run selenium scripts in JMeter to get some ideas on their
performance.
There are two ways of doing it. Either you can use JUnit libraries to build selenium scripts
and save as Jars and copy the same in the JMeter directory. And then add JUnit sampler to
your test plan and import the Jar file.

Otherwise, the Webdriver sampler plugin can be added in the JMeter ext folder. Restart the
JMeter. Write your selenium code in the Webdriver sampler and then execute it to see the
performance.

Q #19) How do you manage sessions and cookies in JMeter?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Answer: Sessions and cookies can be managed in JMeter by using config elements such
as HTTP Cache Manager which provides an option to clear the cookies in every iteration
and also allows to add user-defined cookies.
HTTP Cache manager helps you in clearing cache after each iteration as per your
requirement in the load tests and also limits the number of elements that can be stored in
the cache. Both of these config elements can be attached to the HTTP sampler.

Q #20) What are the important steps for testing JDBC request?
Answer: JDBC requests are used to establish a connection with the databases and then
measure the response time of the queries.
Important steps for testing JDBC requests are:
 Setting up Config Element, JDBC Connection configuration in which Database
URL and JDBC Driver Class needs to be added as per the database which is being
used. Also, add the variable name for this connection configuration so as to use it in
the sampler.
 Add JDBC Request. Add the same variable name added above and write your
queries to the test.
Q #21) What is BeanShell scripting?
Answer: BeanShell is a lightweight Java scripting that is used in JMeter to perform some
complex task. BeanShell sampler can perform various functions with the use of coding. You
can print the thread number, get the current sampler executed, fetch the cookies, etc.
Q #22) Can JMeter measure the performance of a complete application? For Example,
you have multiple screens in your mobile app. Can JMeter measure the time taken to
flip the screens?
Answer: No, JMeter does not measure the transition time between the screens. It can only
measure the server actions not the UI interactions.
Q #23) What is a Root CA certificate?
Answer: HTTPS connection requires a certificate to authenticate the connections which get
established when the browser hits the webserver. JMeter generates it temporarily to
intercept the SSL traffic in order to record the actions. For recording actions via mobile, you
need to have this certificate on your mobile to record the actions.
Q #24) Which factors decide the maximum threads that one should generate per
system?
Answer: It depends on the hardware of the system.
For Example, on a 2-3 GHz CPU, 400-600 threads can be generated. It also depends on
the components in your test plan. More the processors and XML parsing elements, the
more the CPU load and hence fewer threads. For high load, it is recommended to use
multiple machines for load testing.
Q #25) What is a Workbench and why is it required?
Answer: Workbench is a storage area for adding some components which can be added to
the test plan if required.
Components of workbench do not get saved with the test plan automatically. They have to
be saved separately as test fragments. A most important part of the Workbench is HTTP(s)
Test script recorder which is highly useful in recording the https request and later load can
be applied to+9859 them to measure the response time.

Q #26) What is Tidy Parsing?

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Answer: Tidy Parsing is a type of parsing that is used in Xpath extractor. If the response is
in pure XML then tidy parsing is not required whereas, in the case of XHTML, it is
mandatory to check the tidy parsing option in order to fetch the correct results.
Q #27) What are the important plugins that are supported in JMeter?
Answer: JMeter supports different types of plugins which are helpful in generating high-
quality results.
Below are the major plugins that are supported:
 Thread group plugin – Stepping thread group plugin.
 Samplers plugins like Webdriver.
 Listeners plugins.
Q #28) What are the types of the controller in JMeter?
Answer: Controllers are used in JMeter to control the flow of execution of requests.
Below are the controllers that are used in JMeter:
 Recording controller
 IF controller
 While controller
 Transaction controller
 Loop controller
 Simple controller
 Module controller
Q #29) What are the samplers
How does a Jmeter knows what type of request has been sent to server???
It is through Samplers. Samplers are a must to add to a Test Plan as only it can let Jmeter
know what type of request need to go to which server and with any predefined parameters
or not. Requests could be HTTP, HTTP(s), FTP, TCP, SMTP, SOAP, JDBC etc.
Q #29) What are the Assertions.
Till now, we have covered how JMeter hits the server and how the responses are displayed
via listeners. To ensure that the response received is correct and as per expectation, we
need to add assertions. Assertions are simply validations which we need to put on
responses to compare the results.

Below are the types of assertions commonly used:


 Response Assertion
 Duration Assertion
 Size Assertion
 XML Assertion
 HTML Assertion

Conclusion
I’m sure that this article on JMeter interview questions would have helped to enrich your
knowledge on JMeter concepts to a great extent.

A thorough understanding of all the questions covered here would help you to crack any
interview confidently.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


We wish you all the success!!!

Aptitude Questions

1. If you have a 5-litre jug and a 3-litre jug, how would you measure exactly 4
liters?
Answer
1. Fill the 3L jug fully and empty it in the 5L jug
2. Now again fill 3L fully and pour its water in the 5L jug (remember it already has 3 liters
of water in it) until it full.
3. Now you're left with only 1 liter of water in the 3L jug (*hope you are getting it)
4. Now empty 5L jug and pour that remaining 1-liter water that we got in step 3 into the
5L jug.
a. Now 5L jug contains 1 liter of water.
5. Now fill the 3L jug fully and empty it into the 5L jug so you will now have 4 liters of
water in 5L jug.
That's how you get 4litres of water.

2. I give you 4 tablets which contain 2 for fever and 2 for cold, all the same size,
shape, taste, weight and color, no cover. You have to take 1 cold and 1 fever
tablet right now. How will you choose correctly?
So basically you have 4 tablets. 2 for cold and other 2 for fever. Now start dividing the
tablets into half. Keep one half in your hand and other half on table. Once you are done
dividing all the tablets into half, take either of them. Problem solved.

3. There is a room with a door (closed) and three light bulbs. Outside the room,
there are three switches, connected to the bulbs. You may manipulate the
switches as you wish, but once you open the door you can’t change them.
Identify each switch with its bulb. All bulbs are in working condition.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


Let the bulbs be X, Y, and Z 
Turn on switch X for 5 to 10 minutes. Turn it off and turn on switch Y. Open
the door and touch the light bulb. 
1. if the light is on, it is Y 
2. if the light is off and hot, it is X 
3. if the light is off and cold, it is Z 

4. A blind man is alone on a deserted island. He has two blue pills and two red
pills. He must take exactly one red pill and one blue pill or he will die.

Firstly, break each of the pills in half, and as you do this pop one half in your mouth and
lay the other half aside for tomorrow. When he’s done this with all four pills he will have
consumed one red pill and one blue pill. And have the same leftover.

5.  A car has 4 tyres and 1 spare tyre. Each tyre can travel a maximum distance of
20000 miles before wearing off. What is the maximum distance the car can
travel before you are forced to buy a new tyre? You are allowed to change
tyres (using the spare tyre) an unlimited number of times.

Let four tyres be named as A, B, C and D and spare tyre be S.

1. 5000 KMs: Replace A with S.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


2. 10000 KMs: Put A back to its original position and replace B with S. 

3. 15000 KMs: Put B back to its original position and replace C with S.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


4. 20000 KMs: Put C back to its original position and replace D with S. 

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


5. 25000 KMs: Every tyre is now worn out completely

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


6. A newspaper made of 16 large sheets of paper folded in half. The newspaper
has 64 pages altogether. The first sheet contains pages 1, 2, 63, 64.

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


If we pick up a sheet containing page number 45. What are the other pages
that this sheet contains?

On the back of 45, it is 46. The pages are such that for each page p, 65-p
will be also on the same page.
Then,
65-45 = 20
65-46 = 19
So the four pages in this sheet are 19, 20, 45, 46.
7. You have a birthday cake and have to cut it into 8 equal pieces by making 3
cuts only. How do you do it?
Step 1: Cut the cake into quarters (4 pieces) using 2 of the cuts – one
horizontally down the center of the cake and the other vertically down the
center of the cake. This will leave you with 4 pieces (or slices) of cake.

Step 2: Then take all 4 pieces and arrange them in a stack that is 4 pieces
high.
Step 3: Finally, you can just cut that stack of 4 pieces in half – using your third
and final cut – and then you will end up with 8 pieces of cake!

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer


8. Which letter replaces the “?”:

L:O
R:I
E:V
M:?
Solution : N, because if we assign the values as A=1, B=2…..Z=26, then each pair adds
upto 27.
example : L O
12+15 = 27.
And for M:N
13+14=27
9. A Lady (L) bought an item of Rs 100 from the Shopkeeper (C). She paid him
through a 500 Rs Note. Realizing that he did not have change, the shopkeeper
C got change for that note from another shopkeeper (S) and paid Rs 400 to
the Lady.
After a few days, S realized that the note is fake, And this railed at C and took
500 Rs back from him.
So in this whole process how much money did C loose in the end?
Answer: 500

Prepared by: Mr. Umar Arshad | Software Quality Assurance Engineer

You might also like