0% found this document useful (0 votes)
6 views17 pages

Chapt 3.u2

The document outlines various software testing strategies, emphasizing the importance of identifying and rectifying errors before software delivery. It details different testing techniques such as black box, white box, unit, integration, and system testing, along with their advantages and disadvantages. Additionally, it highlights the significance of a structured testing approach to enhance software quality and user experience while reducing costs.

Uploaded by

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

Chapt 3.u2

The document outlines various software testing strategies, emphasizing the importance of identifying and rectifying errors before software delivery. It details different testing techniques such as black box, white box, unit, integration, and system testing, along with their advantages and disadvantages. Additionally, it highlights the significance of a structured testing approach to enhance software quality and user experience while reducing costs.

Uploaded by

justshhhreya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

3.

Software Testing Strategies


Introduction: Strategic Approach To Software Testing
Testing is the process of exercising a program with the specific intent of finding
errors prior to delivery to the end user.
Testing involves assessing a software application to see if it complies with
requirements and to spot any flaws. These are typical testing techniques:

1. Black box testing - Tests the software's functionality without examining the
internal code layout.
2. White box testing - Examines the software's internal logic and code structure.
3. Unit testing - It verifies that individual software modules or components are
operating as intended.
4. Integration testing - It verifies that various software components are
integrated and function as a system.
5. Functional testing - Verifies that the functional specifications of the software
are satisfied.
6. System testing - It verifies that the entire software system satisfies the
required specifications.
7. Acceptance testing – It verifies that the software satisfies the requirements of
the client or end user.
8. Regression testing – It verifies that the programme has not developed new
flaws after updates or adjustments have been done.
9. Performance testing - This checks the software's speed, scalability, and
stability to see how it performs.
10. Software is put through security testing to check for flaws and make sure it
complies with security standards.
Software testing is a form of investigation to determine if there are any flaws or
defects in the software so that they can be fixed to improve the software's
quality and determine whether or not it satisfies the criteria. Glen Myers claims
that the following goals of software testing:
o Testing is the process of looking at and examining a programme to
determine whether there is an error or not and whether it satisfies the
requirements or not.
o A good test case and successful testing are both indicated by a large
number of errors that were discovered throughout the test.
o A successful test case will reveal an undiscovered error that hasn't been
found yet.

The fundamental goal of software testing is to create the tests in such a way that
they quickly and efficiently identify all types of mistakes, reducing the amount
of time needed for software development. The overall plan for software testing
entails:

Figure 1: Overall strategy for software testing


1. Prior to testing, it's important to recognise and precisely define the product
requirements in terms of numbers:
There are various qualities of software, such as maintainability, which
refers to the capacity to update and alter, likelihood, which refers to the capacity
to identify and quantify any risk, and usability, which refers to the ease with
which customers or end-users may use it. To ensure accurate test results, all
these distinguishing characteristics should be listed in a specific order.

2. Clearly and specifically stating the testing objectives:


The efficacy of the software's capacity to reach the target, any failure to
meet criteria and carry out functions, and the cost of defects or errors, which
refers to the expense involved in correcting the error, are a few examples of
testing objectives. The test strategy needs to explicitly state each of these
objectives.

3. Classifying users and creating individual user profiles for the software:
Use cases outline how various user classes interact with the system and
one another to accomplish a goal to determine the users' genuine needs,
followed by a test of the product's actual use.

4. Setting value in test planning and concentrating on rapid-cycle testing:


Rapid Cycle Testing is a sort of test that enhances quality by discovering
and evaluating any modifications needed to enhance the software development
process. Consequently, a test plan is a crucial and useful document that aids the
tester in carrying out quick cycle testing.

5. Is it possible to create reliable software that can test itself:


Different sorts of errors should be able to be found or identified by the
software. Additionally, software design should permit automated and regression
testing, which examines the software to determine whether any negative or
unintended consequences of changes to the code or programme have an impact
on its functionality.

6. Employing efficient formal reviews as a filter before testing:


Formal technical reviews are a method to find errors that haven't yet been
found. Effective technical reviews conducted before to testing significantly cut
down on the testing workload and testing time, hence speeding up the total
software development process.
7. To assess the nature, suitability, or capability of the test strategy and test
cases, conduct formal technical reviews. The thorough technical review aids in
identifying any gaps in the testing strategy that need to be filled. Therefore, in
order to raise the calibre of software, technical reviewers must assess the
effectiveness and quality of the test plan and test cases.

8. Creating a continuous development strategy for the testing process:


To assess and control the quality of software development, a test method
that has already been measured as part of a statistical process control approach
should be utilised.

 Advantages of software testing:


1. Enhances software quality and dependability - Testing aids in the early
detection and correction of flaws, lowering the possibility of failure or
unexpected behaviour in the finished product.
2. Improves user experience - Testing aids in detecting usability problems and
enhancing the user experience as a whole.
3. Builds trust - By testing the programme, stakeholders and developers can feel
more certain that it satisfies specifications and performs as intended.
4. Makes maintenance easier - Testing makes it simpler to maintain and update
the product by locating and fixing bugs early.
5. Lowers costs - Finding and resolving flaws early in the development phase
saves money over the course of the product's lifespan.

 Disadvantages of software testing:


1. Testing helps in the early detection and rectification of defects, minimising
the likelihood of failure or unexpected behaviour in the finished product.
2. Enhances user experience - Testing helps identify usability issues and
improves the overall user experience.
3. Promotes trust - By putting the programme through testing, stakeholders and
developers can be more confident that it meets requirements and works as
intended.
4. Makes maintenance simpler - By identifying and resolving defects early on,
testing makes it easier to maintain and update the product.
5. Reduces costs - Fixing problems quickly during the development stage
reduces costs over the duration of the product's life.
UNIT TESTING
Each unit or individual component of the software application is tested as
part of the unit testing process. It represents the initial stage of functional
testing. The purpose of unit testing is to confirm the functionality of individual
unit components. A unit is a single testable component that may be tested as
part of the application software development process. Unit testing is used to
ensure that isolated code is correct. A specific application function or piece of
code is referred to as a unit component. Unit testing is typically conducted using
the white box testing methodology by developers. When the application is
finished and submitted to the test engineer, the test engineer will begin
independently or one-by-one testing each component of the module or module
of the application. This procedure is referred to as unit testing or components
testing.

 Why Unit testing?


Unit testing is the first level of testing carried out before integration and further
levels of testing in a testing level hierarchy. It employs modules for testing,
reducing the reliance on waiting for Unit testing is aided by the usage of stubs,
drivers, dummy objects, and unit testing frameworks.

The software is typically tested at four levels: unit testing, integration


testing, system testing, and acceptance testing. However, due to time
constraints, software testers occasionally skip unit testing, which can result in
higher defects during integration testing, system testing, acceptance testing, or
even beta testing, which happens after a software application is finished.

Here are a few essential justifications:


o Unit testing enables developers and testers to swiftly update code that is
producing defects by assisting them in understanding the fundamentals of
the program.
o It helps to have unit tests for documentation.
o There is a chance that there will be fewer flaws in subsequent testing
levels because unit testing catches errors relatively early in the
development process.
o By relocating code and test cases, it promotes code reuse.

 Unit testing tools


We have various types of unit testing tools available in the market, which are as
follows:

 Unit testing techniques


Unit testing uses all white box testing techniques as it uses the code of software
application:

How to achieve best results using Unit testing by taking the actions outlined
below, unit testing can produce the best results without creating confusion or
adding complexity:
test cases must be independent.

unit testing must be rectified.

write the code; otherwise, the number of possible


execution pathways would rise.

whose code has changed.

 Advantages of Unit testing


o Unit testing employs a modular approach because any component can be
tested without holding up the testing of other components.
o To comprehend the unit API, the developing team focuses on the
functionality that is offered by the unit and how functionality should
appear in unit test cases.
o After a few days, unit testing enables the developer to modify code and
verify that the module is still operating faultlessly.

 Disadvantages of Unit testing


o As it only examines individual code units, it cannot detect integration or
high-level errors.
o Since it is impossible to evaluate every execution route during unit
testing, errors in programs cannot be found in every instance.
o It works best when combined with other diagnostic procedures.
INTEGRATION TESTING
After unit testing, the software testing process moves on to integration
testing. Units or individual software components are tested collectively during
this testing. The goal of the integration testing level is to identify flaws when
integrated components or units interact.
Modules are used in unit testing for testing purposes, and integration testing
combines and tests these modules. The Software is created using a variety of
software modules that were created by various programmers or coders. Integrity
testing is done to ensure that all of the modules are communicating properly.

Figure 3: Integration Testing

Integration testing is the process of verifying the data flow between dependent
modules when each component or module is functioning independently.

 Guidelines for Integration Testing


o After each application module has undergone functional testing, we only
go on to integration testing.
o In order to ensure that a suitable sequence is followed and that we don't
miss any integration cases, we always perform integration testing by
selecting modules one at a time.
o Determine the test case strategy first, which will help you create
executable test cases based on the test data.
o Examine the application's structure and architecture to determine the most
important modules to test first and to discover all potential situations.
o Create test cases to thoroughly verify each interface.
o Select input data before running the test case. Testing heavily relies on
the input data.
o If we discover any bugs, we should notify the developers, who will
subsequently repair the issues and retest.
o Test integration both positively and negatively. If the entire balance is Rs.
15,000 and we are sending Rs. 1500, then this positive testing means that
the amount transfer should be successful. The test would be considered
successful if it did. Negative testing, on the other hand, means that if the
total balance is Rs. 15,000 and Rs. 20,000 is being transferred, the test
will pass if neither event occurs. If it does, there is a code bug, and we
will communicate it to the development team so they can repair it.

 Reason behind Integration Testing


Even though unit testing was performed on every module of the software
application, errors still exist for the following reasons:
1. Integration testing is crucial to determining how well software modules
function because each module is created by a different software developer,
whose programming logic may differ from that of developers of other modules.
2. to determine whether or not the software modules' interactions with the
database are accurate.
3. At the time a module is being developed, requirements can bemodified or
improved. Integration testing is now required because it's possible that these
additional requirements won't be tested at the unit testing level.
4. Errors may be caused by software module incompatibility.
5. to check whether hardware and software are compatible.
6. Inadequate exception handling between modules can lead to issues.

 Integration Testing Techniques


Any testing technique (Black box, White box, and Grey box) can be used for
Integration Testing; some are listed below:
1. Black Box Testing

-pairs Testing
use and Effect Graph

2. White Box Testing


 Types of Integration Testing
Integration testing are categorized into two types: Incremental and Non-
Incremental

Figure 4: Types of Integration testing

{1} In the incremental approach, modules are added one at a time in ascending
sequence or as needed. The modules you choose must make sense together.
Usually, two or more modules are added and tested to see if the functionalities
are correct. Up until all of the modules have undergone successful testing, the
procedure continues.
OR
The dependent modules in this kind of testing have a close link with one
another. Let's say we test the proper operation of the data flow between two or
more modules. If so, try again after adding more modules.
Incremental integration testing is carried out by further methods:
-Down approach
-Up approach

Top-Down approach
The top-down testing technique focuses on the process in which lower level
modules are tested alongside higher-level modules until all of the modules have
been successfully tested. Critical modules are tested first, allowing for the early
detection and correction of significant design problems. With this approach, the
modules will be added gradually or one at a time, and the data flow will be
examined in the same sequence.
In the top-down approach, we will be ensuring that the module we are adding is
the child of the previous one like Child C is a child of Child B and so on as we
can see in the below image:

 Advantages:
o Identification of defect is difficult.
o An early prototype is possible.

 Disadvantages:
o Due to the high number of stubs, it gets quite complicated.
o Lower level modules are tested inadequately.
o Critical Modules are tested first so that fewer chances of defects.
Bottom-Up approach
The technique of testing lower level modules with higher level modules until all
of the modules have been successfully tested is known as the "bottom to up"
testing strategy. Since top-level critical modules are tested last, a defect may
result. Another option is to indicate that we will install the modules in order,
starting at the bottom, and then examine the data flow.
In the bottom-up method, we will ensure that the modules we are adding are the
parent of the previous one as we can see in the below image:

 Advantages
o Identification of defect is easy.
o Do not need to wait for the development of all the modules as it saves
time.

 Disadvantages
o Critical modules are tested last due to which the defects can occur.
o There is no possibility of an early prototype.
{2} Non-Incremental Integration testing:
When the data flow is exceedingly complicated and it is challenging to
determine who is a parent and who is a child, we will use this method. And in
this situation, we will generate the data in any module and then check to see if it
is present in all other existing modules. Consequently, the
Big Bang approach is another name for it.

Big bang Method:


This method integrates all components at once and then conducts testing.
While it is practical for small software systems, it makes it challenging to
identify flaws in large software systems.

Since the testing team has less time to execute this process because this
testing might be done after all modules have been completed, internal connected
interfaces and high-risk important modules are more likely to be overlooked.

 Advantages:
o It is practical for compact software systems.

 Disadvantages:
o Defect identification is challenging since we are unable to determine the
source of the error, making it impossible to determine where the fault
originated.
o Small modules are readily missed.
o There is extremely little time allotted for testing.
o There's a chance we won't test all of the interfaces.
VALIDATION TESTING
The procedure of assessing software to see if it satisfies stated business
requirements either during development or at the end of development.
Validation testing makes ensuring that the product really does meet the needs of
the customer. It is also possible to describe it as proving that a product works as
intended when used in the right setting. It answers to the question, are we
building the right product?

Workflow of Validation Testing:


Validation testing can be best demonstrated using V-Model. The
Software/product under test is evaluated during this type of testing.

 Activities:

User Acceptance Testing

SYSTEM TESTING
Testing a fully integrated software system is part of system testing.
Typically, software is integrated into computer systems (software itself is just
one component of a computer system). To create a comprehensive computer
system, the software is developed in modules and then interfaced with hardware
and other applications.
To put it another way, a computer system consists of a collection of software
that can carry out a variety of functions, but only software can do so since it
needs to communicate with appropriate hardware. System testing is a collection
of several types of tests designed to put an integrated software computer system
through its paces and check it against requirements. System testing is the
process of examining an application's or piece of software's overall usability.
We test the product as a whole system and travel (go through) all the required
modules of an application to see if the final features or the final business
function as intended.

End-to-end testing is done in an environment that is comparable to the one used


in production.
Black box testing, which includes testing the software's external functionality,
includes system testing. To find little flaws, testing mimics the user's
perspective. The following actions are a part of system testing.
o Verification of the application's input features to see if it is generating the
desired results.
o Integrated software is tested with external devices to see how different
parts interact with one another.
o System-wide testing for end-to-end testing.
o Using a user's expertise, test the application's behaviour

 Types of System testing


There are more than 50 different forms of system testing, but software testing
businesses typically use a few of them. Here are some of them:

1] Regression Testing
Regression testing is carried out as part of system testing to check and pinpoint
any defects that may have arisen as a result of changes made to any other
system component. It ensures that any modifications made throughout the
development process did not produce a new flaw and ensures that no existing
defects will be present as new software is added over time.
2] Load Testing
To determine whether the system can function under real-time loads, load
testing is conducted alongside system testing.

3] Functional Testing
A system is put through functional testing to see whether there are any missing
functions. The tester compiles a list of crucial features that should be included
in the system, can be introduced during functional testing, and should raise the
system's quality.

4] Recovery testing:
System testing includes recovery testing of a system, which verifies the system's
dependability, credibility, accountability, and ability to recover. It ought to be
able to successfully recover from all potential system failures. In this testing, we
will evaluate the application's ability to bounce back from errors or natural
calamities.
5] Migration Testing
Migration testing is performed to ensure that if the system needs to be modified
in new infrastructure so it should be modified without any issue.

6] Usability Testing
The purpose of this testing to make sure that the system is well familiar with the
user and it meets its objective for what it supposed to do.

7] Software and Hardware Testing


The system will be tested to see if the hardware and software are compatible. To
operate the software without any problems, the hardware setup must be
compatible. Because it allows for interactions between hardware and software,
compatibility promotes flexibility.

 Why is System testing important


o System testing, which examines the entire system's functionality, provides
total assurance of system performance.
o It comprises testing of the business requirements as well as the system
software architecture.
o Even after production is complete, it aids in bug and live issue mitigation.
o System testing feeds the same data into both an old and a new system,
comparing the functional changes between the two so that the user may
appreciate the advantages of the system's newly added features.

You might also like