You are on page 1of 30

LECTURE # 7

SOFTWARE TESTING &


DEFECT LIFE CYCLE
Today’s Plan
 Introduction to Software Testing Life Cycle (STLC)
 Defect Life Cycle
 Class Activity
Software Testing Life Cycle
AKA STLC
Software Testing Life Cycle
 STLC (Software Testing Life Cycle) is an integral
component of SDLC.
 STLC identifies what test activities to carry out and
when (what is the best time) to accomplish those test
activities.
 Even though testing differs between organizations,
there is a testing life cycle.
Software Testing Life Cycle
Software Testing Life Cycle
 There are following six major phases in every
Software Testing Life Cycle Model (STLC Model):
 Requirement Analysis
 Test Planning
 Test case development
 Test Environment setup
 Test Execution
 Test Cycle closure
 Each of these stages has a definite entry and exit
criteria, activities & deliverables associated with it.
STLC – Requirement Analysis
 Also known as Requirement Phase Testing.
 Test team studies the requirements from a testing point
of view to identify testable requirements and the QA
team may interact with various stakeholders to
understand requirements in detail. 
STLC – Test Planning
 As part of a project, testing must be planned to ensure
it delivers on its expected outcomes.
 It must be completed within a reasonable time and
budget.
 The aim of test planning is to decide where the bugs
in a product or system will be and then to design tests
to locate them.
STLC – Test Planning
 A test plan:  A test plan includes:
 covers all types and phases  test objectives
of testing  Schedule and
 guides the entire testing logistics
process
 test strategies
 test cases
 who, why, when, what
 procedure
 developed as requirements,  data
functional specification, and  expected result
high-level design are  Procedures for
developed handling the
 should be done before problems
implementation starts
STLC – Test Planning
 The purpose of test planning therefore is to put
together a plan which will deliver the right tests, in
the right order, to discover as many of the issues
with the software as time and budget allow.
 At the start of testing there will be a (relatively) large
number of issues and these can be uncovered with
little effort.
 Test cases are prepared with the consultation of
Software Requirements and Design specification.
Test Plan versus Test Strategy
STLC – Test Case Development
 Involves the creation, verification and rework of
test cases & test scripts after the test plan is ready.
 Initially, the test data is identified then created and
reviewed and then reworked based on the
preconditions.
 Then the QA team starts the development process
of test cases for individual units.
Test Case Template - Sample
Test Case Designing – Best
practices
 Best practice is to develop at least two test cases for
each requirement for test:
 A test case to demonstrate the requirement has been
achieved, often referred to as a positive test case.
 Another test case, reflecting an unacceptable, abnormal,
or unexpected condition or data, to demonstrate that the
requirement is only achieved under the desired condition,
referred to as a negative test cases.
CLASS
ACTIVITY
Writing Test Cases
Class Activity – Writing Test
Cases
Requirement # 2.1

The screen should have a text box having its label


“Cellular”. This text box should not allow user to
enter
alpha and special characters. Also user should not be
able to enter more than 11 digits and input of less than
11 digits should prompt/generate an error message”.
Sample Test Cases
 You may come up with many other cases. Few are
written below:
1. To test that a text box is available on the screen with label
‘Cellular’
2. To test that spelling of label is correct.
3. To test that the text box should be editable and enable by
default.
4. To validate that system should not allow user to enter
alphanumeric data in text box.
5. To validate that system should not allow user to enter special
characters in text box.
Sample Test Cases
6. To validate that system should not allow user to enter more
than 11 digits data.
7. To validate that system should not allow user to submit data
having length less than 11 digits.
8. To validate the error message’s text; which appears when
user attempts to submit data in Cellular field with less than
11 digits.
9. To test that system should accept the valid data i.e. numeric
having length of 11 digits.
10. To test the appearance of the data in Cellular text box i.e. the
entered data should be displayed completely in the text box.
STLC – Test Environment Setup
 It decides the software and hardware conditions
under which a work product is tested.
 It is one of the critical aspects of the testing process
and can be done in parallel with the Test Case
Development Phase.
 Test team may not be involved in this activity if the
development team provides the test environment.
 The test team is required to do a readiness check
(smoke testing) of the given environment.
STLC – Test Execution
 The systematic execution of the test plan is termed
as Test Execution.
 In this process the actual testing of the software is
performed by executing the test cases.
 Test cases are executed by the testers.
 The results of the test execution are logged for
record.
STLC – Test Execution
 In case if any of the test case is failed (the actual result
is different than the expected result) then a defect is
raised.
 The defect report should contain the following details:
Defect Id, Defect Description, Tested by, tested on,
product version, steps to reproduce the defect, module
in which the defect is detected etc.
STLC – Test Cycle Closure
 This phase is completion of test execution which
involves several activities like test completion
reporting, collection of test completion matrices and
test results.
 Testing team members meet, discuss and analyze
testing artifacts to identify strategies that have to be
implemented in future, taking lessons from current
test cycle.
 The idea is to remove process bottlenecks for future
test cycles.
Software Defect Life Cycle
AKA Bug Life Cycle
Defect

 A defect or a bug is an
error in coding or logic
that causes a program to
malfunction or to
produce incorrect or
unexpected results.
Defect Life Cycle
 In software development process, the bug has a
lifecycle. The bug should go through the life cycle to
be closed.
 A specific life cycle ensures that the process is
standardized.
 The bug attains different states in its lifecycle.
Severity of Defect
 Indicate the impact each defect has on testing efforts
or users and administrators of the application under
test. This information is used by developers and
management as the basis for assigning priority of
work on defects.
 A sample guideline for assignment of priority levels
during the product test phase includes:
 Critical
 High
 Average
 Low
Guidelines for defect reporting
 Be specific. State the expected behavior which did not
occur - such as pop-up does not appear and the
behavior which occurred instead.
 Use present tense.
 Don’t use unnecessary words.
 Don’t add exclamation points! End sentences with a
period.
 DON’T USE ALL CAPS. Format words in upper and
lower case (mixed case).
 Mention steps to reproduce the bug compulsorily.
Defect Report Template - Sample
Class ahead

Defect Life Cycle

You might also like