Unit-2 Application Testing Basics
Unit-2 Application Testing Basics
Application Testing
Application Testing is a part of the Software Application Development process
that is carried out for verifying the correctness and validating the functional
features of the application being developed.
It is a process which ensures that a software application functions properly and
according to the requirements specified.
Application testing refers to testing any software application using scripts, tools,
or test automation frameworks to identify errors.
Types of Application Design:
1. Web Application
2. Mobile Application
3. IoT Application
4. Cloud Application
Web Application
Types of Requirements:
1) Business Requirements
2) User Requirements
3) System Requirements
Business Requirements:
It describes the technical specifications and conditions that the system must meet.
It is usually more detailed:
Hardware Requirements
Specific hardware configuration needed to run the system
Software Requirements
Required operating systems, software libraries, or framework
Performance Requirements
Response times, throughput, and other performance metrics
Security Requirements
Authentication, Authorization, encryption and other security measures
Integration Requirements
How the system will interact with other systems or APIs
Functional Requirements
Specific functionalities that system must perform
3) User Requirements:
User requirements focus on the needs and expectations of the end-users who
will interact with the system.
These requirements are typically more user-centered:
User Stories/Use Cases: Descriptions of how users will interact with the system
to achieve their goals.
User Interface Requirements: Specifications for the look and feel of the user
interface.
Usability Requirements: Ease of use, accessibility, and overall user experience
Functional Requirements: Specific tasks or functions that users need to
perform.
Key differences
Focus:
• System Requirements: Technical and implementation-focused.
• Business Requirements: Business objectives and high-level goals.
• User Requirements: End-user needs and interaction with the system.
Detail Level:
System Requirements: Highly detailed and specific.
Business Requirements: Broad and general.
User Requirements: Detailed in terms of user interaction but not
necessarily technical.
Key differences
Stakeholders:
System Requirements: Typically involve developers, system
architects, and IT professionals.
Business Requirements: Involve business analysts, executives, and
other business stakeholders.
User Requirements: Involve end-users, product managers, and user
experience designers.
Test Level
Software testing is generally carried out at different levels. There are four such
levels namely unit testing, integration testing, system testing and acceptance
testing.
The first three levels of testing activities are done by the testers and the last level
of testing is done by the customer/user.
Each level has specific testing objectives.
1) Unit Testing:
We develop software in parts / units and every unit is expected to have a defined
functionality. We may call it a component, module, procedure, function, etc., which
will have a purpose and may be developed independently and simultaneously.
A unit is the smallest testable piece of software, which may consist of hundreds or
even just few lines of source code, and generally represents the result of the work of
one or few developers.
individual units or components of a software application are tested to ensure they
behave as expected.
To perform this kind of testing, knowledge of programming is necessary. So only
programmers do this kind of test, not testers.
The primary objective of executing the unit testing is to confirm the unit components
with their performance.
Example:
In a program we are checking if the loop, method, or function is working fine.
Cont..
Unit testing helps improve code quality, facilitates code refactoring, and
enhances overall software maintainability.
2) Integration Testing
Integration testing is testing in which a group of components is combined to
produce output.
The purpose of integration testing is to verify that the units function correctly
together as integrated components or subsystems of the larger system.
The focus of the integration testing level is to expose defects at the time of
interaction between integrated components or units.
We combine two or more units because they share some relationship. This
relationship is represented by an interface and is known as coupling.
The coupling is the measure of the degree of interdependence between
units.
Two units with high coupling are strongly connected and thus, dependent on
each other.
Two units with low coupling are weakly connected and thus have low
dependency on each other.
Cont..
Coupling increases as the number of calls amongst units increases or the amount of
shared data increases.
A design with high coupling may have more errors.
Types of Integration Testing
1)Top-Down approach
2) Bottom-Up approach
3) Incremental approach
4) Big- Bang approach
5) Sandwich approach
Top-Down Integration
It starts from the main unit and keeps on adding all called units of the
next level.
After completion of integration testing at this level, add the next level of
units and so on till we reach the lowest level units leaf units)
Bottom-Up Integration
In bottom-up integration, we start from the bottom, (i.e. from leaf units)
and keep on adding upper level units till we reach the top (i.e. root
node).
Sandwich Approach
Utmost care should be taken for the defects found during the system
testing phase. A proper impact analysis should be done before fixing the
defect.
Sometimes, if the system permits, instead of fixing the defects, they are
just documented and mentioned as the known limitations.
This may happen in a situation when fixing is very time consuming or
technically it is not possible in the present design, etc.
After the completion of this phase, customers are invited to test the
software.
Cont..
Test Cases:
Individual scenarios that check specific functionality or features of the
software. Each test case includes:
Test data: The input data for the test.
Pre-conditions: Conditions that must be met before the test can run.
Expected results: The expected output or behavior of the software.
Post-conditions: Conditions that should be met after the test runs.
Test Scripts:
Automated scripts that execute test cases. They are particularly useful for
regression testing and large projects where manual testing is time-consuming.
Cont..
Test Data:
The specific inputs used for running the tests. This data can be static or
dynamically generated.
Configuration Files:
Files that set up the environment and parameters needed for the tests.
Types of Test Suites
2) Filter based suite: You specify which scenarios to be selected based on a set of
Scenario custom field filters or tag based filters.
3) Requirements based suite: You specify a set of Requirements based on which, the
required Scenarios are pooled from traceability information in the Universe.
Selection of test suit
1) Select All Test Suit
This is the simplest technique where we do not want to take any risk. We want to
run all test suit for any change in the program.
3) Early testing:
To find the defect in the software, early test activity shall be started. The defect
detected in the early phases of SDLC will be very less expensive.
4) Defect clustering:
A small number of modules usually contain most of the defects detected. We have
various reasons for this, such as the modules could be complicated; the coding part
may be complex, and so on.
5) Pesticide paradox:
Repeating the same test cases, again and again, will not find new bugs.
So it is necessary to review the test cases and add or update test cases to find new
bugs.
6) Testing is context-dependent:
The testing approach depends on the context of the software developed. Different
types of software need to perform different types of testing.
7) Absence of errors fallacy:
If a built software is 99% bug-free but it does not follow the user requirement then it
is unusable. It is not only necessary that software is 99% bug-free but it is also
mandatory to fulfil all the customer requirements.