Вы находитесь на странице: 1из 24

Software Testing

Principles and Practices

By,
CELINE INIGO.F,
ASSISTANT PROFESSOR,
DEPARTMENT OF COMPUTER SCIENCE,
PARVATHY’S ARTS AND SCIENCE COLLGE,DINDIGUL.
Principles of Testing
 Context of Testing in Producing Software – encompassing all activities
that address in implications of producing quality products.
 The Incomplete Car
 Dijkstra’s Doctrine
 A test in time
 The Cat and the saint
 Test the tests first
 The Pesticide paradox
 The Convoy and the Rags
 The Policemen on the Bridge
 The Ends of the Pendulum
 Men in Black
 Automation Syndrome.
Software Development Life Cycle Models
 Phases of Software Project –
i. Requirements gathering and analysis
ii. Planning
iii. Design
iv. Development or Coding
v. Testing
vi. Deployment and Maintenance
 Quality, Quality Assurance, and Quality Control
Quality – It is meeting the requirements expected of the software,
consistently and predictably.
i. Expected Behavior
ii. Actual Behavior
 Quality Control - to build a product , test it for expected behavior after it is
built.
 Quality Assurance – attempts to defect prevention by concentrating on the
process

Quality Assurance Quality Control

Concentrates on the process of Concentrates on the specific


producing the products products

Defect-prevention oriented Defect-detection and correction


oriented

Usually done throughout the life Usually done after the product is
cycle built

This is usually a staff function This is usually a line function

Examples: reviews and audits Examples: software testing at


various levels
Testing, Verification and Validation
 Testing that follows coding and precedes deployment
 Verification – evaluating a system of component to determine whether the
products of a given phase satisfy the conditions imposed at the start at that
phase.
 Validation – evaluating a system or component during or at the end of the
development process to determine whether it satisfies specified
requirements.

Quality Assurance = Verification


Quality Control = Validation Testing
Process Model to Represent Different Phases
Life Cycle Models
 Waterfall Model
 Prototyping and Rapid Application Development Models
 Spiral or Iterative Model
 The V Model
 Modified V Model
 Comparison of Various Life Cycle Models
Waterfall Model
 A project is divided into set of phases
 A project starts with Initial phase, and upon completion of the phase moves
to the next phase.
 Overall business requirements, software requirements gathering, planning,
high-level design, low-level design, coding and testing.
 At the end of the requirements gathering phase a System Requirement
Specification Document is produced.
 At the end of Detailed Design a System Design Description document is
produced
 Taking SDD as a input the next phase which means the implementation
phase has been developed.
Spiral Model
Vmodel
Modified V model
Types of Testing
 White Box Testing
 Black Box Testing
 Integration Testing
 System and Acceptance Testing
 Performance Testing
 Regression Testing
White Box Testing
 WHITE BOX TESTING (also known as Clear Box Testing, Open Box
Testing, Glass Box Testing, Transparent Box Testing, Code-Based Testing
or Structural Testing) is a software testing method in which the internal
structure/design/implementation of the item being tested is known to the
tester.
 The tester chooses inputs to exercise paths through the code and determines
the appropriate outputs.
 Programming know-how and the implementation knowledge is essential.
White box testing is testing beyond the user interface and into the nitty-
gritty of a system.
(a) White Box Testing
Static Testing
 Static testing is a software testing method that involves examination of the
program's code and its associated documentation but does not require the
program be executed. Dynamic testing, the other main category of
software testing methods, involves interaction with the program while it
runs.
 The two methods are frequently used together to try to ensure the
functionality of a program.
 Static testing may be conducted manually or through the use of various
software testing tools. Specific types of static software testing include code
analysis, inspection, code reviews and walkthroughs.
Static Testing By Humans
 Desk Checking
 Code walkthrough
 Formal Inspection
 Combining various methods
Structural Testing
 Unit/Code Functional Testing
 Code Coverage Testing
1. Statement Coverage
2. Path coverage
3. condition coverage
4. Function coverage
5. summary
 Code Complexity testing
1. Calculating and using cyclomatic complexity
Challenges in White Box Testing
 Human tendency of a developer being unable to find the defects in his or
her code
 Fully tested code may not correspond to realistic scenarios
Black Box Testing
 Black Box Testing is done without the knowledge of the internals of the
system under test

Functionality What expected outcomeyou need to know


to use
Feature of a lock It is made of metal, has a hole provision to lock,
has a facility to insert the key and the keyhole
ability to turn clockwise or anticlockwise
Feature of a key It is made of metal and created to fit into a
particular lock’s keyhole
Actions performed Key inserted and turned clockwise to lock
Key inserted and turned anticlockwise to unlock
States Locked
Unlocked
Inputs Key turned clockwise or anticlockwise

Expected outcome Locking


Unlocking
Why Black Box Testing
 Black Box testing is done based on requirements
 Black box testing addresses the stated requirements as well as implied
requirements
 Black box testing encompasses the end user perspectives
 Black box testing handles valid and invalid inputs
How to do Black Box Testing
 Requirements based testing
 Positive and negative testing
 Boundary value analysis
 Decision tables
 Equivalence partitioning
 state based testing
 Compatibility testing
 User documentation testing
 Domain testing
Requirements based Testing
 it deals with validating the requirements given in the SRS of the software
system.

Вам также может понравиться