Testing Concepts ClassBook Lesson02
Testing Concepts ClassBook Lesson02
Test Levels
o Component Testing
o Integration Testing
o System Testing
o Acceptance Testing
Lesson Objectives
Test Types
o Functional Testing
o Non-functional Testing
o White-box Testing
o Change-related Testing
Maintenance Testing
o Triggers for Maintenance
Test Data
2.1 Software Development Life Cycle (SDLC) Models
Test analysis and design for a given test level begin during the corresponding
development activity
No matter which SDLC model is chosen, test activities should start in the
early stages of the lifecycle, adhering to the testing principle of early
testing.
2.1.2 Software Development Lifecycle Models in Context
SDLC models must be selected and adapted based on the context of project and
product characteristics such as - project goal, the type of product being
developed, business priorities (e.g., time-tomarket), and identified product and
project risks.
Test levels are groups of test activities that are organized and managed
together. Each test level is an instance of the test process related to other
activities with in SDLC.
Wishes,
Wishes,
Ideas,
Ideas,
Concepts
Concepts Acceptance Test Plan
Requirements Acceptance
Specification Test cases
Program
Specifications
Component / Unit Test cases
Verification and Validation
Verification
It is conducted by QA team.
Verification is Correctness.
Verification and Validation (Cont.)
Validation
After each validation test has been conducted, one of two possible
conditions exist:
Integration testing
Integration testing demonstrates that two or more units or other integrations
work together properly, and tends to focus on the interfaces specified in low-
level design.
System testing
System testing demonstrates that the system works end-to-end in a production-
like environment to provide the business functions specified in the high-level
design.
Acceptance testing
Acceptance testing is conducted by business owners and users to confirm that
the system does, in fact, meet their business requirements.
2.2 Test Levels (Cont.)
• Reducing risk
Unit testing uncovers errors in logic and function within the boundaries of a
component.
Typical defects and failures : Typical defects and failures for component
testing include :
Incorrect functionality (e.g., not as described in design specifications)
Data flow problems
Incorrect code and logic
2.2.2 Integration testing
There are two different levels of integration testing which may be carried
out on test objects of varying size as follows:
Component integration testing (CIT) focuses on the interactions
and interfaces between integrated components. Component
integration testing is performed after component testing.
• Interface mismatch
• Interface mismatch
‒ Bottom up Approach : Firstly module at the lowest level is tested first. Once testing of
that module is done then any one of the next level modules is added to it and
tested. This continues till top most module is added to rest all and tested and it is
called as Driver.
2.2.3 System Testing
• Incorrect calculations
The main objective of functional testing is to verify that each function of the
software application / system operates in accordance with the written requirement
specifications.
It is a black-box process :
Performance
Performance is the behavior of the system w.r.t. goals for time, space, cost and
reliability
Performance objectives:
Throughput : The number of tasks completed per unit time. Indicates how much
work has been done within an interval
Response time : The time elapsed during input arrival and output delivery
This testing is subjecting the program to heavy volumes of data. For e.g.
A compiler would be fed a large source program to compile
A file system would be fed with enough data to cause the program to
switch from one volume to another.
Load Testing
Volume testing creates a real-life end user pressure for the target
software. This tests how the software acts when numerous end users
access it concurrently. For e.g.
Downloading a sequence of huge files from the web
That is, we want to see what happens when the system is pushed beyond
design limits.
It is not same as volume testing.
Security Testing verifies that protection mechanisms built into the system
will protect it from improper penetration.
Security testing is the process of executing test cases that subvert the
program’s security checks.
Example :
One tries to break the operating systems memory protection mechanisms
The role of the developer is to make penetration cost more than the value of the
information that will be obtained
Web Security Testing
Usability is
The effectiveness, efficiency and satisfaction with which specified users can achieve
specified goals in a particular environment ISO 9241-11
Effective–- Accomplishes user’s goal
Efficient-- Accomplishes the goal quickly
Satisfaction–- User enjoys the experience
Test Categories and objectives
Interactivity ( Pull down menus, buttons)
Layout
Readability
Aesthetics
Display characteristics
Time sensitivity
Personalization
Usability Testing (Cont.)
A system test that forces the software to fail in variety of ways, checks
performed
recovery is automatic ( performed by the system itself)
reinitialization
check pointing mechanisms
data recovery
restarts are evaluated for correctness
This test confirms that the program recovers from expected or unexpected
events. Events can include shortage of disk space, unexpected loss of
communication
Documentation Testing
Usually carried out by the end user to test whether or not the right
system has been created
Operational Acceptance Testing (OAT)
• Disaster recovery
• User management
• Maintenance tasks
• Performance testing
Contractual and Regulatory Testing
Test Basis
Examples of work products that can be used as a test basis for any form
of acceptance testing include:
Business processes
User or business requirements
Regulations, legal contracts and standards
Use cases
System requirements
System or user documentation
Installation procedures
Risk analysis reports
Alpha and Beta Testing
Test Objects
‒ Confirmation testing
‒ Regression testing
Confirmation testing and regression testing are performed at all test levels.
After a defect is fixed, the software is tested by re-running all test cases
that failed due to the defect, within same environment, with same inputs
and same preconditions on the new software version.
The software may also be tested with new tests if, for instance, the
defect was missing functionality.
At the very least, the steps to reproduce the failure(s) caused by the
defect must be re-executed on the new software version.
It is possible that a change made in one part of the code, whether a fix or
another type of change, may accidentally affect the behavior of other
parts of the code, whether within the same component, in other
components of the same system, or even in other systems.
For CT, tests are designed based on how a component should calculate
compound interest.
For CIT, tests are designed based on how account information captured at
the user interface is passed to the business logic.
For ST, tests are designed based on how account holders can apply for a line
of credit on their checking accounts.
For SIT, tests are designed based on how the system uses an external micro
service to check an account holder’s credit score.
For UAT, tests are designed based on how the banker handles approving or
declining a credit application.
2.3.5 Test Types and Test Levels (Cont..)
Example: Banking Application
For CT, performance tests are designed to evaluate the number of CPU
cycles required to perform a complex total interest calculation
For CIT, security tests are designed for buffer overflow vulnerabilities due to
data passed from the user interface to the business logic.
For ST, portability tests are designed to check whether the presentation layer
works on all supported browsers and mobile devices.
For SIT, reliability tests are designed to evaluate system robustness if the
credit score micro service fails to respond.
For UAT, usability tests are designed to evaluate the accessibility of the
banker’s credit processing interface for people with disabilities.
2.3.5 Test Types and Test Levels (Cont..)
Example: Banking Application
For CT, performance tests are designed to achieve complete statement and
decision coverage for all components that perform financial calculations.
For CIT, security tests are designed to exercise how each screen in the
browser interface passes data to the next screen and to the business logic.
For ST, tests are designed to cover sequences of web pages that can occur
during a credit line application.
For SIT, tests are designed to exercise all possible inquiry types sent to the
credit score microservice.
For UAT, tests are designed to cover all supported financial data file
structures and value ranges for bank-to-bank transfers.
2.3.5 Test Types and Test Levels (Cont..)
Example: Banking Application
For CT, automated regression tests are built for each component and
included within the continuous integration framework.
For ST, all tests for a given workflow are re-executed if any screen on that
workflow changes.
For SIT, tests of the application interacting with the credit scoring micro
service are re-executed daily as part of continuous deployment of that micro
service.
For UAT, all previously-failed tests are re-executed after a defect found in
acceptance testing is fixed.
2.4 Maintenance Testing
Pre Condition
Environmental and state which must be fulfilled before the component/unit can be
executed with a particular input value.
Test Analysis
is a process for deriving test information by viewing the Test Basis
For testing, test basis is used to derive what could be tested
Test basis includes whatever the test are based on such as System
Requirement
A Technical specification
The code itself (for structural testing)
A business process
Test Condition
It is a set of rules under which a tester will determine if a requirement is partially or
fully satisfied
One test condition will have multiple test cases
Test Case Terminologies (cont.)
Test Scenario
It is an end-to-end flow of a combination of test conditions & test cases integrated in a
logical sequence, covering a business processes
This clearly states what needs to be tested
One test condition will have multiple test cases
Test Procedure (Test Steps)
A detailed description of steps to execute the test
Test Data/Input
Inputs & its combinations/variables used
Expected Output
This is the expected output for any test case or any scenario
Actual Output
This is the actual result which occurs after executing the test case
Test Result/Status
Pass / Fail – If the program works as given in the specification, it is said to Pass
otherwise Fail.
Failed test cases may lead to code rework
Other Terminologies
Test Cycle – A test cycle consists of a series of test suites which comprises a
complete execution set from the initial setup to the test environment
through reporting and clean up.
E.g. Integration test cycle / regression test cycle
A good Test Case
The test data may be any kind of input to application, any kind of file that is
loaded by the application or entries read from the database tables. It may be
in any format like xml test data, stand alone variables, SQL test data etc.
Properties of Good Test Data
Exceptional data
E.g. There may be few students who are physically handicapped must also be
considered for attempting the exam
Summary
D. Documentation testing
E. Performance testing
F. Usability testing
Review Question: Match the Following
A. Driving
1. Economics of
limiting
B. Exhaustive testing
2. Testing
C. Limiting
3. A good test case
D. Test cycle
4. Use every possible
input condition as
a test case E. Comparing outputs
with specified or intended