Introduction To Test Case Design
Introduction To Test Case Design
Introduction To Test Case Design
Designing the test cases is the most challenging assignment of test engineers. Test cases have
to be designed based on two criteria namely, reliability and validity.
o A set of test cases is considered to be reliable if it detects all errors.
o A set of test cases is considered as valid, if at least one test case reveals the errors.
Test engineers challenge lies in uncovering as many defects as possible with minimum
number of test cases.
A test case is a statement that defines what needs to be tested, how it will be tested what is
the precondition for that testing, and what is the expected output from that testing.
Before we can write a test case, we need to think about how we should design the test cases
to make the testing effective.
Test case design techniques play an important role in software testing. Test case design
techniques are standards of test designing that allow the creation of systematic and widely
accepted test cases.
An efficient test case design technique is necessary to improve the quality of the software
testing process. It helps to improve the overall quality and effectiveness of the released
software product.
There are many ways to design test cases.
Test design is a process that describes "how" testing should be done. It includes processes for
identifying test cases by enumerating steps of the defined test conditions.
The test case design techniques are broadly classified into following three categories:
1. The test case design technique based on deriving test cases directly from a specification
or a model of a system or proposed system, known as specification based or black-box
techniques. So black-box techniques are based on an analysis of the test basis
documentation, including both functional and non-functional aspects. They do not use
any information regarding the internal structure of the component or system under test.
Specification-based test case design techniques can be used to design test cases in
a systematic format. These use external features of the software such as technical
specifications, design, client's requirements and more, to derive test cases. With this type
of test case design techniques, testers can develop test cases that save testing time and
allow full test coverage
2. The test case design technique based on deriving test cases directly from the structure of
a component or system, known as structure-based or white-box. techniques. We will
concentrate on tests based on the code written to implement a component or system, but
other aspects of structure, such as a menu structure, can be tested in a similar way.
Structure-based test case design techniques are based on the internal structure of the
software program and code. Developers go into minute details of the developed code and
test them one by one.
3. The test case design technique based on deriving test cases from the tester's experience of
similar systems and general experience of testing, known as experience-based techniques,
Experienced-based techniques are highly dependent on tester's experience to understand
the most important areas of the software. They are based on the skills, knowledge, and
expertise of the people involved.
Identification or finding errors and bugs in a software application is the most challenging
work. Software testing includes the identification of error or bug in a software application.
An error is an incorrect human action that produces an incorrect result. In short, human
mistakes cause error.
Errors are of following types:
1. A syntax error occurs in the source code of a program and prevents the program from
being properly compiled. This type of error is very common and typically occurs when
there are one or more missing or incorrect characters in the code. For example, a single
missing bracket could cause a syntax error.
2. A logic error represents a mistake in the software flow and causes the software to behave
incorrectly. This type of error can cause the program to produce an incorrect output or
even hang or crash. Unlike syntax errors, logic errors will not prevent a program from
compiling. A common logic error is the infinite loop. Due to poorly written code, the
program repeats a sequence endlessly until it crashes.
A software bug is an error, flaw, failure or fault in a computer program or system that causes
it to produce an incorrect or unexpected result in operation or to behave in unintended ways.
Software bug is classified as follows:
1. Functional bugs are associated with the functionality of specific software component.
2. A logical bug disrupts the intended workflow of software and causes it to behave
incorrectly.
The defect leads to failure.
A bug is the alternative name of defects, which says that application or software isn't
functioning as in line with the requirement.
When we have some coding error, program can have breakdown or failure in execution,
which is known as a bug.
When the application is not working as per the requirement, it is knows as defects. It is
specified as the deviation from the actual and expected result of the application or software.
The Bug is the informal name of defects, which means that software or application is not
working as per the requirement.
Software testing is aimed at identifying any bugs, errors, faults or failures (if any) present in
the software.
Bug is defined as, a logical mistake which is caused by a software developer while writing
the software code.
Error is defined as, the measure of deviation of the output given by the software from the
outputs expected by the user.
Fault is defined as, the condition that leads to malfunctioning (caused due to several reasons
such as change in the design, architecture or software code) of the software.
The defect that causes an error in operation or a negative impact is called failure. Failure is
defined as, that state of software under which it is unable to perform functions according to
user requirements.
Bugs, errors, faults and failures prevent software from performing efficiently and hence
cause the software to produce unexpected output.
In software testing, the bug can arise for reasons like Wrong coding, Missing coding and
Extra coding.
Entry Criteria
Entry criteria spell out what must happen to allow a system to move into a particular test
phase. These criteria should address questions such as:
Exit Criteria
Exit criteria address the issue of how to determine when testing has been completed For
example, one exit criterion can be all the planned test cases and regression tests have been
run
Another might be that project management deems your results "OK," by whatever definition
they use to decide such questions.
In the case of system test exit criteria - provided system test is the last test phase on the
project these exit criteria often become the criteria by which the customer-ship or
deployment decision is made.
Example: An example of a business driven set of system test exit criteria for SpeedyWriter is
given below.
System Test for SpeedyWriter will end when:
No changes (design/code/features), except to address system test defects occurred in the prior
three weeks.
No panic, crash, halt, wedge, unexpected process termination, or other stoppage of
processing has occurred on any server software or hardware for the previous three weeks.
No client systems have become inoperable due to a failed update during System Test
The test team has executed all the planned tests against the GA-candidate software
The development teams have resolved all "must-fix bugs per Sales, Marketing and Customer
Service
The test team has checked that all issues in the bug tracking system are either closed or
deferred, and, where appropriate, verified by regression and confirmation testing.
The test metrics indicate that we have achieved product stability and reliability that we have
completed all planned tests and the planned tests adequately cover the critical quality risks.
The project management team agrees that the product, as defined during the final cycle of
system test, will satisfy the customer's reasonable expectations of quality.
The project management team holds a system test phase exit meeting and agrees that we have
completed system test.
A test case template is a well-designed document for developing and better understanding of
the test case data for a particular test case scenario.
A good test case template maintains test artifact consistency for the test team and makes it
easy for all stakeholders to understand the test cases
There are many different ways to document test cases. Myriad templates have been
developed and used by various test teams.