software testing knowledge level: basic. 2 ©copyright 2004, cognizant academy, all rights reserved...
TRANSCRIPT
Software TestingSoftware TestingSoftware TestingSoftware Testing
Knowledge Level:Knowledge Level:
BasicBasic
©Copyright 2004, Cognizant Academy, All Rights Reserved 2
Courseware Metadata
Created By: Testing Services, Cognizant
Credential Information:
Testing Team
Version and Date:
1.0
©Copyright 2004, Cognizant Academy, All Rights Reserved 3
Courseware Information
Course Description
This course is to learn about software testing, its importance,lifecycle,types and levels of testing,test artifacts,defect management,test automation,a sample automation tool, performance testing and TCP.
Prerequisites
Target Audience
©Copyright 2004, Cognizant Academy, All Rights Reserved 4
Course Objective & Outline
Course Objective:After completing this course, you will be able to know about software testing, its evolution,
lifecycle, types and levels of testing, testing techniques,test plan, test strategy, test cases, functional and performance testing, defect management , about test automation, a sample test automation tool and about Test Case Point analysis.
Course Outline:1. Introduction to software testing
1. What is software testing?2. Testing lifecycle3. Testing techniques 4. Types of testing
2. Black box Vs White box testing1. Black box testing2. White box testing3. Black box Vs White box
©Copyright 2004, Cognizant Academy, All Rights Reserved 5
Course Objective & Outline
Course Outline contd….3. Other testing types
1.GUI testing
2.Regression testing
3.Acceptance testing
4.Configuration testing and Installation testing
5.Alpha testing and Beta testing
4. Levels of testing
1.Unit testing
2. Integration testing
3. System testing
©Copyright 2004, Cognizant Academy, All Rights Reserved 6
1.0 Introduction to Software Testing : Overview
Introduction:
In this module let’s see what is software testing ,its process and lifecycle, types of testing and techniques of testing.
Objective:
After completing this module, you will be able to know what is software testing, its evolution, lifecycle and testing techniques.
©Copyright 2004, Cognizant Academy, All Rights Reserved 7
1.1What is Software testing?: Overview
Testing – What Is it ???
A process of demonstrating that errors are not present ?
OR
A way of establishing confidence that a program does what it is supposed to do ?
OR
A means of achieving an error-free program by finding all errors ?
©Copyright 2004, Cognizant Academy, All Rights Reserved 8
1.1What is Software testing? Contd..
What is software testing?
The process of executing computer software in order to determine whether the results it produces are correct”, Glass ‘79“The process of executing a program with the intent of finding errors”, Myers ’79A “DESTRUCTIVE”, yet creative process
Testing is the measure of software quality”, Hetzel ‘85
©Copyright 2004, Cognizant Academy, All Rights Reserved 9
1.1What is Software testing ?contd..
Why Testing? Verifies that all requirements are implemented correctly (both for
positive and negative conditions) Identifies defects before software deployment Helps improve quality and reliability. Makes software predictable in behavior. Reduces incompatibility and interoperability issues. Helps marketability and retention of customers.
©Copyright 2004, Cognizant Academy, All Rights Reserved 10
Quality Control VS
Quality Assurance
Quality Control : Mechanism to ensure that the required quality characteristics exist in the finished product
Quality Assurance : Ensures that the quality management procedures work
©Copyright 2004, Cognizant Academy, All Rights Reserved 11
Source of Defects
56%27%
7%10%
RequirementsDesign
CodeOther
Source: “Software Testing in the Real World”
- Edward Kit, 1995
©Copyright 2004, Cognizant Academy, All Rights Reserved 12
1.2 Testing lifecycle
Development Lifecycle
Project Planning
Requirements Capture
Implementation
Build 0 Build 1 Build 2
Test Lifecycle
Plan Test
Analysis & Design
Design Test
Setup Test Bed
Execute Test
Evaluate Test
Defect Tracking/Enhancement Request
©Copyright 2004, Cognizant Academy, All Rights Reserved 13
1.2 Testing lifecycle contd…
Requirements Capture
Analysis
Test planning & Scenario Design
Test Case Development
Test Execution
Test Result Analysis
Test Cycle Closure
Defect Fixing Cycle
Defects
New Version
The Scenarios Design and the Test Case Development could normally start in parallel with the Development Cycle.Test Execution Synchs up with the Development Cycle during the functional Testing Phases
©Copyright 2004, Cognizant Academy, All Rights Reserved 14
Testing in the V Model Approach
Verification Validation
Requirements
(Business Needs)
Requirements
(Business Functions)
Design
Code
Acceptance Testing
System Testing
Integration Testing
Unit Testing
Write
testsRun
tests
©Copyright 2004, Cognizant Academy, All Rights Reserved 15
Definitions
Bug/DefectDeviation from specification or standard
ValidationThe test phase of the life cycle which ensures that the end product meets the user’s needs.
VerificationAll QC activities through out the life cycle that ensure that interim deliverables meet their input specification
©Copyright 2004, Cognizant Academy, All Rights Reserved 16
Verification
• Verification refers to the set of activities that ensure that software correctly implements a specific function, imposed at the start of that phase
• Are we building the product right?
• WHAT?
©Copyright 2004, Cognizant Academy, All Rights Reserved 17
The considerations in verification planning
• The verification activity to be performed;
• The methods used(inspection, walkthrough, etc.);
• The specific areas of the work product that will and will not be verified;
• The risks associated with any areas that will not be verified;
• Prioritizing the areas of the work product to be verified;
• Resources, schedule, facilities, tools, and responsibilities.
©Copyright 2004, Cognizant Academy, All Rights Reserved 18
Validation
• Validation refers to a different set of activities that the software that has been built is traceable to customer requirements
• Are we building the right product?
• HOW?
©Copyright 2004, Cognizant Academy, All Rights Reserved 19
Validation methods
Black –box methods for function-based tests
• Equivalence partitioning
• Boundary-value analysis
• Error guessing.
©Copyright 2004, Cognizant Academy, All Rights Reserved 20
Structural Vs Functional Testing
Structural analysis based testing tend to uncover the errors that occur during “coding” of the program
Functional analysis based tests tend to uncover error that occur in implementing requirements or design specifications
©Copyright 2004, Cognizant Academy, All Rights Reserved 21
1.3 : Testing techniques
static: don’t execute the program code inspection or “walk through” symbolic execution symbolic verification
dynamic: generate test data and execute the program White-box/Glass-box Testing
• Unit Testing
• Integration/Interface Testing Black-box Testing
• System Testing
• Acceptance testing
©Copyright 2004, Cognizant Academy, All Rights Reserved 22
1.3 : Testing techniques contd..
Static Testing Advantages
• Capture defects early, so saves rework cost
• Checklist-based approach
• Focuses on coverage
• Group perspective
• Highest probability of finding defects
Disadvantages• Time-consuming
• Cannot test data dependencies
• High skill levels required
©Copyright 2004, Cognizant Academy, All Rights Reserved 23
1.4 Types of testing: Overview
Types of Testing• Black Box Testing
• White Box Testing
• Grey Box Testing
Levels of Testing Unit Testing Integration Testing System Testing Acceptance Testing Regression Testing
©Copyright 2004, Cognizant Academy, All Rights Reserved 24
2.0 Black box Vs White box testing : Overview
Introduction:
This module discusses about the black box and white box testing and their testing techniques.
Objective:
After completing this module, you will be able to know what is white box and black box testing and the difference between them.
©Copyright 2004, Cognizant Academy, All Rights Reserved 25
2.1 Black box testing: Overview
a.k.a Functionality Testing or Data-driven Testing A system or component whose inputs, outputs and general functions
are known, but whose contents or implementation are unknown or irrelevant
Black box testing techniques
Equivalence partitioning
Boundary value analysis
©Copyright 2004, Cognizant Academy, All Rights Reserved 26
Identifying equivalence classes
For each external input:
1. If the input specifies a range of valid values, define one valid EC (within the range) and two invalid EC’s(one outside each end of the range).
2. If the input specifies the number(N) of valid values, define one valid EC and two invalid EC’s(none, and more than N).
3. If the input specifies a set of valid values, define one valid EC(within the set) and one invalid EC (outside the set).
4. If there is a reason to believe that the program handles each valid input differently, then define one valid EC per valid input.
5. If the input specifies a “must be” situation, define one valid EC and one invalid EC.
6. If there is a reason to believe that elements in an EC are not handled in an identical manner by the program, subdivide the EC into smaller EC’s.
©Copyright 2004, Cognizant Academy, All Rights Reserved 27
Boundary-value analysis
• It is a variant and refinement of equivalence partitioning , with two major differences:1. Rather than selecting any element in an EC as being representative, elements are
selected such that edge of the EC is the subject of a test. These are always a good place to look for defects.
2. Rather than focusing exclusively on input conditions, output conditions are also explored by defining output EC’s. What can be output? What are the classes of output? What should I create as an input to force a useful set of classes that represent the outputs that ought to be produced?
©Copyright 2004, Cognizant Academy, All Rights Reserved 28
Error guessing
• Its an adhoc approach, based on intuition and experience, to identify tests that are considered likely to expose errors.
©Copyright 2004, Cognizant Academy, All Rights Reserved 29
2.2 White box testing: Overview
a.k.a Structural Testing or Logic-driven Testing or Glass Box Testing
Source Code is available for Testing
Structural Testing process Program Logic-driven Testing Design-based Testing Examines the internal structure of program
White box testing techniques
Basis path testing Cyclomatic complexity
©Copyright 2004, Cognizant Academy, All Rights Reserved 30
2.2 White box testing contd….
White box testing is toDerive test cases: based on the program structure. to guarantee that all the independent paths within a
program module have been tested.
Minimum Criteria for White Box TestingMinimum Criteria for White Box Testing
Code High level Design Document Low level Design Document Software Requirement Specification
©Copyright 2004, Cognizant Academy, All Rights Reserved 31
2.3 White box Vs Black box: Overview
Black box testing White box testing
Black Box testing is planned without the intimate knowledge of the program
White Box testing is planned with the intimate knowledge of the program
Black Box test is usually based on specification of the program
White Box testing aims at testing each aspect of the program logic
©Copyright 2004, Cognizant Academy, All Rights Reserved 32
3.0 Other testing types: Overview
Introduction:
This module discusses about the other testing types like GUI testing, regression testing, configuration testing,alpha and beta testing.
Objective:
After completing this module, you will be able to what is GUI testing, regression testing, configuration testing,alpha and beta testing.
©Copyright 2004, Cognizant Academy, All Rights Reserved 33
3.1 GUI testing: Overview
GUI testing GUI is the abbreviation for Graphic User Interface. It is absolutely essential that
any application has to be user-friendly. The end user should be comfortable while using all the components on screen and the components should also perform their functionality with utmost clarity. Hence it becomes very essential to test the GUI components of any application. GUI Testing can refer to just ensuring that the look-and-feel of the application is acceptable to the user, or it can refer to testing the functionality of each and every component involved.
©Copyright 2004, Cognizant Academy, All Rights Reserved 34
3.2 Regression testing: Overview
Regression testing Re-execution of one or more tests in subsequent build of the
application/product to ensure
• Revisiting and testing all prior bug-fixes in response to a new fix/enhancement
• Re-testing all programs that might be affected by the fix/enhancement
• Hidden Bugs are uncovered The baseline for Regression Testing grows with every build
©Copyright 2004, Cognizant Academy, All Rights Reserved 35
3.3 Acceptance testing
Acceptance testing Demonstrates that the system meets mutually agreed Acceptance criteria
• Critical Requirements
• Minimum Performance level
• Maximum Defect Detection Rate
Typically, a sub-set of System testing
©Copyright 2004, Cognizant Academy, All Rights Reserved 36
3.4 Configuration and Installation testing
Configuration testing Hardware Compatibility Platform (OS) compatibility Inter-product (software) compatibility Network configuration Database compatibility
Installation testing Basic installation Installation of various configurations Installation on various platforms Regression testing of basic functionality
©Copyright 2004, Cognizant Academy, All Rights Reserved 37
3.5 Alpha and Beta testing: Overview
Alpha Testing: Testing of a software product or system conducted at the developer’s site by the customer
Beta Testing: Testing conducted at one or more customer sites by the end user of a delivered software product system.
©Copyright 2004, Cognizant Academy, All Rights Reserved 38
4.0 Levels of testing : Overview
Introduction:
This module is about unit ,integration and system testing.
Objective:
After completing this module, you will be able to know what is unit,integration and system testing?
©Copyright 2004, Cognizant Academy, All Rights Reserved 39
4.1 Unit testing: Overview
Unit Testing Lowest Level of Testing Individual unit of the software are tested in isolation from
other parts of a program
What can be a UNIT? Screen / Program Back-end related to a Screen Screen + back end
©Copyright 2004, Cognizant Academy, All Rights Reserved 40
4.1 Unit testing contd…
Unit testing activities
1.Field Level Checks Null / Not Null Checks Uniqueness Checks Length Checks Date field Checks Numeric Checks Negative Checks Default Display
2.Field Level Validation To Test all Validations for an input field Date Range Checks Date Check validation with the system date
©Copyright 2004, Cognizant Academy, All Rights Reserved 41
4.1 Unit testing contd…
User Interface Checks• Readability of the controls
• Tool Tips Validations
• Ease of usage of interface across
• Consistency with the user interface across the product
• User Interface dialogs
• Tab related checks for screen controls
Functionality Checks• Screen Functionality
• Referential Integrity Checks
• Field Dependencies
©Copyright 2004, Cognizant Academy, All Rights Reserved 42
4.2 Integration testing: Overview
Integration Testing
Intermediate level of testing Progressively unit tested software components are integrated and tested
until the software works as a whole Test that evaluate the interaction and consistency of interacting
components.
©Copyright 2004, Cognizant Academy, All Rights Reserved 43
4.2 Integration testing contd..
Integration testing techniques Top-Down Integration Bottom-up Integration Big-bang Integration
©Copyright 2004, Cognizant Academy, All Rights Reserved 44
4.2 Integration testing contd..
Integration testing techniques
1. Top Down Integration Testing• Program merged and tested from the top to the bottom
• Modules are integrated by moving downward through the control hierarchy, beginning with the main control module Ref fig 1
• Modules subordinate to the main control module are incorporated into the structure in either a depth-first or breadth-first manner.
Advantages• Integrated Testing is done in an environment that closely resembles that of the
reality, so the tested product is more reliable
• Stubs are functionally simpler than drivers, and therefore they can be written with less time and labor
Disadvantages
• Core functionality tested late in the cycle
©Copyright 2004, Cognizant Academy, All Rights Reserved 45
4.2 Integration testing contd..
Top Down Integration Testing
Fig 1
©Copyright 2004, Cognizant Academy, All Rights Reserved 46
4.2 Integration testing contd..
2.Bottom Up Integration• Begins construction and testing with atomic modules (i.e., modules at the
lowest levels in the program structure.• Program is merged and tested from the bottom to top.• The terminal module is tested in isolation first, then the next set of higher level
modules are tested with the previously tested lower modules. Ref Fig 2.
Advantages• Many Programming and testing operations can be carried out simultaneously,
yielding apparent improvement in Software Development effectiveness• Unit Testing of each module can be done very thoroughly
Disadvantages• Key Interface defects trapped late in the cycle• Test drivers have to be generated for modules at all levels except the top
controlling one • We cannot test the program in the actual environment in which it will be run.
©Copyright 2004, Cognizant Academy, All Rights Reserved 47
4.2 Integration testing contd..
Bottom Up Integration
Fig 2
©Copyright 2004, Cognizant Academy, All Rights Reserved 48
4.2 Integration testing contd..
3.Big Bang Testing
A type of integration testing in which software components of an application are combined all at once into a overall system.
According to this approach, every module is first unit tested in isolation from every module. After each module is tested, all of the module are integrated together at once. Ref Fig 3
©Copyright 2004, Cognizant Academy, All Rights Reserved 49
4.2 Integration testing contd..
Fig 3
Module 1
System
Module 2Module 6
Module 5 Module 3
Module 4
Big Bang Integration Testing
Module 3Module 5
©Copyright 2004, Cognizant Academy, All Rights Reserved 50
4.3 System testing: Overview
A Black-box Testing technique Specifications-based Testing Typically independent team testing Simulated environment testing Live/Simulated user data Tests the whole system Functional and non-functional requirements tested Business transaction-driven testing Compatibility errors uncovered Performance limitations uncovered
©Copyright 2004, Cognizant Academy, All Rights Reserved 51
4.3 System testing contd…
Covers testing of the integrated system for Business functionality Performance and Scalability Usability Reliability Portability Installation Disaster Recovery
©Copyright 2004, Cognizant Academy, All Rights Reserved 52
5.0 Test artifacts : Overview
Introduction:
This module discusses about the test strategy,test plan and test cases.
Objective:
After completing this module, you will be able to know what is a test plan,test strategy and test case.
©Copyright 2004, Cognizant Academy, All Rights Reserved 53
5.1 Test strategy/planning: Overview
Includes Testing Objectives and Goals Test Strategy/Approach based on customer priorities Test Environment (Hardware, Software, Network, Communication etc.) Features to test with priority/criticality Test Deliverables Test Procedure – Activities and tools Test Entry and Exit criteria Test Organization and Scheduling Testing Resources and Infrastructure Test Measurements/Metrics
©Copyright 2004, Cognizant Academy, All Rights Reserved 54
5.1 Test strategy/planning contd..
Benefits Sets clear and common objectives Helps prioritize tests Facilitates Technical tasks Helps improve coverage Provides structure to activities Improves communication Streamlines tasks, roles and responsibilities Improves test efficiency Improves test measurability
©Copyright 2004, Cognizant Academy, All Rights Reserved 55
5.2 Test case: Overview
What is a test case? A set of test inputs, execution conditions and expected results Reflects what tests need to be performed Identifies the data needed for testing Specifies pre-conditions, post conditions and acceptance/pass criteria Provides a means to verify system use cases and other requirements Helps determine test coverage
What is a “good” test case? Has a reasonable probability of catching an as-yet undiscovered error Is sequential with the program/business flow Is not redundant Is neither too simple nor too complex Also tests the invalid and unexpected. Systematically uncovers different classes of errors with minimum (optimum)
effort and time
©Copyright 2004, Cognizant Academy, All Rights Reserved 56
10.0 TCP : Overview
Introduction:
This module is about TCP.
Objective:
After completing this module, you will be able to what is TCP and its usage.
©Copyright 2004, Cognizant Academy, All Rights Reserved 57
10.1 What is TCP?: Overview
What is a Test Case Point (TCP?
TCP is a measure of estimating the complexity of an application. This is also used as an estimation technique to calculate the size and effort of a testing project.
The TCP counts are nothing but ranking the requirements and the test cases that are to be written for those requirements into simple, average and complex and quantifying the same into a measure of complexity.
THANK YOUTHANK YOUTHANK YOUTHANK YOU