Testing - BeKnowledge

lumpysteerΛογισμικό & κατασκευή λογ/κού

2 Δεκ 2013 (πριν από 3 χρόνια και 10 μήνες)

83 εμφανίσεις

Software Testing

Knowledge Level:

Basic

2

©Copyright 2004, Cognizant Academy, All Rights Reserved

Courseware Metadata

Created By:

Testing Services, Cognizant

Credential
Information:

Testing Team

Version and
Date:

1.0

3

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

4

©Copyright 2004, Cognizant Academy, All Rights Reserved

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 lifecycle

3. Testing techniques

4. Types of testing




2. Black box Vs White box testing

1. Black box testing

2. White box testing

3. Black box Vs White box







5

©Copyright 2004, Cognizant Academy, All Rights Reserved

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













6

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.



7

©Copyright 2004, Cognizant Academy, All Rights Reserved

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 ?


8

©Copyright 2004, Cognizant Academy, All Rights Reserved

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
’79

A
“DESTRUCTIVE”,
yet creative process


Testing is the measure of software quality”, Hetzel ‘85



9

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.

10

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

11

©Copyright 2004, Cognizant Academy, All Rights Reserved

Source of Defects

56%
27%
7%
10%
Requirements

Design

Code

Other

Source: “Software Testing in the Real World”

-

Edward Kit, 1995

12

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

13

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

14

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

tests

Run

tests

15

©Copyright 2004, Cognizant Academy, All Rights Reserved

Definitions

Bug/Defect

Deviation from specification or standard

Validation

The test phase of the life cycle which ensures that the end product
meets the user’s needs.

Verification

All QC activities through out the life cycle that ensure that interim
deliverables meet their input specification

16

©Copyright 2004, Cognizant Academy, All Rights Reserved

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?

17

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.


18

©Copyright 2004, Cognizant Academy, All Rights Reserved

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?






19

©Copyright 2004, Cognizant Academy, All Rights Reserved

Validation methods

Black

box methods for function
-
based tests


Equivalence partitioning


Boundary
-
value analysis


Error guessing.



20

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

21

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

22

©Copyright 2004, Cognizant Academy, All Rights Reserved

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


23

©Copyright 2004, Cognizant Academy, All Rights Reserved

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


24

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.



25

©Copyright 2004, Cognizant Academy, All Rights Reserved

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




26

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.

27

©Copyright 2004, Cognizant Academy, All Rights Reserved

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?

28

©Copyright 2004, Cognizant Academy, All Rights Reserved

Error guessing


Its an adhoc approach, based on intuition and experience, to identify tests
that are considered likely to expose errors.

29

©Copyright 2004, Cognizant Academy, All Rights Reserved

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




30

©Copyright 2004, Cognizant Academy, All Rights Reserved

2.2 White box testing contd….

White box testing is to


Derive 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 Testing



Code


High level Design Document


Low level Design Document


Software Requirement Specification

31

©Copyright 2004, Cognizant Academy, All Rights Reserved

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


32

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.

33

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.

34

©Copyright 2004, Cognizant Academy, All Rights Reserved

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


35

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

36

©Copyright 2004, Cognizant Academy, All Rights Reserved

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



37

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.

38

©Copyright 2004, Cognizant Academy, All Rights Reserved

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?



39

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

40

©Copyright 2004, Cognizant Academy, All Rights Reserved

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


41

©Copyright 2004, Cognizant Academy, All Rights Reserved

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




42

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.



43

©Copyright 2004, Cognizant Academy, All Rights Reserved

4.2 Integration testing contd..


Integration testing techniques


Top
-
Down Integration


Bottom
-
up Integration


Big
-
bang Integration




44

©Copyright 2004, Cognizant Academy, All Rights Reserved

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



45

©Copyright 2004, Cognizant Academy, All Rights Reserved

4.2 Integration testing contd..

Top Down Integration Testing

Fig 1

46

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.




47

©Copyright 2004, Cognizant Academy, All Rights Reserved

4.2 Integration testing contd..

Bottom Up Integration

Fig 2

48

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

49

©Copyright 2004, Cognizant Academy, All Rights Reserved

4.2 Integration testing contd..

Fig 3

Module 1

System

Module 2

Module 6

Module 5

Module 3

Module 4

Big Bang Integration Testing

Module 3

Module 5

50

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

51

©Copyright 2004, Cognizant Academy, All Rights Reserved

4.3 System testing contd…

Covers testing of the integrated system for


Business functionality


Performance and Scalability


Usability


Reliability


Portability


Installation


Disaster Recovery

52

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.



53

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

54

©Copyright 2004, Cognizant Academy, All Rights Reserved

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

55

©Copyright 2004, Cognizant Academy, All Rights Reserved

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




56

©Copyright 2004, Cognizant Academy, All Rights Reserved

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.



57

©Copyright 2004, Cognizant Academy, All Rights Reserved

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 YOU