Nothing Special   »   [go: up one dir, main page]

Software Testing Strategies

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 12

Software Testing Strategies

The main objective 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:

Strategic Issues
1. Before testing starts, it’s necessary to identify and specify the requirements of
the product in a quantifiable manner.
Different characteristics quality of the software is there such as maintainability that
means the ability to update and modify, the probability that means to find and
estimate any risk, and usability that means how it can easily be used by the customers
or end-users. All these characteristic qualities should be specified in a particular order
to obtain clear test results without any error.

2. Specifying the objectives of testing in a clear and detailed manner.


Several objectives of testing are there such as effectiveness that means how
effectively the software can achieve the target, any failure that means inability to
fulfill the requirements and perform functions, and the cost of defects or errors that
mean the cost required to fix the error. All these objectives should be clearly
mentioned in the test plan.

3. For the software, identifying the user’s category and developing a profile for
each user.
Use cases describe the interactions and communication among different classes of
users and the system to achieve the target. So as to identify the actual requirement of
the users and then testing the actual use of the product.

4. Developing a test plan to give value and focus on rapid-cycle testing.


Rapid Cycle Testing is a type of test that improves quality by identifying and
measuring the any changes that need to be required for improving the process of
software. Therefore, a test plan is an important and effective document that helps the
tester to perform rapid cycle testing.

5. Robust software is developed that is designed to test itself.


The software should be capable of detecting or identifying different classes of errors.
Moreover, software design should allow automated and regression testing which tests
the software to find out if there is any adverse or side effect on the features of
software due to any change in code or program.

6. Before testing, using effective formal reviews as a filter.


Formal technical reviews is technique to identify the errors that are not discovered
yet. The effective technical reviews conducted before testing reduces a significant
amount of testing efforts and time duration required for testing software so that the
overall development time of software is reduced.

7. Conduct formal technical reviews to evaluate the nature, quality or ability of the
test strategy and test cases.
The formal technical review helps in detecting any unfilled gap in the testing
approach. Hence, it is necessary to evaluate the ability and quality of the test strategy
and test cases by technical reviewers to improve the quality of software.

8. For the testing process, developing a approach for the continuous development.
As a part of a statistical process control approach, a test strategy that is already
measured should be used for software testing to measure and control the quality
during the development of software.
Test strategies for conventional software
Following are the four strategies for conventional software:
1) Unit testing
2) Integration testing
3) Regression testing
4) Smoke testing

1) Unit testing

 Unit testing focus on the smallest unit of software design, i.e module or
software component.
 Test strategy conducted on each module interface to access the flow of input
and output.
 The local data structure is accessible to verify integrity during execution.
 Boundary conditions are tested.
 In which all error handling paths are tested.
 An Independent path is tested.
Following figure shows the unit testing:
Unit test environment
The unit test environment is as shown in following figure:

Difference between stub and driver

Stub Driver

Stub is considered as subprogram. It is a simple main program.

Stub does not accept test case data. Driver accepts test case data.

It replace the modules of the program into Pass the data to the tested components
subprograms and are tested by the next driver. and print the returned result.

2) Integration testing
Integration testing is used for the construction of software architecture.

There are two approaches of incremental testing are:


i) Non incremental integration testing
ii) Incremental integration testing
i) Non incremental integration testing

 Combines all the components in advanced.


 A set of error is occurred then the correction is difficult because isolation cause
is complex.
ii) Incremental integration testing

 The programs are built and tested in small increments.


 The errors are easier to correct and isolate.
 Interfaces are fully tested and applied for a systematic test approach to it.
Following are the incremental integration strategies:
a. Top-down integration
b. Bottom-up integration

a. Top-down integration

 It is an incremental approach for building the software architecture.


 It starts with the main control module or program.
 Modules are merged by moving downward through the control hierarchy.
Following figure shows the top down integration.

Problems with top-down approach of testing


Following are the problems associated with top-down approach of
testing as follows:
 Top-down approach is an incremental integration testing approach in which the
test conditions are difficult to create.
 A set of errors occur, then correction is difficult to make due to the isolation of
cause.
 The programs are expanded into various modules due to the complications.
 If the previous errors are corrected, then new get created and the process
continues. This situation is like an infinite loop.

b. Bottom-up integration
In bottom up integration testing the components are combined from the lowest
level in the program structure.

The bottom-up integration is implemented in following steps:

 The low level components are merged into clusters which perform a specific
software sub function.
 A control program for testing(driver) coordinate test case input and output.
 After these steps are tested in cluster.
 The driver is removed and clusters are merged by moving upward on the
program structure.
Following figure shows the bottom up integration:
3) Regression testing

 In regression testing the software architecture changes every time when a new
module is added as part of integration testing.

4) smoke testing

 The developed software component are translated into code and merge to
complete the product.

Verification and Validation Testing


Verification and Validation is the process of investigating that a software system
satisfies specifications and standards and it fulfills the required purpose. Barry
Boehm described verification and validation as the following:
Verification: Are we building the product right?
Validation: Are we building the right product?
Verification:
Verification is the process of checking that a 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.
Activities involved in verification:
1. Inspections
2. Reviews
3. Walkthroughs
4. Desk-checking
Validation:
Validation is the process of checking whether the software product is up to the
mark or in other words product has high level requirements. It is the process of
checking the validation of product i.e. it checks what we are developing is the
right product. it is validation of actual and expected product.
Validation is the Dynamic Testing.
Activities involved in validation:
1. Black box testing
2. White box testing
3. Unit testing
4. Integration testing
System Testing
System Testing is a type of software testing that is performed on a complete
integrated system to evaluate the compliance of the system with the
corresponding requirements.
In system testing, integration testing passed components are taken as input.
The goal of integration testing is to detect any irregularity between the units that
are integrated together. System testing detects defects within both the
integrated units and the whole system. The result of system testing is the
observed behavior of a component or a system when it is tested.
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. System testing tests the 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 basically performed by a testing team that is independent of
the development team that helps to test the quality of the system impartial. It
has both functional and non-functional testing.
System Testing is a black-box testing.
System Testing is performed after the integration testing and before the
acceptance testing.

System Testing Process:


System Testing is performed in the following steps:
 Test Environment Setup:
Create testing environment for the better quality testing.
 Create Test Case:
Generate test case for the testing process.
 Create Test Data:
Generate the data that is to be tested.
 Execute Test Case:
After the generation of the test case and the test data, test cases are
executed.
 Defect Reporting:
Defects in the system are detected.
 Regression Testing:
It is carried out to test the side effects of the testing process.
 Log Defects:
Defects are fixed in this step.
 Retest:
If the test is not successful then again test is performed.

Types of System Testing:


 Performance Testing:
Performance Testing is a type of software testing that is carried out to test
the speed, scalability, stability and reliability of the software product or
application.
 Load Testing:
Load Testing is a type of software Testing which is carried out to determine
the behavior of a system or software product under extreme load.
 Stress Testing:
Stress Testing is a type of software testing performed to check the
robustness of the system under the varying loads.
 Scalability Testing:
Scalability Testing is a type of software testing which is carried out to check
the performance of a software application or system in terms of its capability
to scale up or scale down the number of user request load.
The Art of Debugging
Introduction:
In the context of software engineering, debugging is the process of fixing a bug
in the software. In other words, it refers to identifying, analyzing and removing
errors. This activity begins after the software fails to execute properly and
concludes by solving the problem and successfully testing the software. It is
considered to be an extremely complex and tedious task because errors need
to be resolved at all stages of debugging.

Debugging Process: Steps involved in debugging are:


 Problem identification and report preparation.
 Assigning the report to software engineer to the defect to verify that it is
genuine.
 Defect Analysis using modeling, documentations, finding and testing
candidate flaws, etc.
 Defect Resolution by making required changes to the system.
 Validation of corrections.

Debugging Strategies:
1. Study the system for the larger duration in order to understand the system. It
helps debugger to construct different representations of systems to be
debugging depends on the need. Study of the system is also done actively to
find recent changes made to the software.
2. Backwards analysis of the problem which involves tracing the program
backward from the location of failure message in order to identify the region
of faulty code. A detailed study of the region is conducting to find the cause
of defects.
3. 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 to find the defect.
4. Using the past experience of the software debug the software with similar
problems in nature. The success of this approach depends on the expertise
of the debugger.
Debugging Tools:
Debugging tool is a computer program that is used to test and debug other
programs. A lot of public domain software like gdb and dbx are available for
debugging. They offer console-based command line interfaces. Examples of
automated debugging tools include code based tracers, profilers, interpreters,
etc.
Some of the widely used debuggers are:
 Radare2
 WinDbg
 Valgrind

Difference Between Debugging and Testing:


Debugging is different from testing. Testing focuses on finding bugs, errors, etc
whereas debugging starts after a bug has been identified in the software.
Testing is used to ensure that the program is correct and it was supposed to do
with a certain minimum success rate. Testing can be manual or automated.
There are several different types of testing like unit testing, integration testing,
alpha and beta testing, etc.
Debugging requires a lot of knowledge, skills, and expertise. It can be
supported by some automated tools available but is more of a manual process
as every bug is different and requires a different technique, unlike a pre-defined
testing mechanism.

You might also like