2. SoftwareTesting Fundamentals
• Software testing can be stated as the process of verifying and validating whether 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 by 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.
Kanyapur Polytechnic 2
3. Continued…
• Software testing can be divided into two steps:
➢ Verification: it refers to the set of tasks that ensure that the software correctly implements a
specific function.
➢ Validation: it refers to a different set of tasks that ensure that the software that has been
built is traceable to customer requirements.
Verification: “Are we building the product right?”
Validation: “Are we building the right product?”
Kanyapur Polytechnic 3
4. A Strategic Approach to SoftwareTesting
• Any Testing Strategy should have the following characteristics:
➢ Use of effective technical reviews
➢ Should begin at the component level and cover the entire system
➢ Different testing techniques are appropriate for different software engineering approaches
and at different points in time
➢ Testing is conducted by the developer of the software and an independent test group
➢ Debugging must be accommodated in any testing strategy
Kanyapur Polytechnic 4
5. DifferentTypes of SoftwareTesting
• Manual Testing
- Testing software manually, i.e., without using any automation tool or any script
- The tester takes over the role of an end-user and tests the software to identify any
unexpected behavior or bug
• Automatic Testing
- also known as Test Automation
- It is the process of transforming the manual test cases into test scripts with the help of
automation technologies or any programming language
- It is used to re-run the test scenarios quickly and repeatedly, that were performed manually
in manual testing
- As compared to manual testing, it increases the test coverage, improves accuracy, and saves
time and money
Kanyapur Polytechnic 5
6. Different types of SoftwareTestingTechniques
• Black Box Testing:
- The technique of testing in which the tester doesn’t have access to the source code of the
software and is conducted at the software interface without any concern with the internal
logical structure of the software
• White Box Testing:
- The technique of testing in which the tester is aware of the internal workings of the product,
has access to its source code, and is conducted by making sure that all internal operations are
performed according to the requirement specifications
Kanyapur Polytechnic 6
7. Continued…
Black Box Testing White BoxTesting
An application's internal workings are not
necessary
Knowledge of the internal workings is a must
Also known as closed box/data-driven testing
Also known as structural testing or clear box
testing
Performed by end users, testers, and
programmers
Typically performed by testers and developers
This can only be accomplished by trial and error
Data domains and internal bounds can be tested
more thoroughly
Kanyapur Polytechnic 7
8. Testing Strategies for Conventional
Software
• Unit Testing
- individual units/components of a software/system are tested
- The purpose is to validate that each unit of the software performs as designed
- It focuses on the internal processing logic and data structures within the boundaries of a component.
- This type of testing can be conducted in parallel for multiple components
• Integration Testing
- individual units are combined and tested as a group
- The purpose of this level of testing is to expose faults in the interaction between integrated units
- It focuses on the design and construction of the software architecture
Kanyapur Polytechnic 8
9. Continued…
• Regression Testing
- It is the re-execution of some subset of tests that have already been conducted to ensure that
changes have not propagated unintended side effects
- Regression testing may be conducted manually, by re-executing a subset of all test cases or using
automated capture/playback tools
• Smoke Testing
- It is an integration testing approach that is commonly used when product software is developed
- Smoke testing is performed by developers before releasing the build to the testing team and after
releasing the build to the testing team it is performed by testers whether to accept the build for
further testing or not
- It is designed as a pacing (Speedy) mechanism for time-critical projects, allowing the software
team to assess the project on a frequent basis
Kanyapur Polytechnic 9
10. ValidationTesting
❑ Through Validation testing, requirements are validated against the software constructed.
These are high-order tests where validation criteria must be evaluated to assure that
software meets all functional, behavioral and performance requirements. It succeeds when
the software functions in a manner that can be reasonably expected by the customer.
Kanyapur Polytechnic 10
11. Validation testing using Alpha & Beta
Testing
• Alpha Testing:
- A type of acceptance testing which is performed to identify all possible bugs/issues before releasing
the product to the end-user
- It is a preliminary software field test carried out by a team of users to find out the bugs that were not
found previously by other tests
- It simulates a real user environment by carrying out tasks and operations that actual user might perform
• Beta Testing:
- A type of acceptance testing which is the final test before shipping a product to the customers
- It is implemented by "real users "of the software application in a "real environment." The software is
released to a limited number of end-users of the product to obtain feedback on the product quality.
- It reduces product failure risks and increases the quality of the product through customer validation.
- Direct feedback from customers is a significant advantage of beta testing which helps the developers to
make final changes before releasing the software product.
Kanyapur Polytechnic 11
12. Continued…
Alpha Testing Beta Testing
Involves both the white box and black box testing Uses only black box testing
Performed by testers who are usually internal employees of the
organization
Performed by clients who are not part of the organization
Performed at the developer’s site Performed by the actual end-users of the product
Does not check reliability and security Checks reliability and security
Ensures the quality of the product before forwarding to beta testing Ensures that the product is ready for real time users
Requires a testing environment or a lab Doesn’t require a testing environment or lab
May require a long execution cycle Requires only a few weeks of execution
Developers can immediately address the critical issues or fixes
Most of the collected issues or feedback are implemented in future
versions of the product
Multiple test cycles are organized Only one or two test cycles are there
Kanyapur Polytechnic 12
13. SystemTesting
❑ In system testing, software and other system elements are tested as a whole. Software is
combined with other system elements like Hardware, People, Database and the overall
functioning is checked by conducting a series of tests. These tests fully exercise the
computer based system.
Kanyapur Polytechnic 13
14. Continued…
• Recovery testing: Systems must recover from faults and resume processing within a pre-
specified time. It forces the system to fail in a variety of ways and verifies that recovery is
properly performed.
• Security Testing: This verifies that protection mechanisms built into a system will protect it
from improper penetrations. Tester plays the role of hacker.
• Stress testing: It executes a system in a manner that demands resources in abnormal
quantity, frequency or volume and tests the robustness of the system.
• Performance Testing: This is designed to test the run-time performance of the software
within the context of an integrated system. They require both hardware and software
instrumentation.
Kanyapur Polytechnic 14
15. Debugging
• Debugging is the process of identifying and resolving errors, or bugs, in a software system.
It can be a time-consuming and complex task, but it is essential for ensuring that a software
system is functioning correctly.
• Steps involved in debugging are:
- Problem identification and report preparation
- Assigning the report to the software engineer to verify that it is genuine
- Defect Analysis using modeling, documentation, finding and testing candidate flaws, etc.
- Defect Resolution by making required changes to the system
- Validation of corrections
Kanyapur Polytechnic 15
16. Debugging vsTesting
Testing Debugging
Testing is the process to find bugs and errors.
Debugging is the process of correcting the bugs found
during testing.
It is the process to identify the failure of implemented code. It is the process to give a solution to code failure.
Testing is done by the tester.
Debugging is done either by the programmer or by the
developer.
There is no need of design knowledge in the testing
process.
Debugging can’t be done without proper design
knowledge.
Testing can be done by insiders as well as outsiders. Debugging is done only by insiders
Testing is initiated after the code is written. Debugging commences with the execution of a test case.
Kanyapur Polytechnic 16
17. Debugging Process Strategies
➢ Brute Force: Study the system for a larger duration in order to understand the system. It helps the
debugger to construct different representations of systems to be debugged depending on the need. A
study of the system is also done actively to find recent changes made to the software.
➢ Backtracking: Backward analysis of the problem which involves tracing the program backward from
the location of the failure message in order to identify the region of faulty code. A detailed study of the
region is conducted to find the cause of defects.
➢ Forward analysis of the program involves tracing the program forwards using breakpoints or print
statements at different points in the program and studying the results. The region where the wrong
outputs are obtained is the region that needs to be focused on to find the defect.
➢ Using past experience with the software to debug the software with similar problems in nature. The
success of this approach depends on the expertise of the debugger.
➢ Cause elimination introduces the concept of binary partitioning. Data related to the error occurrence are
organized to isolate potential causes. A list of all possible causes is developed and tests are conducted
to eliminate each of them
Kanyapur Polytechnic 17
18. Continued…
➢ Static analysis: Analyzing the code without executing it to identify potential bugs or errors. This
approach involves analyzing code syntax, data flow, and control flow.
➢ Dynamic analysis: Executing the code and analyzing its behavior at runtime to identify errors or bugs.
This approach involves techniques like runtime debugging and profiling.
➢ Collaborative debugging: Involves multiple developers working together to debug a system. This
approach is helpful in situations where multiple modules or components are involved, and the root
cause of the error is not clear.
➢ Logging and Tracing: Using logging and tracing tools to identify the sequence of events leading up to
the error. This approach involves collecting and analyzing logs and traces generated by the system
during its execution.
➢ Automated Debugging: The use of automated tools and techniques to assist in the debugging process.
These tools can include static and dynamic analysis tools, as well as tools that use machine learning
and artificial intelligence to identify errors and suggest fixes.
Kanyapur Polytechnic 18