• UNIT –IV
• Testing Strategies: A strategic approach to software testing, test
strategies for conventional software ,black-box and white-box testing,
validation testing, system testing, the art of debugging. Metrics for
Process and Products: Software measurement,metrics for software
quality.
2.
Introduction:
Software Testing isa type of investigation to find out any error present
in the software so that the errors can be reduced or removed to
increase the quality of the software and to check whether it fulfills the
specified requirements or not.
3.
Software testing isan important process in the Software Development
Lifecycle(SDLC)
• Software Testing is a process of verifying and validating whether the
Software Product or Application is working as expected or not and
satisfies user requirements efficiently and effectively.
4.
• Verification: Thisstep involves checking if the software is doing what
is supposed to do. Its like asking, “Are we building the product the
right way?“
• Validation: This step verifies , the software meets the customer’s
needs and requirements. Its like asking, “Are we building the right
product?“
• .
5.
Importance of SoftwareTesting:
Defects can be Identified Early:Bugs can be identified early and fixed
before the delivery of the software.
Improves Quality of Software: Software Testing uncovers the defects in
the software, and fixing them improves the quality of the software.
Increased Customer Satisfaction: Software testing ensures reliability,
security, and high performance which results in saving time, costs, and
customer satisfaction.
6.
• Helps withScalability: Software testing type non-functional testing
helps to identify the scalability issues and the point where an
application might stop working.
• Saves Time and Money: After the application is launched it will be
very difficult to trace and resolve the issues, as performing this
activity will incur more costs and time.
• Thus, it is better to conduct software testing at regular intervals
during software development.
7.
Benefits of SoftwareTesting
• Product Quality: Testing ensures the delivery of a high-quality product
as the errors are discovered and fixed early in the development cycle.
• Customer Satisfaction: Software testing aims to detect the errors or
vulnerabilities in the software early in the development phase so that
the detected bugs can be fixed before the delivery of the product.
8.
• Cost-Effective: Testingany project on time helps to save money and
time for the long term. If the bugs are caught in the early phases of
software testing, it costs less to fix those errors.
• Security: Security testing is a type of software testing that is focused
on testing the application for security vulnerabilities from internal or
external sources.
9.
• A testingstrategy is a high-level, long-term plan that outlines how
software testing will be approached and conducted across a project or
organization
10.
• The mainobjective of software testing is to design the tests in such a
way that it systematically finds different types of errors without taking
much time and effort so that less time is required for the
development of the software.
• The overall strategy for testing software includes:
12.
• 1.Specifying theobjectives of testing in a clear and detailed manner
• 2.For the software, identifying the user’s category and developing a profile for
each user
• 3.Developing a test plan to give value and focus on rapid-cycle testing.
• 4.Robust software is developed that is designed to test itself.
• 5.Before testing, using effective formal reviews as a filter.
• 6.Conduct formal technical reviews to evaluate the nature, quality or ability of the
test strategy and test cases.
• 7.For the testing process, developing a approach for the continuous development.
13.
• Test strategiesfor conventional software:
Testing strategies for conventional software involve structured approaches to ensure
the software meets its requirements, is free from critical defects, and performs
reliably.( Overall test planning and approach)
Examples of TestingStrategies:
• Big Bang TestingTest all components together after integration.
• Top-Down TestingStart testing from top-level modules and integrate
downwards.
• Bottom-Up TestingBegin with low-level modules and test upward.
• Incremental TestingTest modules as they are integrated, step-by-step.
16.
• V-Model TestingTestingis planned in parallel with development
stages.
• Agile TestingContinuous testing in Agile development cycles.
• Risk-Based TestingFocus on high-risk areas first.
17.
The following arecommon testing strategies:
• Black box testing- Tests the functionality of the software without looking at the
internal code structure.
• White box testing - Tests the internal code structure and logic of the software.
• Unit testing - Tests individual units or components of the software to ensure they are
functioning as intended.
• Integration testing- Tests the integration of different components of the software to
ensure they work together as a system.
18.
• Functional testing-Tests the functional requirements of the software to ensure they are met.
• System testing- Tests the complete software system to ensure it meets the specified requirements.
• Acceptance testing - Tests the software to ensure it meets the customer's or end-user's
expectations.
• Regression testing - Tests the software after changes or modifications have been made to ensure
the changes have not introduced new defects.
• Performance testing - Tests the software to determine its performance characteristics such as
speed, scalability, and stability.
• Security testing- Tests the software to identify vulnerabilities and ensure it meets security
requirements.
19.
Different Types ofSoftware Testing
Types of Software Testing mainly categorized into the two domains:
1. Manual Testing
2. Automation Testing
Manual testing: manual testing will be check the defect manually with trying one by one function is
working as expected.
Advantages :
• Less expensive: It is less expensive as it does not require any high-level skill or a specific type of
tool.
• No coding is required: No programming knowledge is required while using the black box
testing method. It is easy to learn for the new testers.
• Efficient for unplanned changes: Suitable for unplanned changes to the application, as it can be
adopted easily.
20.
• Automation Testing
•Automated Testing is a technique where the Tester writes scripts independently and uses
suitable Software or Automation Tools to test the software.
• Advantages of Automation Testing:
• Improves Reliability of Tests: There is equal focus on all the areas of the testing, thus it
producesbest quality end product.
• Increases amount of test coverage: More test cases can be created and executed for the
application under test, resulting in higher test coverage and the detection of more bugs.
• Minimizing Human Interaction: Everything is automated from test case creation to
execution thus there are no changes for human error due to neglect.
21.
• Types ofManual Testing
1.White box testing – Tests the internal code structure and logic of the software.
2.Black box testing– Tests the functionality of the software without looking at the internal code
structure.
3. Gray Box Testing
combination of the Black Box Testing technique and the White Box Testing technique i.e the
internal structure is partially known in Gray Box Testing.
22.
Black box testing
Black-boxtesting is a type of software testing in which the tester is not concerned with the internal
knowledge or implementation details of the software, but focuses on validating the functionality
based on the provided specifications or requirements.
•
23.
Black Box TestingTypes are following
1. Functional Testing
2. Regression Testing
3. Nonfunctional Testing (NFT)
24.
• 1..Functional Testing:
Itdetermines the system’s software functional requirements.
• 2.Regression Testing:
It ensures that the newly added code is compatible with the existing code. In other words, a new software update
has no impact on the functionality of the software. This is carried out after a system maintenance operation and
upgrades.
• 3.Nonfunctional Testing:
Nonfunctional testing is also known as NFT. This testing is not functional testing of software.
It focuses on the software’s performance, usability, and scalability
25.
Tools Used forBlack Box Testing:
• Appium
• Selenium
• Microsoft Coded UI
• Appium: Mobile app testing (native, hybrid, mobile web).
• Selenium: Web application testing.
• Coded UI: Previously used for UI testing within Visual Studio (web and desktop), now
deprecated.
26.
Black box testingMethods
Syntax-Driven Testing – This type of testing is applied to systems that can be syntactically
represented by some language.
Equivalence partitioning – It is often seen that many types of inputs work similarly so instead of
giving all of them separately we can group them and test only one input of each group.
This technique involves two steps:
Identification of equivalence class – Partition any input domain into a minimum of two sets:
Valid values
Invalid values.
For example, if the valid range is 0 to 100 then select one valid input like 49 and one invalid like 104.
27.
1.Generating test cases–
(a) To each valid and invalid class of input assign a unique identification number.
(b) Write a test case covering all valid and invalid test cases
2. Boundary value analysis – Boundaries are very good places for errors to occur.
Test at the boundaries between partitions, where errors often occur.
Requirement-based testing –
It includes validating the requirements given in the SRS of a software system.
28.
Cause effect Graphing–
This technique establishes a relationship between logical input called causes with corresponding
actions called the effect.
The causes and effects are represented using Boolean graphs.
29.
Advantages of BlackBox Testing:
• The tester does not need to have more functional knowledge or programming skills to implement
the Black Box Testing.
• It is efficient for implementing the tests in the larger system.
• Tests are executed from the user’s or client’s point of view.
• Test cases are easily reproducible.
• It is used to find the ambiguity and contradictions in the functional specifications.
30.
Disadvantages of BlackBox Testing:
• Without clear functional specifications, test cases are difficult to implement.
• It is difficult to execute the test cases because of complex inputs at different stages of testing.
• Sometimes, the reason for the test failure cannot be detected.
31.
White Box Testing
•Involves the internal structure and workings of a software application. The tester has access to the
source code and uses this knowledge to design test cases that can verify the correctness of the
software at the code level.
• It analyze the internal design , code structure&working of complete software product.
• It is also called clear box testing, glass box testing, open box, Transparent box and code based
testing.
• Tester has knowledge about internal structure and programming of the software.
• It is mostly done by software developers.
• Perform with unit testing and Integration testing.
32.
• Features ofwhite box testing:
Code coverage analysis: Analyze the code coverage of an application.which helps to identify the
areas of the code that are not being tested.
Access to the source code: Access to the application’s source code, which makes it possible to test
individual functions, methods, and modules.
Knowledge of programming languages:
Testers performing white box testing must have knowledge of programming languages like Java, C+
+, Python, and PHP to understand the code structure and write tests.
Identifying logical errors: Identify logical errors in the code, such as infinite loops or incorrect
conditional statements.
33.
White Box Testingtechniques:
Statement coverage:
In this technique, the aim is to traverse all statements at least once.
Hence, each line of code is tested.
Branch Coverage:
Test cases are designed that each branch from all decision points is traversed at least once.
Multiple Condition Coverage:
All the possible combinations of the possible outcomes of conditions are tested at least once.
34.
Basis Path Testing:
Controlflow graphs are made from code or flowchart and then Cyclomatic complexity is calculated,
which defines the number of independent paths so that the minimal number of test cases can be
designed for each independent path.
35.
Advantages of Whitebox Testing:
• Thorough Testing: White box testing is thorough as the entire code and structures are tested.
• Code Optimization: It results in the optimization of code removing errors and helps in removing
extra lines of code.
• Early Detection of Defects: It can start at an earlier stages only.
• Detection of Complex Defects: Testers can identify defects that cannot be detected through other
testing techniques.
36.
Disadvantages of WhiteBox Testing
• Programming Knowledge and Source Code Access: Testers need to have programming
knowledge and access to the source code to perform tests.
• Overemphasis on Internal Workings: Testers may focus too much on the internal workings of
the software and may miss external issues.
• Test Case Overhead: Redesigning code and rewriting code needs test cases to be written again.
• Dependency on Tester Expertise: Testers are required to have in-depth knowledge of the code
and programming language as opposed to black-box testing.
• Increased Production Errors: High chances of errors in production.
37.
Difference between BlackBox Testing and White Box Testing
Black Box Testing
• In t Black Box Testing internal structure or the program or the code is hidden and nothing is known about
it.
• It is mainly focused on testing the functionality of the software, ensuring that it meets the requirements and
specifications.
• It uses methods like Equivalence Partitioning, Boundary Value Analysis, and Error Guessing to create
test cases.
• It does not require any knowledge of the internal workings of the software, and can be performed by testers
who are not familiar with programming languages..
• Black box testing is generally used for testing the software at the functional level.
38.
White Box Testing
•White Box Testing is a way of testing the software in which the tester has knowledge about the internal
structure or the code or the program of the software
• White box testing is mainly focused on ensuring that the internal code of the software is correct and efficient.
• White box testing uses methods like Control Flow Testing, Data Flow Testing and
Statement Coverage Testing.
• White box testing is used for testing the software at the unit level, integration level and system level.
• White box testing requires knowledge of programming languages, software architecture and design patterns
structure or the code or the program of the software
• Code implementation is necessary for white box testing.
Some other testingtypes:
1.Black box testing– Tests the functionality of the software without
looking at the internal code structure.
2.White box testing – Tests the internal code structure and logic of the
software.
3.Unit testing – Tests individual units or components of the software to
ensure they are functioning as intended.
41.
• 4.Integration testing–Tests the integration of different components of
the software to ensure they work together as a system.
• 5.Functional testing– Tests the functional requirements of the
software to ensure they are met.
• 6.System testing– Tests the complete software system to ensure it
meets the specified requirements.
42.
7.Acceptance testing –Tests the software to ensure it meets the
customer’s or end-user’s expectations.
8.Regression testing – Tests the software after changes or modifications
have been made to ensure the changes have not introduced new defects.
9.Performance testing – Tests the software to determine its performance
characteristics such as speed, scalability, and stability.
10.Security testing – Tests the software to identify vulnerabilities
and ensure it meets security requirements.
43.
• Validation Testing:
Verificationand Validation in Software Engineering:
• Verification and Validation are the processes of investigating whether a software system satisfies
specifications and standards of required software product or not
• Verification and Validation both play an important role in developing good software.
• Verification helps in examining whether the product is built right according to requirements.
• validation helps in examining whether the right product is built to meet user needs.
44.
• Verification isthe process of checking that software achieves its goal without any bugs. It is the
process to ensure whether the product that is developed is right or not.
• It verifies whether the developed product fulfills the requirements that we have.
• Verification is static testing.
• Verification means Are we building the product right?
45.
• Some ofthe activities of verification.
• Inspections: This is when we carefully look over the software’s design or code to spot any
potential problems or areas that could be improved.
• Reviews: This is a team effort, where everyone gets together to assess the software’s requirements,
design, or code. The goal is to make sure everything is on track and meets the specified objectives.
• Walkthroughs: In a walkthrough, the developer or designer gives a casual presentation of their
work, explaining how it meets the project’s requirements. It’s a great way to get everyone on the
same page.
• Desk-Checking: This is when a developer manually reviews their own code or design to catch any
mistakes or issues before moving forward.
Validation Testing
• Theprocess of evaluating the product at the end of the development process to determine whether
it satisfies specified business requirements or ensures that the product actually meets the client's
needs. It can also be defined as to demonstrate that the product fulfills its intended use when
deployed on appropriate environment.
• The IEEE-STD-610 definition of validation testing is:
• “Validation is an activity that ensures that an end product stakeholder’s true needs and
expectations are met.”
48.
• It answersto the question, Are we building the right product?
• Methods used in validation are Black Box Testing, White Box Testing
and Non-Functional testing.
49.
Validation Testing -Workflow:
• Validation testing can be best demonstrated using V-Model.
• The Software/product under test is evaluated during this type of testing.
• Unit testing– Tests individual units or components of the software to
ensure they are functioning as intended.
Integration testing– Tests the integration of different components of
the software to ensure they work together as a system.
System testing– Tests the complete software system to ensure it meets
the specified requirements.
• Acceptance testing – Tests the software to ensure it meets the
customer’s or end-user’s expectations.
54.
Advantages of ValidationTesting:
Some of the top advantages of Validation testing:
• Any bugs missed during verification will be detected while running validation tests.
• If specifications were incorrect and inadequate, validation tests would reveal their inefficacy.
Teams will have to spend time and effort fixing them, but it will prevent a bad product from hitting
the market.
• Validation tests ensure that the product matches and adheres to customer demands, preferences,
and expectations under different conditions (slow connectivity, low battery, etc.)
55.
System testing–
• Systemtesting is a type of software testing that evaluates the overall functionality and
performance of a complete and fully integrated software solution.
• It tests if the system meets the specified requirements and if it is suitable for delivery to
the end-users.
• This type of testing is performed after the integration testing and before the acceptance
testing.
• System Testing is carried out on the whole system in the context of either system
requirement specifications or functional requirement specifications or in the context of
both.
57.
System testing teststhe design and behavior of the system and also the
expectations of the customer.
• It is performed to test the system beyond the bounds mentioned in
the software requirements specification (SRS).
• System Testing is a black-box testing.
• Functional Testing:This type of testing verifies that the system's features and
functionalities work as specified, adhering to the defined requirements. It ensures
the software performs its intended tasks correctly.
• Performance Testing: This type evaluates the system's performance under different
conditions, such as varying loads and user interactions, to ensure it can handle
expected and peak usage. It checks for speed, response times, and stability.
60.
• Security Testing:This type focuses on identifying vulnerabilities and weaknesses
in the system's security measures to protect sensitive data and prevent
unauthorized access or attacks.
• Usability Testing: This type evaluates how easy and user-friendly the system is to
use, ensuring a positive user experience.
61.
• Other SystemTesting Types:
• Regression Testing:
• This ensures that new code or changes don't introduce bugs or negatively affect the system's
existing functionality.
• Acceptance Testing:
• This tests the system at a high level to ensure it meets customer expectations and requirements
before release.
• Load Testing:
• This type assesses how the system performs under heavy and sustained loads, simulating real-
world usage scenarios.
62.
• Scalability Testing:
•This measures the system's ability to handle increasing user demands and traffic without
performance degradation.
• Recovery Testing:
• This evaluates the system's ability to recover from failures or errors, ensuring stability and
reliability.
• Migration Testing:
• This tests the system's ability to seamlessly migrate from one environment to another, ensuring
data integrity and minimal disruption.
Advantages of SystemTesting :
• The testers do not require more knowledge of programming to carry out
this testing.
• It will test the entire product or software so that we will easily detect the
errors or defects which cannot be identified during the unit testing and
integration testing.
• The testing environment is similar to that of the real time production or
business environment
65.
Disadvantages of SystemTesting :
• This testing is time consuming process than another testing techniques since it
checks the entire product or software.
• The cost for the testing will be high since it covers the testing of entire software.
• It needs good debugging tool otherwise the hidden errors will not be found
66.
• Debugging
Debugging isthe 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.
67.
• There areseveral common methods and techniques used in debugging:
1.Code Inspection: This involves manually reviewing the source code of a software
system to identify potential bugs or errors.
2.Debugging Tools: There are various tools available for debugging such as
debuggers, trace tools, and profilers that can be used to identify and resolve bugs.
3.Unit Testing: This involves testing individual units or components of a software
system to identify bugs or errors.
68.
• 4.Integration Testing:This involves testing the interactions between different
components of a software system to identify bugs or errors.
• 5.System Testing: This involves testing the entire software system to identify bugs
or errors.
• 6.Monitoring: This involves monitoring a software system for unusual behavior or
performance issues that can indicate the presence of bugs or errors.
• 7.Logging: This involves recording events and messages related to the software
system, which can be used to identify bugs or errors
69.
Debugging Process:
• Problemidentification and report preparation.
• Assigning the report to the software engineer defect 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.
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
73.
• Disadvantages ofDebugging:
• 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