0% found this document useful (0 votes)
15 views31 pages

ST Unit1

Unit I of the CS2602 Software Testing course covers the fundamentals of software testing, including its definition, objectives, importance, and the role of testing in the Software Development Life Cycle (SDLC). It discusses various testing levels and types such as unit, integration, system, and acceptance testing, as well as manual versus automated testing approaches. The unit also highlights the significance of documentation in testing and differentiates between software testing and quality assurance processes.

Uploaded by

Kushal Ambeti
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)
15 views31 pages

ST Unit1

Unit I of the CS2602 Software Testing course covers the fundamentals of software testing, including its definition, objectives, importance, and the role of testing in the Software Development Life Cycle (SDLC). It discusses various testing levels and types such as unit, integration, system, and acceptance testing, as well as manual versus automated testing approaches. The unit also highlights the significance of documentation in testing and differentiates between software testing and quality assurance processes.

Uploaded by

Kushal Ambeti
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

Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

UNIT - 1 INTRODUCTION TO SOFTWARE TESTING 9

Overview of Software Testing-Definition, objectives, and importance of software testing, Software Development
Life Cycle (SDLC) and Testing-Role of testing in different SDLC phases, Testing Levels and Types-Unit testing,
integration testing, system testing, acceptance testing.

Overview of Software Testing:

Software Testing:
Definition 1- "Software testing is a process, to evaluate the functionality of a software application with an intent
to find whether the developed software met the specified requirements or not and to identify the defects to ensure
that the product is defect-free in order to produce the quality product."
Definition 2- “Software testing is the processes of identifying the completeness, Correctness, Quality of the
developed software product. In software testing process the Software is tested in both positive and negative
condition.”
Objectives of Software Testing:

1. Identify Defects:
- The primary objective of software testing is to identify and document defects in the software. Defects can
include bugs, errors, and any other issues that may affect the functionality or performance of the software. By
finding these defects early, testers can ensure they are addressed before the software is released to users.
2. Ensure Quality:
- Software testing aims to verify that the software meets the required standards and specifications. This
involves checking that the software functions as intended and meets the quality criteria set by stakeholders.
Ensuring quality helps in delivering a reliable and robust product.
3. Validate Functionality:
- Testing involves validating that the software behaves as expected under various conditions. This includes
checking if the software performs correctly according to the defined requirements and use cases. Functional
validation ensures that all features work as intended and that the software provides the expected results.
4. Improve Performance:
- Performance testing is an essential part of software testing, aimed at ensuring the software performs
efficiently. This includes testing for speed, scalability, and optimal use of resources. Performance testing helps
identify bottlenecks and areas where the software can be optimized for better performance.
5. Enhance Security:
- Security testing is critical to identify vulnerabilities and ensure the software is secure against potential
threats. This involves testing for issues such as data breaches, unauthorized access, and other security risks.
Enhancing security through testing helps protect sensitive information and maintain user trust.
6. Ensure Usability:
- Usability testing focuses on verifying that the software is user-friendly and provides a good user experience.
This involves testing the interface, navigation, and overall ease of use. Ensuring usability is crucial for user
satisfaction and adoption of the software.
7. Compliance Verification:
- Compliance testing ensures that the software adheres to relevant laws, regulations, and industry standards.
This is particularly important for software in regulated industries, such as healthcare or finance. Compliance
verification helps avoid legal issues and ensures that the software meets all necessary regulatory requirements.

1
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

8. Reliability Assurance:
- Reliability testing aims to confirm that the software can operate consistently over time without failures. This
includes testing the software under different conditions and over extended periods. Ensuring reliability is
important for maintaining the software's stability and dependability.
9. Facilitate Maintenance:
- Effective software testing includes documenting tests and results to facilitate future maintenance. Well-
documented testing processes and outcomes make it easier to understand the software's behavior and implement
updates or fixes. This helps in maintaining the software over its lifecycle.
10. Risk Reduction:
- Testing helps minimize the risks associated with software failure in production. By thoroughly testing the
software, potential issues can be identified and mitigated before the software is deployed. Risk reduction is
essential for preventing costly failures and ensuring smooth operation of the software in the real world.

Importance of Software Testing:

2
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Software Validation

Validation is process of examining whether or not the software satisfies the user requirements. It is
carried out at the end of the SDLC. If the software matches requirements for which it was made, it is
validated.

 Validation ensures the product under development is as per the user requirements.
 Validation answers the question – "Are we developing the product which attempts all that user needs
from this software ?".
 Validation emphasizes on user requirements.

Software Verification

Verification is the process of confirming if the software is meeting the business requirements, and is
developed adhering to the proper specifications and methodologies.

 Verification ensures the product being developed is according to design specifications.


 Verification answers the question– "Are we developing this product by firmly following all design
specifications ?"
 Verifications concentrates on the design and system specifications.

Target of the test are -

Errors - These are actual coding mistakes made by developers. In addition, there is a difference in
output of software and desired output, is considered as an error.

Fault - When error exists fault occurs. A fault, also known as a bug, is a result of an error which can
cause system to fail.

Failure - failure is said to be the inability of the system to perform the desired task. Failure occurs when
fault exists in the system.

Manual Vs Automated Testing

Testing can either be done manually or using an automated testing tool:

Manual - This testing is performed without taking help of automated testing tools. The software tester
prepares test cases for different sections and levels of the code, executes the tests and reports the result to
the manager.
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.

3
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

A test needs to check if a webpage can be opened in Internet Explorer. This can be easily done with
manual testing. But to check if the web-server can take the load of 1 million users, it is quite impossible
to test manually.

There are software and hardware tools which helps tester in conducting load testing, stress testing,
regression testing.

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.

Exhaustive tests are the best-desired method for a perfect testing. Every single possible value in the
range of the input and output values is tested. It is not possible to test each and every value in real world
scenario if the range of values is large.

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.
4
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Pair-wise Testing - The behavior of software depends on multiple parameters. In pairwise 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.

The below are some White-box testing techniques:

Control-flow testing - The purpose of the control-flow testing to set up test cases 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.

Testing Levels

Testing itself may be defined at various levels of SDLC. The testing process runs parallel to software
development. Before jumping on the next stage, a stage is tested, validated and verified.

Testing separately is done just to make sure that there are no hidden bugs or issues left in the software.
Software is tested on various levels -

Unit Testing

While coding, the programmer performs some tests on that unit of program to know if it is error free.
Testing is performed under white-box testing approach. Unit testing helps developers decide that
individual units of the program are working as per requirement and are error free.

Integration Testing

5
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Even if the units of software are working fine individually, there is a need to find out if the units if
integrated together would also work without errors. For example, argument passing and data updation
etc.

System Testing

The software is compiled as product and then it is tested as a whole. This can be accomplished using one
or more of the following tests:

Functionality testing - Tests all functionalities of the software against the requirement.

Performance testing - This test proves how efficient the software is. It tests the effectiveness and
average time taken by the software to do desired task. Performance testing is done by means of load
testing and stress testing where the software is put under high user and data load under various
environment conditions.

Security & Portability - These tests are done when the software is meant to work on various platforms
and accessed by number of persons.

Acceptance Testing

When the software is ready to hand over to the customer it has to go through last phase of testing where
it is tested for user-interaction and response. This is important because even if the software matches all
user requirements and if user does not like the way it appears or works, it may be rejected.

Alpha testing - The team of developer themselves perform alpha testing by using the system as if it is
being used in work environment. They try to find out how user would react to some action in software
and how the system should respond to inputs.

Beta testing - After the software is tested internally, it is handed over to the users to use it under their
production environment only for testing purpose. This is not as yet the delivered product. Developers
expect that users at this stage will bring minute problems, which were skipped to attend.

Regression Testing

Whenever a software product is updated with new code, feature or functionality, it is tested thoroughly
to detect if there is any negative impact of the added code. This is known as regression testing.

Testing Documentation

Testing documents are prepared at different stages -

Before Testing

Testing starts with test cases generation. Following documents are needed for reference –

6
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

SRS document - Functional Requirements document

Test Policy document - This describes how far testing should take place before releasing the product.

Test Strategy document - This mentions detail aspects of test team, responsibility matrix and
rights/responsibility of test manager and test engineer.

Traceability Matrix document - This is SDLC document, which is related to requirement gathering
process. As new requirements come, they are added to this matrix. These matrices help testers know the
source of requirement. They can be traced forward and backward.

While Being Tested

The following documents may be required while testing is started and is being done:

Test Case document - This document contains list of tests required to be conducted. It includes Unit test
plan, Integration test plan, System test plan and Acceptance test plan.

Test description - This document is a detailed description of all test cases and procedures to execute
them.

Test case report - This document contains test case report as a result of the test.

Test logs - This document contains test logs for every test case report.

After Testing

The following documents may be generated after testing :

Test summary - This test summary is collective analysis of all test reports and logs. It summarizes and
concludes if the software is ready to be launched. The software is released under version control system
if it is ready to launch.

Testing vs. Quality Control, Quality Assurance and Audit

We need to understand that software testing is different from software quality assurance, software
quality control and software auditing.

Software quality assurance - These are software development process monitoring means, by which it is
assured that all the measures are taken as per the standards of organization. This monitoring is done to
make sure that proper software development methods were followed.
Software quality control - This is a system to maintain the quality of software product. It may include
functional and non-functional aspects of software product, which enhance the goodwill of the
organization. This system makes sure that the customer is receiving quality product for their requirement
and the product certified as ‘fit for use’.
Software audit - This is a review of procedure used by the organization to develop the software. A team
of auditors, independent of development team examines the software process, procedure, requirements
and other aspects of SDLC. The purpose of software audit is to check that software and its development
process, both conform standards, rules and regulations.

7
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

SOFTWARE DEVELOPMENT LIFE CYCLE AND TESTING

Software Development Life Cycle, SDLC for short, is a well-defined, structured sequence of stages in
software engineering to develop the intended software product.

SDLC Activities

SDLC provides a series of steps to be followed to design and develop a software product efficiently.
SDLC framework includes the following steps:

Communication

This is the first step where the user initiates the request for a desired software product. He contacts the
service provider and tries to negotiate the terms. He submits his request to the service providing
organization in writing.

Requirement Gathering

This step onwards the software development team works to carry on the project. The team holds
discussions with various stakeholders from problem domain and tries to bring out as much information
as possible on their requirements. The requirements are contemplated and segregated into user
requirements, system requirements and functional requirements. The requirements are collected using a
number of practices as given -

8
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

 studying the existing or obsolete system and software,


 conducting interviews of users and developers,
 referring to the database or
 collecting answers from the questionnaires.

Feasibility Study

After requirement gathering, the team comes up with a rough plan of software process. At this step the
team analyzes if a software can be made to fulfill all requirements of the user and if there is any
possibility of software being no more useful. It is found out, if the project is financially, practically and
technologically feasible for the organization to take up. There are many algorithms available, which help
the developers to conclude the feasibility of a software project.

System Analysis

At this step the developers decide a roadmap of their plan and try to bring up the best software model
suitable for the project. System analysis includes Understanding of software product limitations, learning
system related problems or changes to be done in existing systems beforehand, identifying and
addressing the impact of project on organization and personnel etc. The project team analyzes the scope
of the project and plans the schedule and resources accordingly.

Software Design

Next step is to bring down whole knowledge of requirements and analysis on the desk and design the
software product. The inputs from users and information gathered in requirement gathering phase are the
inputs of this step. The output of this step comes in the form of two designs; logical design and physical
design. Engineers produce meta-data and data dictionaries, logical diagrams, data-flow diagrams and in
some cases pseudo codes.

Coding

This step is also known as programming phase. The implementation of software design starts in terms of
writing program code in the suitable programming language and developing error-free executable
programs efficiently.

Testing

An estimate says that 50% of whole software development process should be tested. Errors may ruin the
software from critical level to its own removal. Software testing is done while coding by the developers
and thorough testing is conducted by testing experts at various levels of code such as module testing,
program testing, product testing, in-house testing and testing the product at user’s end. Early discovery
of errors and their remedy is the key to reliable software.

Integration

Software may need to be integrated with the libraries, databases and other program(s). This stage of
SDLC is involved in the integration of software with outer world entities.

9
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Implementation

This means installing the software on user machines. At times, software needs post-installation
configurations at user end. Software is tested for portability and adaptability and integration related
issues are solved during implementation.

Operation and Maintenance

This phase confirms the software operation in terms of more efficiency and less errors. If required, the
users are trained on, or aided with the documentation on how to operate the software and how to keep
the software operational. The software is maintained timely by updating the code according to the
changes taking place in user end environment or technology. This phase may face challenges from
hidden bugs and real-world unidentified problems.

Disposition

As time elapses, the software may decline on the performance front. It may go completely obsolete or
may need intense upgradation. Hence a pressing need to eliminate a major portion of the system arises.
This phase includes archiving data and required software components, closing down the system,
planning disposition activity and terminating system at appropriate end-of-system time.

Software Development Paradigm

The software development paradigm helps developer to select a strategy to develop the software. A
software development paradigm has its own set of tools, methods and procedures, which are expressed
clearly and defines software development life cycle. A few of software development paradigms or
process models are defined as follows:

Waterfall Model

Waterfall model is the simplest model of software development paradigm. It says the all the phases of
SDLC will function one after another in linear manner. That is, when the first phase is finished then only
the second phase will start and so on.

10
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

This model assumes that everything is carried out and taken place perfectly as planned in the previous
stage and there is no need to think about the past issues that may arise in the next phase. This model does
not work smoothly if there are some issues left at the previous step. The sequential nature of model does
not allow us go back and undo or redo our actions.

This model is best suited when developers already have designed and developed similar software in the
past and are aware of all its domains.

Iterative Model

This model leads the software development process in iterations. It projects the process of development
in cyclic manner repeating every step after every cycle of SDLC process.

The software is first developed on very small scale and all the steps are followed which are taken into
consideration. Then, on every next iteration, more features and modules are designed, coded, tested and
added to the software. Every cycle produces a software, which is complete in itself and has more features
and capabilities than that of the previous one.

After each iteration, the management team can do work on risk management and prepare for the next
iteration. Because a cycle includes small portion of whole software process, it is easier to manage the
development process but it consumes more resources.

Spiral Model

Spiral model is a combination of both, iterative model and one of the SDLC model. It can be seen as if
you choose one SDLC model and combine it with cyclic process (iterative model).

11
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

This model considers risk, which often goes un-noticed by most other models. The model starts with
determining objectives and constraints of the software at the start of one iteration. Next phase is of
prototyping the software. This includes risk analysis. Then one standard SDLC model is used to build
the software. In the fourth phase of the plan of next iteration is prepared.

V – model

The major drawback of waterfall model is we move to the next stage only when the previous one is
finished and there was no chance to go back if something is found wrong in later stages. V-Model
provides means of testing of software at each stage in reverse manner.

12
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

At every stage, test plans and test cases are created to verify and validate the product according to the
requirement of that stage. For example, in requirement gathering stage the test team prepares all the test
cases in correspondence to the requirements. Later, when the product is developed and is ready for
testing, test cases of this stage verify the software against its validity towards requirements at this stage.

This makes both verification and validation go in parallel. This model is also known as verification and
validation model.

Big Bang Model

This model is the simplest model in its form. It requires little planning, lots of programming and lots of
funds. This model is conceptualized around the big bang of universe. As scientists say that after big bang
lots of galaxies, planets and stars evolved just as an event. Likewise, if we put together lots of
programming and funds, you may achieve the best software product.

13
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

For this model, very small amount of planning is required. It does not follow any process, or at times the
customer is not sure about the requirements and future needs. So the input requirements are arbitrary.

This model is not suitable for large software projects but good one for learning and experimenting.

Role of testing in SDLC:

The role of testing in the Software Development Life Cycle (SDLC) is to ensure that the final product
meets the user's expectations. Testing is a crucial phase that can help reduce costs, improve quality, and
increase user satisfaction.

Here are some ways testing is important in different phases of the SDLC:
 Early testing: Testing early in the SDLC can help minimize the cost of fixing bugs.
 Quality assurance: Testing is a way to ensure that the product meets quality standards.
 User satisfaction: Proper testing can lead to more customer engagement and improved
productivity.
 Cost savings: Testing can reduce the overall cost of product development and maintenance.
 Bug prevention: Designing tests well can help prevent bugs before they are coded.
 Security: Security testing can help identify flaws that could expose users' personal data or make the
software susceptible to malware.

During the testing phase, developers use a test plan to identify and investigate any issues. The test
plan includes the types of testing to be performed, who will be testing, and how the software will be
tested. Some types of testing include:
 Unit testing
 Integration testing
 System testing
 Acceptance testing
 Quality assurance testing (QA)
 User acceptance testing (UAT)

SOFTWARE TESTING LIFE CYCLE

Software Testing Life Cycle (STLC) is a process used to test software and ensure that quality
standards are met. Tests are carried out systematically over several phases. During product
development, phases of the STLC may be performed multiple times until a product is deemed
suitable for release.

Entry and Exit Criteria in STLC


 Entry Criteria: Entry Criteria gives the prerequisite items that must be comple
 Exit Criteria: Exit Criteria defines the items that must be completed before testing can
be concluded

14
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

The 6 STLC Phases In-Depth


Software Testing Life Cycle consists of 6 phases, each with defined entry and exit criteria and
associated activities and deliverables.
Entry and exit criteria define when a phase can start and when it can end.
Activities and deliverables define what actions are performed and what the expected result is.

STLC Model Phases

1. Requirement Analysis
2. Test Planning
3. Test case development
4. Test Environment setup
5. Test Execution
6. Test Cycle closure

Each of these stages has a definite Entry and Exit criteria, Activities & Deliverables associated
with it.

Phase 1: Requirement Analysis

During this phase, feature requirements collected in the SDLC process are evaluated to identify
testable aspects. If necessary, testing teams may need to consult with stakeholders to clarify
requirements. These requirements can either be functional or non-functional, defining what a
feature can do or it’s characteristics respectively. The ability to automate testing is also evaluated
during this phase.

 Entry Criteria—documented requirements, acceptance criteria, and intended product


architecture.
 Exit Criteria—approved requirement traceability matrix (RTM) and automation feasibility
report.
 Activities
o Identify types of tests to be performed.
o Gather details about testing priorities and focus.
o Prepare Requirement Traceability Matrix (RTM).
15
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

 Deliverables

RTM
Automation feasibility report

Phase 2: Test Planning

During this phase, the test strategy is outlined in a test plan document. This strategy includes
tools needed, testing steps, and roles and responsibilities. Part of determining this strategy is a risk
and cost analysis and an estimated timeline for testing.

 Entry Criteria—requirement analysis, RTM, and automation feasibility report.


 Exit Criteria—approved test plan including timelines and risk/cost analysis.
 Activities

Preparation of test plan/strategy


Test tool selection
Test effort estimation
Resource planning and determining roles and responsibilities.
Training requirement

 Deliverables

Test plan /strategy document.


Effort estimation document.

Phase 3: Test Case Development

During this phase, test cases are created. Each case defines test inputs, procedures, execution
conditions, and anticipated results. Test cases should be transparent, efficient, and adaptable. Once
all test cases are created, test coverage should be 100%. Any necessary automation scripts are also
created during this phase.

 Entry Criteria—approved test plan including timelines and risk/cost analysis.


 Exit Criteria—approved test cases and automation scripts.
 Activities

Create test cases, automation scripts (if applicable)


Review and baseline test cases and scripts
Create test data

 Deliverables

Test
cases/scripts
Test data

16
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Phase 4: Test Environment Setup

During this phase, testing environments are configured and deployed. This phase may include a
variety of testing tools, including TestComplete, Selenium, Appium, or Katalon Studio. Sometimes,
this phase also includes setting up test servers. Once environments are deployed, smoke tests are
performed to ensure that environments are working as expected with all intended functionality.

 Entry Criteria: system design and project architecture definitions.


 Exit Criteria: a fully functional test environment and approved test cases.
 Activities

Understand the required architecture, environment set-up and prepare


hardware/software requirement list for the Test Environment.
Setup test Environment and test data
Perform smoke test on the build

 Deliverables

Environment ready with test data set up


Smoke Test Results.

Phase 5: Test Execution

During this phase, features are tested in the deployed environment, using the established test
cases. Expected test results are compared to actual and results are gathered to report back to
development teams.

 Entry Criteria—all exit criteria from previous steps.


 Exit Criteria—all tests are performed and results are documented.
 Activities

Execute tests as per plan


Document test results, and log defects for failed cases
Map defects to test cases in RTM
Retest the Defect fixes
Track the defects to closure

 Deliverables

Test cases updated with results


Defect reports

Phase 6: Test Cycle Closure

This is the last phase of the STLC, during which a test result report is prepared. This report
should summarize the entire testing process and provide comparisons between expected results and
actual. These comparisons include objectives met, time taken, total costs, test coverage, and any
defects found.

17
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

 Entry Criteria—test results and logging from all previous phases.


 Exit Criteria—delivered and approved test closure report.
 Activities

Evaluate cycle completion criteria based on Time, Test coverage, Cost, Software,
Critical Business Objectives, Quality
Prepare test metrics
Prepare Test closure report
Qualitative and quantitative reporting of quality of the work product to the customer.
Test result analysis

 Deliverables

Test Closure
report
Test metrics

V-MODEL OF SOFTWARE TESTING

The V-model of SDLC carries out its execution in a sequential manner. This model is also
popularly termed as a Verification and Validation model. Each phase has to be finished before
beginning the next phase. A sequential design progression is followed like that of the waterfall
model.

The Design of the SDLC V-Model


In parallel to the software development phase, a corresponding series of test phase also runs in this
model. Each stage comprises a specific type of testing done, and once that testing is passed, only
then the next phase starts.

18
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Verification: In the concept of verification in the V-Model, static analysis technique is carried out
without executing the code. This evaluation procedure is carried out at the time of development to
check whether specific requirements will meet or not.

Validation: This concept of V-Model comprises of dynamic analysis practice (both functional as
well as non-functional), and testing is done by code execution. The validation of a product is done
once the development is complete for determining if the software meets up the customer hope
needs.

So both verification and validation are combined and work in parallel to make the V- Model fully
functional.

Design Phase
➢ Requirement Analysis: In this stage of SDLC, a detailed conversation with the customer is
made to understand their requirements as well as anticipation. Requirement gathering is
another name of this phase.

➢ System Design or High-level Design: In this phase of SDLC, the system is designed with
the entire hardware & the setup is constructed for product development.

➢ Architectural Design: The breakdown of system design to a more detailed version, i.e.,
into modules which creates different functionalities. Transferring of data and connection
between internal and external modules (i.e., the outside world) is evidently identified.

➢ Low-level design or Module Design: This particular phase breaks down the entire product
development into tiny modules where each intended module is specified. So it is also
termed as Low-Level Design (LLD).

Testing Phase
➢ Unit Testing: During the development of module design, unit testing is carried out. This
plan is executed for eliminating bugs that are found in code at the development of your
software.

➢ Integration Testing: Once the unit testing is done, the integration testing is carried out
where the integration of modules in the system is hardened. This testing is done in the
architecture design phase.

➢ System Testing: This ultimate test is done when the entire product is completed in
conjunction with the functionality, internal dependency requirement and merging of
different modules into a single unit.

➢ User Acceptance Testing: This type of testing is carried out in front of the user or in a user
environment where the product will ultimately set up. The UAT particularly test whether
the product is capable enough to launch in the market or ready to work in the real world.

19
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Program Correctness and Verification


Correctness from software engineering perspective can be defined as the adherence to the
specifications that determine how users can interact with the software and how the software should
behave when it is used correctly.
If the software behaves incorrectly, it might take considerable amount of time to achieve the task or
sometimes it is impossible to achieve it.
The important rules for effective programming which are consequences of the program
correctness theory.
➢ Defining the problem completely.
➢ Develop the algorithm and then the program logic.
➢ Reuse the proved models as much as possible.
➢ Prove the correctness of algorithms during the design phase.
➢ Developers should pay attention to the clarity and simplicity of your program.
➢ Verifying each part of a program as soon as it is developed.

The reasons for program correctness and verification and some of them are as follows

➢ The focus of software testing is to run the program on selected input data and check
whether the program behaves correctly with respect to its specification. The behavior of the
program can be analyzed only if we know what is a correct behavior; hence the study of
correctness is an integral part of software testing.

➢ The study of program correctness leads to analyze candidate programs at arbitrary levels of
granularity; in particular, it leads to make assumptions on the behavior of the program at
specific stages in its execution and to verify (or disprove) these assumptions; the same
assumptions can be checked at run-time during testing, giving us valuable information as
we try to diagnose the program or establish its correctness. Hence to prove program
correctness enable us to be better/more effective testers.

Levels or Stages of Testing

Unit Testing
 Unit Testing is a type of software testing where individual units or components of a
software are tested. The purpose is to validate that each unit of the software code
performs as expected.
 Unit Testing is done during the development (coding phase) of an application by the
developers.
 Unit Tests isolate a section of code and verify its correctness.
 A unit may be an individual function, method, procedure, module, or object.

20
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

The key reasons to perform unit testing

 Unit tests help to fix bugs early in the development cycle and save costs.
 It helps the developers to understand the testing code base and enables them to
make changes quickly
 Good unit tests serve as project documentation
 Unit tests help with code re-use. Migrate both your code and your tests to your new
project. Tweak the code until the tests run again.

The workflow of Unit Testing

The workflow of Unit Testing is 1) Create Test Cases 2) Review/Rework 3) Baseline 4) Execute
Test Cases.

Unit Testing Techniques:


There are 3 types of Unit Testing Techniques. They are

 Black Box Testing:


This testing technique is used in covering the unit tests for input, user interface, and
output parts.

 White Box Testing:


This technique is used in testing the functional behavior of the system by giving
the input and checking the functionality output including the internal design structure and
code of the modules.

 Gray Box Testing:


This technique is used in executing the relevant test cases, test methods, test functions,
and analyzing the code performance for the modules.

21
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Advantages of Unit Testing


 Unit testing enables testing parts of the project without waiting for others to
be completed.
 Early Detection of Issues
 Improved Code Quality
 Increased Confidence
 Reduced Time and Cost

Disadvantages of Unit Testing:


 The process is time-consuming for writing the unit test cases.
 It requires more time for maintenance when the source code is changed frequently.
 It cannot cover the non-functional testing parameters such as scalability, the
performance of the system, etc.
 Difficulty in Testing Complex Units
 Difficulty in Testing Interactions

Integration Testing

 Integration testing is known as the second level of the software testing process,
following unit testing. Integration testing involves checking individual components or
units of a software project to expose defects and problems to verify that they work
together as designed.
 The main function or goal of this testing is to test the interfaces between the
units/modules.
 The individual modules are first tested in isolation. Once the modules are unit tested,
they are integrated one by one, till all the modules are integrated, to check the
combinational behavior, and validate whether the requirements are implemented
correctly or not.

Example of Integration Test Case


Sample Integration Test Cases for the following scenario: Application has 3 modules
say ‘Login Page’, ‘Mailbox’ and ‘Delete emails’ and each of them is integrated logically.

Check its integration to the Delete Mails Module.

22
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Test
Case Test Case Objective Test Case Expected Result
ID Description
1 Check the interface link Enter login To be directed to the Mail
between the Login and credentials and click on Box
Mailbox module the Login button
2 Check the interface link From Mailbox select the Selected email should
between the Mailbox and email and click a appear in the
Delete Mails Module delete button Deleted/Trash folder
Types of Integration Testing
Software Engineering defines variety of strategies to execute Integration testing, viz.

1. Big Bang Approach


2. Incremental Approach
a) Top Down Approach
b) Bottom Up Approach
3. Sandwich Approach – Combination of Top Down and Bottom Up

Big Bang Testing


 Big Bang Testing is an Integration testing approach in which all the components or
modules are integrated together at once and then tested as a unit.
 This combined set of components is considered as an entity while testing. If all of the
components in the unit are not completed, the integration process will not execute.

Incremental Testing
 In the Incremental Testing approach, testing is done by integrating two or more
modules that are logically related to each other and then tested for proper functioning
of the application. Then the other related modules are integrated incrementally and the
process continues until all the logically related modules are integrated and tested
successfully.
 Incremental Approach, in turn, is carried out by two different Methods:
 Bottom Up
 Top Down

23
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Stubs and Drivers


Stubs and Drivers are the dummy programs in Integratio facilitaten testing used to a
the software testing activity. These programs act as the missing models in substitutes for
the testing.
 Stub: Is called by the Module under Test.
 Driver: Calls the Module to be tested.

Stubs Driver
 Used in Top down approach Used in Bottom up approach
 Top most module is tested first Lowest modules are tested first.
 Stimulates the lower level of Stimulates the higher level of
components components
 Dummy program of lower Dummy program for Higher level
level components component

Bottom-up Integration Testing


 Bottom-up Integration Testing is a strategy in which modules are the lower level
tested first. These tested modules are then facilitate the testing of further used to
higher level modules.
 The process continues until all modules at top level are tested. Once the lower level
modules are tested and integrated, then the next level of modules are formed.

24
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

Advantages:
 Fault localization is easier.
 No time is wasted waiting for all modules to be developed unlike Big- bang
approach
Disadvantages:
 Critical modules (at the top level of software architecture) which control the flow of
application are tested last and may be prone to defects.
 An early prototype is not possible

Top-down Integration Testing


 Top Down Integration Testing is a method in which integration testing takes place
from top to bottom following the control flow of software system.
 The higher level modules are tested first and then lower level modules are tested and
integrated in order to check the software functionality. Stubs are used for testing if
some modules are not ready.

Advantages:
 Fault Localization is easier.
 Possibility to obtain an early prototype.
 Critical Modules are tested on priority; major design flaws could be found and
fixed first.
Disadvantages:
 Needs many Stubs.
 Modules at a lower level are tested inadequately.

Sandwich Testing
 Sandwich Testing is a strategy in which top level modules are tested with lower
level modules at the same time lower modules are integrated with top modules and
tested as a system.
 It is a combination of Top-down and Bottom-up approaches therefore it is called
Hybrid Integration Testing. It makes use of both stubs as well as drivers.

25
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

System Testing
 System testing, also referred to as system-level testing or system
integration testing, is the process in which a quality assurance (QA)
team evaluates how the various components of an application interact
together in the full, integrated system or application.
 System testing verifies that an application performs tasks as designed.
It's a type of black box testing that focuses on the functionality of an
application rather than the inner workings of a system, which white
box testing is concerned with.

 System testing is the third level of testing in the software


development process. It's typically performed before acceptance testing
and after integration testing.
Importance of system testing
 Improved product quality - A comprehensive system testing
process ultimately boosts the product quality.
 Error reduction - System testing verifies a system's code and functionality
against its requirements, so errors that aren't detected during
integration and unit testing can be exposed during system testing.

26
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

 Cost savings - It can be more time-consuming to fix a system defect


that's detected later in the project lifecycle.
 Security - Well-tested products are reliable. They ensure that the
tested system doesn't contain vulnerabilities.
 Customer satisfaction - System testing offers visibility into the
stability of a product at every stage of development. This builds
customer confidence and improves the overall user experience.
 Easier code modification - System testing can identify code problems
during software development.
 Software performance - Performance-based system tests can help
understand changes in a system's performance and behavior, such as
memory consumption, central processing unit utilization and latency.

System Testing Process


 Test Planning:
The test plan is a document that includes the information of your
testing, like objectives, strategies, entry-exit criteria, software
requirements, testing tools, guidelines, etc.
 Test Case Design and Execution:
Create a test case for every feature with the test scenarios,
description, process, and more. Then perform the tests and execute them.
 Defect Tracking and Defect Management:
Track and record the defects with the defect tracking tools like-
JIRA, Bugzilla, Trello, etc. Also, you must write about them for the
developers to resolve them.
 Reporting and Communication:
Create bug reports about defect reports to send to the developers.
Try to follow an organizational method for this.
System Testing Types
A. Functional Testing
1. Unit Testing
 This testing process checks whether each system unit or component
works accordingly. This is the first testing step performed at the
development stage, and it helps to fix the bugs before the
development cycle.
2. Integration Testing
 This testing aims to validate the different software units working
together to achieve the expected functionality. Thus it establishes a
steady communication between several components and
subsystems of software.

27
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

28
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

29
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

30
Course Code/Title: CS2602/SOFTWARE TESTING Unit: I

31

You might also like