Foundation of Programming
Foundation of Programming
Foundation of Programming
Testing is a process of determining if the actual software product meets the expected
criteria and ensuring that it is free of defects. It entails the use of manual or automated
methods to assess one or more attributes of interest by executing software or system
components. In contrast to real requirements, software testing's goal is to find mistakes,
gaps, and missing requirements. Testing is important because it allows any problems or
mistakes in the program to be found early and fixed before the software product is
delivered. A well-tested software product provides dependability, security, and excellent
performance, which saves time, money, and improves customer satisfaction. (Hamilton,
2022)
Debugging
Define and describe
1. What a bug is.
A bug is a flaw in a program that causes it to crash or deliver incorrect results.
Insufficient or incorrect logic is the source of the problem. A bug is a failure or
divergence from expected outcomes caused by an error, mistake, flaw, or fault.
The majority of defects are caused by human faults in source code or design.
When a program includes a high number of flaws that influence program
functioning and create inaccurate results, it is said to be buggy. Some flaws may
not have a significant impact on the program's operation and may be unnoticed for
a long period. When major problems are left undetected, a software may crash.
Another type of issue known as a security flaw can allow a malevolent person to
get around access limits and get unauthorized access. (techopedia, 2017)
• Unit Testing
UNIT TESTING is a sort of testing process that examines different software units
or components. The goal is to ensure each unit of software code works as
intended. Unit testing is carried out by developers throughout the development
(coding) stage of a software. Unit tests are used to isolate a part of code and
ensure that it is accurate. A singular function, method, process, module, or object
might be considered a unit.
Unit testing is an important aspect of agile software development. Developers may
use unit testing to examine the performance of every unit and identify flaws early
on. Unit tests save time and money while ensuring higher code quality across the
online product development phase. (Hamilton, 2022)
Flowcharts & Pseudocode
Defect Life Cycle
Bug Life Cycle or Defect Life Cycle in software testing, the life cycle refers to the exact
collection of phases that a defect or bug passes through throughout the course of its
existence. The goal of the defect life cycle is to make the defect repair process more
systematic and efficient by conveniently coordinating and communicating the current
status of the problem to multiple assignees.
New New
Assigned
Assigned
Minor Bug
Completed Closed
Closed
Defect States:
• New
When a new flaw is discovered, it is marked as New, and validations and testing
are carried out on it.
• Assigned
The development team is allocated to a freshly manufactured defect to work on.
This is given to a developer by lead developer or the testing team manager.
• Open
Here, the developer begins the process of studying the fault and, if necessary,
correcting it.
• Fixed
When a developer has completed the work of resolving a defect by implementing
the necessary modifications, he can label the problem as Fixed.
• Pending retest
The developer sends the defect to the tester, who is responsible for retesting it at
their end, and the defect's state remains Pending Retest until the tester completes
the task.
• Retest
At this step, the tester begins retesting the fault to see if the developer has properly
corrected the problem according to the requirements.
• Reopen
If a problem with the defect continues, it will be reassigned to the developer for
testing, and the defect's status will be changed to Reopen.
• Verified
If the tester finds no issues with the defect after it has been allocated towards the
developer for additional testing and believes that the fault has been addressed
correctly, the defect's status is changed to Verified.
• Closed
When the problem is no longer present, the tester marks it as Closed.
Software Quality Metrics
Summary