Fundamentals of Testing
Fundamentals of Testing
Fundamentals of Testing
❖ What is Testing?
Testing is the process of verifying and validating that a software or application is bug free,
meets the technical requirements as guided by its design and development and meets the user
requirements effectively and efficiently with handling all the exceptional and boundary
cases.
The process of software testing aims not only at finding faults in the existing software but
also at finding measures to improve the software in terms of efficiency, accuracy, and
usability. It mainly aims at measuring the specification, functionality, and performance of a
software program or application.
❖ What is Debugging?
Debugging is the process of identifying and resolving errors, or bugs, in a software system. It
is an important aspect of software engineering because bugs can cause a software system to
malfunction, and can lead to poor performance or incorrect results. Debugging can be a time-
consuming and complex task, but it is essential for ensuring that a software system is
functioning correctly.
Advantages of Debugging:
➢ Improved system quality: By identifying and resolving bugs, a software system can
be made more reliable and efficient, resulting in improved overall quality.
➢ Reduced system downtime: By identifying and resolving bugs, a software system
can be made more stable and less likely to experience downtime, which can result in
improved availability for users.
➢ Increased user satisfaction: By identifying and resolving bugs, a software system
can be made more user-friendly and better able to meet the needs of users, which can
result in increased satisfaction.
➢ Reduced development costs: By identifying and resolving bugs early in the
development process, it can save time and resources that would otherwise be spent on
fixing bugs later in the development process or after the system has been deployed.
➢ Increased security: By identifying and resolving bugs that could be exploited by
attackers, a software system can be made more secure, reducing the risk of security
breaches.
➢ Facilitates change: With debugging, it becomes easy to make changes to the software
as it becomes easy to identify and fix bugs that would have been caused by the
changes.
➢ Better understanding of the system: Debugging can help developers gain a better
understanding of how a software system works, and how different components of the
system interact with one another.
➢ Facilitates testing: By identifying and resolving bugs, it makes it easier to test the
software and ensure that it meets the requirements and specifications.
Disadvantages of Debugging:
➢ Time-consuming: Debugging can be a time-consuming process, especially if the bug
is difficult to find or reproduce. This can cause delays in the development process and
add to the overall cost of the project.
➢ Requires specialized skills: Debugging can be a complex task that requires
specialized skills and knowledge. This can be a challenge for developers who are not
familiar with the tools and techniques used in debugging.
➢ Can be difficult to reproduce: Some bugs may be difficult to reproduce, which can
make it challenging to identify and resolve them.
➢ Can be difficult to diagnose: Some bugs may be caused by interactions between
different components of a software system, which can make it challenging to identify
the root cause of the problem.
➢ Can be difficult to fix: Some bugs may be caused by fundamental design flaws or
architecture issues, which can be difficult or impossible to fix without significant
changes to the software system.
➢ Limited insight: In some cases, debugging tools can only provide limited insight into
the problem and may not provide enough information to identify the root cause of the
problem.
➢ Can be expensive: Debugging can be an expensive process, especially if it requires
additional resources such as specialized debugging tools or additional development
time.
❖ Differences Between Testing and Debugging.
Parameters Testing Debugging
Basics It is the process using which we It is the process using which we correct the
find errors and bugs. bugs that we found during the testing
process.
Code We can identify the failure of We use this process to provide the code
Failure any implemented code using failure with an absolution.
this process.
Errors Errors get displayed in this Errors get deducted and dissolved in this
process. process.
Design One does not need any design Design knowledge is a prerequisite to
Knowledge knowledge to perform testing. debugging.
Insiders and Both- insiders and outsiders can Only an insider can perform debugging.
Outsiders perform testing. No outsider can perform it on the intended
software.
SDLC It is a stage of SDLC (Software It’s not at all an aspect of the SDLC. It
Development Life Cycle). rather occurs as a consequence of the
process of testing.
Steps This process consists of both- This process seeks to match the available
validation as well as verification symptoms with the cause. Only then it
of the errors. leads to the correction of the errors.
We check whether we are developing the We check whether the developed product is
right product or not right.
Verification is also known as static testing. Validation is also known as dynamic testing.
Verification includes different methods like Validation includes testing like functional
Inspections, Reviews. testing, system testing, integration, and User
acceptance testing.
The execution of code does not happen in the In validation testing, the execution of code
verification testing. happens.
Verification testing is executed by the Quality Validation testing is executed by the testing
assurance team to make sure that the product team to test the application.
is developed according to customers'
requirements.
Verification is done before the validation After verification testing, validation testing
testing. takes place.
Verification is about process, standard and Validation is about the product.
guideline.
Collecting data simply means collecting all information and data regarding defect. It must
include its impact, proof that defect exists, how much time defect existed, is it a reoccu rring
defect. One should also communicate with customers or employees. Before identifying root
cause, one needs to analyse defect or problem completely. One needs to gather all required
information or evidence.
Identifying root cause simply means to identify main cause that is causing defect to arise. It
must include why does defect exists and what’s main reason for its existence. Several tools
are available nowadays to identify root cause of defect. One need to choose correct tool that
will lead to effective result. To identify root causes, brainstorming session should also be
performed session. It is basically a technique by which various efforts are made to define a
specific problem or defect. There might be more than one root cause of defect. So, one
needs to identify as many causes as possible.
After identifying root cause, one to take some measures and actions to resolve or eliminate
defect. Main focus should be on eliminating root cause of problem or defect so that it does
not occur in future. One needs to identify some effective measures and corrective actions
that are required to be taken. Before choosing any method, make sure that it does not cause
any other side effect or problem in system.
One needs to make some plan regarding defect reoccurrence. Defect should not reoccur in
future therefore, one needs to improve skill, perform tasks in proper way, follow proper
documents of preventive actions.
❖ Cost of Quality :
It is the most established, effective measure of quantifying and calculating the business value
of testing. There are four categories to measure cost of quality: Prevention costs, Detection
costs, Internal failure costs, and External failure costs.
Psychology of Testing
In software testing, psychology plays an extremely important role. It is one of those factors
that stay behind the scene, but has a great impact on the end result. Categorized into three
sections, the psychology of testing enables smooth testing as well as makes the process
hassle-free. It is mainly dependent on the mindset of the developers and testers, as well as the
quality of communication between them. Moreover, the psychology of testing improves
mutual understanding among team members and helps them work towards a common goal.
❖ Buddy Testing
▪ Buddy Testing as the name suggests involves two team members, one from the
development team and one from the testing team. Both individuals will work
together on the same module sharing ideas and uncovering defects and bugs in the
application. It may be advantageous to team up with people with good working
relationships as buddies to overcome any apprehensions.
▪ In this technique, two team members work on the same machine where one of the
team members will work with the system and the other one is responsible for making
notes and scenarios. One person known as the primary tester performs the testing
while the other person, known as the buddy tester, observes and provides assistance as
needed.
Process of Buddy Testing
The process of buddy testing involves the following steps:
1. Identify the primary tester and the buddy tester: The primary tester is
typically an experienced tester with a strong understanding of the software or
system being tested, while the buddy tester may be a less experienced tester or a
subject matter expert with knowledge of the domain being tested.
2. Define the scope and objectives of the testing: The primary tester and the
buddy tester should agree on the scope and objectives of the testing, including
the specific features or functionality that will be tested and the expected results.
3. Plan the testing: The primary tester and the buddy tester should develop a
testing plan that outlines the specific test cases and test scenarios that will be
executed, as well as the resources and tools needed to complete the testing.
4. Execute the testing: The primary tester performs the testing while the buddy
tester observes and provides assistance as needed. The buddy tester may also be
responsible for documenting defects and issues that are identified during the
testing.
5. Review and debrief: After the testing is complete, the primary tester and the
buddy tester should review the results of the testing and debrief to discuss any
issues or challenges that were encountered.
• Enhanced effectiveness: By working together, the primary tester and the buddy
tester can share knowledge and expertise, and catch defects more quickly.
• Increased efficiency: Buddy testing can help reduce the time and resources
needed to complete the testing process.
• Improved quality: Buddy testing can help ensure that the software or system
being tested is of high quality, as defects and issues are more likely to be
identified and addressed.
• Enhanced collaboration: Buddy testing promotes collaboration between team
members and can help build trust and teamwork within the team.
• Less workload: There will be less workload in presence of another team
member and the tester can think clearly and use more scenarios for testing.
❖V Model
Verification: It involves a static analysis method (review) done without executing code. It is
the process of evaluation of the product development process to find whether specified
requirements meet.
Validation: It involves dynamic analysis method (functional, non-functional), testing is done
by executing code. Validation is the process to classify the software after the completion of
the development process to determine whether the software meets the customer expectations
and requirements.
Developer’s Life cycle
➢ Requirement Analysis: This phase contains detailed communication with the
customer to understand their requirements and expectations. This stage is known as
Requirement Gathering.
➢ System Design: This phase contains the system design and the complete hardware
and communication setup for developing product.
➢ Architectural Design: System design is broken down further into modules taking up
different functionalities. The data transfer and communication between the internal
modules and with the outside world (other systems) is clearly understood.
➢ Module Design: In this phase the system breaks down into small modules. The
detailed design of modules is specified, also known as Low-Level Design (LLD).
➢ Coding Phase: Based on the requirements, a suitable programming language is
decided. There are some guidelines and standards for coding. Before checking in the
repository, the final build is optimized for better performance, and the code goes
through many code reviews to check the performance.
Tester life cycle
1.Unit Testing: In the V-Model, Unit Test Plans (UTPs) are developed during the module
design phase. These UTPs are executed to eliminate errors at code level or unit level. A
unit is the smallest entity which can independently exist, e.g., a program module. Unit
testing verifies that the smallest entity can function correctly when isolated from the rest
of the codes/ units.
2.Integration Testing: After completion of unit testing Integration testing is performed. In
integration testing, the modules are integrated and the system is tested. Integration testing is
performed on the Architecture design phase. This test verifies the communication of modules
among themselves.
3.System Testing: System Tests Plans are developed during System Design Phase. Unlike
Unit and Integration Test Plans, System Tests Plans are composed by the client? business
team. System Test ensures that expectations from an application developer are met.
4.Acceptance Testing: Acceptance testing is related to the business requirement analysis
part. It includes testing the software product in user atmosphere. Acceptance tests reveal the
compatibility problems with the different systems, which is available within the user
atmosphere. It conjointly discovers the non-functional problems like load and performance
defects within the real user atmosphere.
❖ Static Testing
Static testing is a sort of software testing in which an application is tested without executing
any code. In order to discover errors, manual or automated reviews of code, requirement
papers, and document design are performed. Static testing's major goal is to improve the
quality of software programmes by detecting flaws early in the development process.
Static testing entails manual or automated document evaluations. This evaluation is carried
out at the initial round of testing in order to detect defects early in the STLC process. It looks
over work documents and gives feedback. Non-execution testing is sometimes known as
verification testing.
Examples of work documents are given below −
• Requirement specifications
• Design document
• Source Code
• Test Plans
• Test Cases
• Test Scripts
• Help or User document
• Web Page content
The following are the primary goals of static testing −
• Static testing will help to reduce manufacturing flaws.
• Static testing will detect, anticipate, and correct issues as soon as possible.
• It is utilized to save time as well as money.
• It's used to find faults early in the SDLC process, when they're easier to fix.
❖ Dynamic Testing
A code is executed during Dynamic Testing. It examines the software system's functionality,
memory/CPU use, and overall system performance. As a result, the term "Dynamic" was
coined.
The major goal of this testing is to ensure that the software product meets the needs of the
business. This type of testing is also known as execution technique or validation testing.
Dynamic testing runs the software and compares the results to what was predicted. Dynamic
testing is conducted at all levels of testing and can be done with either a black or a white
box.
It is reliable because it tests the application with It is not reliable because there is a
the help of tools and test scripts. possibility of human error, which may not
be delivered the bug-free application.
The script can be reused across multiple It could be possible when the test case
releases. only needs to run once or twice.
The execution is always faster than the manual; It is time consuming due to the usage of
that's why the automation testing process is the human resources.
time-saving.
Without having an understanding of There is no need-to-know programming
programming language, we cannot write the test language but should have the product
script. knowledge to write the test case.
The automation test engineer can use the There is no need for a framework while
different types of frameworks like Data driven, using manual testing.
Hybrid, modular driven, and keyword-
driven to faster the automation process.
❖ Test Matrics:
Software testing metrics are quantifiable indicators of the software testing process progress,
quality, productivity, and overall health. The purpose of software testing metrics is to
increase the efficiency and effectiveness of the software testing process while also assisting
in making better decisions for future testing by providing accurate data about the testing
process. A metric expresses the degree to which a system, system component, or process
possesses a certain attribute in numerical terms. A weekly mileage of an automobile
compared to its ideal mileage specified by the manufacturer is an excellent illustration of
metrics.
Important Metrics
The following are some of the other important software metrics:
➢ Defect metrics: Defect metrics help engineers understand the many aspects of
software quality, such as functionality, performance, installation stability, usability,
compatibility, and so on.
➢ Schedule Adherence: Schedule Adherence’s major purpose is to determine the time
difference between a schedule’s expected and actual execution times.
➢ Test case efficiency: Test case efficiency is a measure of how effective test cases are
at detecting problems
➢ Defects finding rate: : It is used to determine the pattern of flaws over a period of
time.
➢ Defect Fixing Time: The amount of time it takes to remedy a problem is known as
defect fixing time.
➢ Defect cause: It’s utilized to figure out what’s causing the problem.
❖ Types of risks
1. Schedule Risk:
Schedule related risks refers to time related risks or project delivery related
planning risks. The wrong schedule affects the project development and
delivery. These risks are mainly indicates to running behind time as a result
project development doesn’t progress timely and it directly impacts to delivery
of project. Finally if schedule risks are not managed properly it gives rise to
project failure and at last it affect to organization/company economy very badly.
Some reasons for Schedule risks –
• Time is not estimated perfectly
• Improper resource allocation
• Tracking of resources like system, skill, staff etc
• Frequent project scope expansion
• Failure in function identification and its’ completion
2 Budget Risk:
Budget related risks refers to the monetary risks mainly it occurs due to budget
overruns. Always the financial aspect for the project should be managed as per
decided but if financial aspect of project mismanaged then there budget concerns
will arise by giving rise to budget risks. So proper finance distribution and
management are required for the success of project otherwise it may lead to project
failure.
Some reasons for Budget risks –
• Wrong/Improper budget estimation
• Unexpected Project Scope expansion
• Mismanagement in budget handling
• Cost overruns
• Improper tracking of Budget
3 Operational Risks:
Operational risk refers to the procedural risks means these are the risks which happen in
day-to-day operational activities during project development due to improper process
implementation or some external operational risks.
Some reasons for Operational risks –
• Insufficient resources
• Conflict between tasks and employees
• Improper management of tasks
• No proper planning about project
• Less number of skilled people
• Lack of communication and cooperation
• Lack of clarity in roles and responsibilities
• Insufficient training
4. Technical Risks:
Technical risks refers to the functional risk or performance risk which means this
technical risk mainly associated with functionality of product or performance part of the
software product.
Some reasons for Technical risks –
• Frequent changes in requirement
• Less use of future technologies
• Less number of skilled employee
• High complexity in implementation
• Improper integration of modules
•
5. Programmatic Risks:
Programmatic risks refers to the external risk or other unavoidable risks. These are the
external risks which are unavoidable in nature. These risks come from outside and it is
out of control of programs.
Some reasons for Programmatic risks –
• Rapid development of market
• Running out of fund / Limited fund for project development
• Changes in Government rules/policy
• Loss of contracts due to any reason