0% found this document useful (0 votes)
8 views

Unit IV- Testing

The document outlines software testing strategies, emphasizing the importance of identifying requirements, objectives, and user profiles before testing. It details various types of testing, including unit, integration, regression, alpha, beta, and system testing, along with verification and validation processes. Additionally, it discusses debugging methods and the distinction between testing and debugging, while highlighting manual and automated testing approaches.
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)
8 views

Unit IV- Testing

The document outlines software testing strategies, emphasizing the importance of identifying requirements, objectives, and user profiles before testing. It details various types of testing, including unit, integration, regression, alpha, beta, and system testing, along with verification and validation processes. Additionally, it discusses debugging methods and the distinction between testing and debugging, while highlighting manual and automated testing approaches.
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
You are on page 1/ 10

Unit - IV

Software Testing Strategies

Software Testing is a type of investigation to find out if there is any default or 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
specifies requirements or not.

Software testing has the following objectives:


 The process of investigating and checking a program to find whether there is an error or not and does it fulfill
the requirements or not is called testing.
 When the number of errors found during the testing is high, it indicates that the testing was good and is a sign
of good test case.
 Finding an unknown error thatwasn’t discovered yet is a sign of a successful and a good test case.

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:
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.


A formal technical review 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.
Types of Software Testing

Introduction:-

Testing is the process of executing a program with the aim of finding errors. To make our software perform
well it should be error-free. If testing is done successfully it will remove all the errors from the software.

Principles of Testing:-

(i) All the test should meet the customer requirements


(ii) To make our software testing should be performed by a third party
(iii) Exhaustive testing is not possible. As we need the optimal amount of testing based on the risk
assessment of the application.
(iv) The entire test to be conducted should be planned before implementing it
(v) it follows the Pareto rule (80/20 rule) which states that 80% of errors come from 20% of program
components.
(vi) Start testing with small parts and extend it to large parts.

Types of Testing:-

 Unit Testing
It focuses on the smallest unit of software design. In this, we test an individual unit or group of interrelated
units. It is often done by the programmer by using sample input and observing its corresponding outputs.
Example:

a) In a program we are checking if loop, method or function is working fine


b) Misunderstood or incorrect, arithmetic precedence.
c) Incorrect initialization
 Integration Testing
The objective is to take unit tested components and build a program structure that has been dictated by
design. Integration testing is testing in which a group of components is combined to produce output.
Integration testing is of four types: (i) Top-down (ii) Bottom-up (iii) Sandwich (iv) Big-Bang.
Example

 Black Box testing: - It is used for validation. In this we ignore internal working mechanism and focused on
“What is the output?”
 White Box testing : - It is used for verification. In this we focus on internal mechanism
i.e. “how the output is achieved?”
 Regression Testing
Every time a new module is added leads to changes in the program. This type of testing makes sure that the
whole component works properly even after adding components to the complete program.
Example

In school record suppose we have module staff, students and finance combining these modules and
checking if on integration these module works fine is regression testing

 Alpha Testing
This is a type of validation testing. It is a type of acceptance testing which is done before the product is
released to customers. It is typically done by QA people.

When software testing is performed internally within the organization


 Beta Testing
The beta test is conducted at one or more customer sites by the end-user of the software. This version is
released for a limited number of users for testing in a real-time environment
When software testing is performed for the limited number of people
 System Testing
This software is tested such that it works fine for the different operating systems. It is covered under the
black box testing technique. In this, we just focus on the required input and output without focusing on internal
working.
In this, we have security testing, recovery testing, stress testing, and performance testing
This include functional as well as non functional testing

Verification and Validation


Verification and Validation is the process of investigating that a software system satisfies specifications and
standards and it fulfills the required purpose.
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 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
fulfillment of the system with the corresponding requirements.
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 background of either system requirement
specifications or functional requirement specifications or in the background 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).
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.

Debugging
Definition:

Debugging is the process of finding and resolving defects or problems within a computer program that prevent correct
operation of computer software or a system.

Need for debugging:


Once errors are known during a program code, it’s necessary to initial establish the precise program statements liable
for the errors and so to repair them.
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 Approaches:
The following are a number of approaches popularly adopted by programmers for debugging.

 Brute Force Method:


During this approach, the program is loaded with print statements to print the intermediate values with the
hope that a number of the written values can facilitate to spot the statement in error. This approach becomes a
lot of systematic with the utilization of a symbolic program (also known as a source code debugger).

 Backtracking:
During this approach, starting from the statement at which an error symptom has been discovered, the
source code is derived backward till the error is discovered.
 Cause Elimination Method:
In this approach, a listing of causes that may presumably have contributed to the error symptom is
developed and tests are conducted to eliminate every error.

 Program Slicing:
This technique is similar to backtracking. Here the search house is reduced by process slices. A slice of a
program for a specific variable at a particular statement is that the set of supply lines preceding this statement
which will influence the worth of that variable.

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.
Testing Tactics
Testing can either be done manually or using an automated testing tool:
 Manual - This testing is performed without taking help of automated testing tools. Manual testing is time and
resource consuming. The tester needs to confirm whether or not right test cases are used. Major portion of
testing involves manual testing.
 Automated - This testing is a testing procedure done with aid of automated testing tools. The limitations with
manual testing can be overcome using automated test tools.

Testing Approaches
Tests can be conducted based on two approaches –
 Functionality testing
 Implementation testing
When functionality is being tested without taking the actual implementation in concern it is known as black-box
testing. The other side is known as white-box testing where not only functionality is tested but the way it is
implemented is also analyzed.

Black-box testing
It is carried out to test functionality of the program. It is also called ‘Behavioral’ testing. The tester in this
case, has a set of input values and respective desired results. On providing input, if the output matches with the
desired results, the program is tested ‘ok’ and problematic otherwise.

In this testing method, the design and structure of the code are not known to the tester, and testing engineers
and end users conduct this test on the software.
Black-box testing techniques:
 Equivalence class - The input is divided into similar classes. If one element of a class passes the test, it is
assumed that all the class is passed.
 Boundary values - The input is divided into higher and lower end values. If these values pass the test, it is
assumed that all values in between may pass too.
 Cause-effect graphing - In both previous methods, only one input value at a time is tested. Cause (input) –
Effect (output) is a testing technique where combinations of input values are tested in a systematic way.
 Pair-wise Testing - The behavior of software depends on multiple parameters. In pair wise testing, the
multiple parameters are tested pair-wise for their different values.
 State-based testing - The system changes state on provision of input. These systems are tested based on their
states and input.
White-box testing
It is conducted to test program and its implementation, in order to improve code efficiency or structure. It is
also known as ‘Structural’ testing.

In this testing method, the design and structure of the code are known to the tester. Programmers of the code
conduct this test on the code.

White-box testing techniques:


 Control-flow testing - The purpose of the control-flow testing to set up a test case which covers all
statements and branch conditions. The branch conditions are tested for both being true and false, so that all
statements can be covered.
 Data-flow testing - This testing technique emphasis to cover all the data variables included in the program. It
tests where the variables were declared and defined and where they were used or changed.

Department of ISM…

You might also like