Testing Fundamentals
Testing Fundamentals
x
Targeted at: Entry Level Trainees
2
Icons Used
Hands-on
Questions Tools Exercise
A Welcome
Try it Out Contacts
Break
3
Session 01: Testing Fundamentals
overview
Introduction:
» Testing is an integral part of the system
development function; testing starts with the
requirements, not the code
» Testing can only establish that the system does not
function properly under specific conditions
» Testing can never completely establish the
correctness of the system software
» In this chapter, associates would know the answers
of what is software testing and why it is important
4
Session 01- Testing Fundamentals:
Objective
Objective:
After completing this chapter, associates will be able to:
» Define the role of software testing
» Describe why faults should be found early
» Explain unit testing
» Know why unit testing alone is not important
» List the five flavors of software testing
5
Testing objectives
6
Testing in Development Cycle
CODE
TEST RUN
7
Finding faults early
8
Unit Testing
A unit test examines the behavior of a distinct unit of
work
Unit of work is a task that is not directly dependent on
the completion of any other task
Unit tests should be fine grained, testing small numbers
of closely-related methods and classes
Unit tests focus on testing whether a method is
following the terms of its API+ contract
API+: Application Programming Interface - a formal
agreement between the caller and the called
9
Writing Unit Tests
10
Unit testing
11
Five flavors of Software Testing
12
Allow time for questions from participants
13
Test Your Understanding
14
Testing Fundamentals Session 1 :
Summary
Testing is an integral part of the system
development function; testing starts with the
requirements, not the code
Testing is a process of executing a program
with the intent of finding an error
A good test case is one that has a high
probability of finding an undiscovered error
A unit test examines the behavior of a distinct
unit of work
15
Testing Fundamentals Session 1 :
Summary (Contd..)
Unit testing alone is not sufficient as the
application needs to be examined for:
» Interaction between components
» Compliance with the software requirements
specification
» Performance
» Meeting the customer’s goals
16
Testing Fundamentals Session 1:
Source
Book:
» JUnit in Action by Vincent Massol; Ted Husted
Web:
» Wiki: http://en.wikipedia.org/wiki/Software_testing
Disclaimer: Parts of the content of this course is based on the materials available from the Web sites and
books listed above. The materials that can be accessed from linked sites are not maintained by
Cognizant Academy and we are not responsible for the contents thereof. All trademarks, service marks,
and trade names in this course are the marks of the respective owner(s).
17
You have completed
the Session 1
Testing Fundamentals