01 test case design v1 1 .0
TRANSCRIPT
-
8/8/2019 01 Test Case Design v1 1 .0
1/44
Test Case Design
C3: Protected
-
8/8/2019 01 Test Case Design v1 1 .0
2/44
2 2007, Cognizant Technology Solutions Confidential
About the Author
Chandra Sekar Roopa Shankar (111607); Nithya Suresh (138779);Created By:
ST/PPT/0907/1.0Version and
Date:
Both have 4+ years of experience in software development and testingCredential
Information:
-
8/8/2019 01 Test Case Design v1 1 .0
3/44
3 2007, Cognizant Technology Solutions Confidential
Icons Used
Questions
Contacts
Reference
Demonstration
Hands on
Exercise
Coding
StandardsTest Your
Understanding
Tools
A Welcome
Break
-
8/8/2019 01 Test Case Design v1 1 .0
4/44
4 2007, Cognizant Technology Solutions Confidential
Test Case Design: Overview
Introduction:
This module provides a detailed description about the variousactivities involved in test case design like:
Test objectives
Building of test steps
Test data preparation
-
8/8/2019 01 Test Case Design v1 1 .0
5/44
5 2007, Cognizant Technology Solutions Confidential
Test Case Design: Objectives
Objective:
After completing this chapter, you will be able to:
Identify the test objective
Build test steps
List procedure for test data preparation
Define test designing
List the process for building a test case
List the prerequisite of test case design
Explain test case components
Explain the outcome of test case design process
Define the roles of data in testing
State the importance of preparing, organizing, and maintaining test data
-
8/8/2019 01 Test Case Design v1 1 .0
6/44
6 2007, Cognizant Technology Solutions Confidential
Test Case Design: Objectives (Contd.)
List down different test data types
Define the need of RTM
State how to build a RTM
Describe how to maintain a RTM
State the need of Test Runs
List down the steps required to build Test Runs
-
8/8/2019 01 Test Case Design v1 1 .0
7/44
7 2007, Cognizant Technology Solutions Confidential
Test Objective
Identification of test objectives:
During test analysis, the test basis documentation is analyzed in order
to determine what to test in order to identify the test conditions. A test
condition is defined as an item or event that could be verified by one or
more test cases.
Test conditions identified should be in line with the test objective which
will ensure traceability and test coverage to ensure a particular
requirement is working as expected.
-
8/8/2019 01 Test Case Design v1 1 .0
8/44
8 2007, Cognizant Technology Solutions Confidential
Test Objective (Contd.)
Purpose of testing and coverage required:
Based upon the risk and criticality associated with the application under
test, the project team should establish a coverage goal during test
planning.
The coverage goal defines the amount of code that must be executed by
the tests for the application.
The objective of test coverage is simply to assure that the test process
has covered the application.
-
8/8/2019 01 Test Case Design v1 1 .0
9/44
9 2007, Cognizant Technology Solutions Confidential
Methods to Measure Test Coverage
1. Statement Coverage1. Statement Coverage
2. Branch Coverage2. Branch Coverage
3. Basis Path Coverage3. Basis Path Coverage
4. Integration Sub-tree Coverage4. Integration Sub-tree Coverage
5. Modified Decision Coverage5. Modified Decision Coverage
6. Global Data Coverage6. Global Data Coverage
7. User Specified Data Coverage7. User Specified Data Coverage
-
8/8/2019 01 Test Case Design v1 1 .0
10/44
10 2007, Cognizant Technology Solutions Confidential
Test Objective (Contd.)
Test Coverage Tool:
It is usually recommended to employ some form of coverage analysis
tools (like McCabe and Battle Map) to measure the portions of the
application covered by a set of tests.
The Test Coverage Tools enable the team to:
Measure the coverage of a set of test cases
Analyze test case coverage against system requirements
Develop new test cases to test previously uncovered parts of a system
-
8/8/2019 01 Test Case Design v1 1 .0
11/44
11 2007, Cognizant Technology Solutions Confidential
Questions from participants
-
8/8/2019 01 Test Case Design v1 1 .0
12/44
12 2007, Cognizant Technology Solutions Confidential
Test Designing
Introduction to Test Designing:
Test Designing refers to understanding the sources of test cases and testcoverage, developing and documenting test cases and building and
maintaining test data. The Test Design is preparation of a complete set
of test cases to be performed during testing.
Test Case is a documentation specifying inputs, predicted results, and a
set of execution conditions for a test item.
-
8/8/2019 01 Test Case Design v1 1 .0
13/44
13 2007, Cognizant Technology Solutions Confidential
Test Development Process
Process for building a test cases:
Identify conditions to be tested
Rank test conditions:
Ranking is done to determine which condition should be tested first
Ranking is done to determine the amount of resources allocated to each of
the test conditions
Determine correct results of processing
Create test cases
-
8/8/2019 01 Test Case Design v1 1 .0
14/44
14 2007, Cognizant Technology Solutions Confidential
Prerequisites of Test Case Design
1. Test Case Documentation Standards1. Test Case Documentation Standards
2. Test Case Naming Standards2. Test Case Naming Standards
3. Approved Test Plan3. Approved Test Plan
4. Business Process Documentation4. Business Process Documentation
5. Business Process Flow5. Business Process Flow
6. Test Data Source
6. Test Data Source
-
8/8/2019 01 Test Case Design v1 1 .0
15/44
15 2007, Cognizant Technology Solutions Confidential
Test Development Process
Test case activity:
Testing environment/configuration contains information about
configuration of hardware or software which must be met while
executing test case.
Initialization describes actions, which must be performed before test
case execution is started.
Finalization describes actions to be done after test case is performed.
Actions step by step to be done to complete test.
Input data description.
-
8/8/2019 01 Test Case Design v1 1 .0
16/44
16 2007, Cognizant Technology Solutions Confidential
Test Case Components
1. Test Case Name (s)1. Test Case Name (s)
2. Test Case Prerequisites2. Test Case Prerequisites
3. Test Case Execution Order3. Test Case Execution Order
4. Test Procedures4. Test Procedures
5. Input Values5. Input Values
6. Expected Results6. Expected Results
7. Test Data Sources7. Test Data Sources
-
8/8/2019 01 Test Case Design v1 1 .0
17/44
17 2007, Cognizant Technology Solutions Confidential
Test Development Process
Outcome of the test case design process:
Following are the outcome of the test development process:
Revised Test Plan
Test Procedures for each Test Case
Test Case(s) for each application function described in the test plan
Procedures for test set up, test execution and restoration
-
8/8/2019 01 Test Case Design v1 1 .0
18/44
18 2007, Cognizant Technology Solutions Confidential
Test Development Process (Contd.)
Characteristics of good test case:
A good test case is one that has a high probability to find an error.
Test cases help us discover information. Test cases must be written for the invalid and the unexpected, as well as
for the valid and expected.
Test cases should be no redundant and not too simple or too complex.
Test case is going to be complex if there are more than one expected
result.
-
8/8/2019 01 Test Case Design v1 1 .0
19/44
19 2007, Cognizant Technology Solutions Confidential
Questions from participants
-
8/8/2019 01 Test Case Design v1 1 .0
20/44
20 2007, Cognizant Technology Solutions Confidential
Test Data Preparation: Overview
Test data preparation:
The first stage of any recognizer development project is data
preparation. Functional testing can suffer if data is poor, and good data can help
improve functional testing.
Preparation of the data can help to focus the business where
requirements are vague.
-
8/8/2019 01 Test Case Design v1 1 .0
21/44
21 2007, Cognizant Technology Solutions Confidential
Test Data Preparation
Roles of data in functional testing:
A system is programmed by its Data
Functional Testing suffers, if data is poor
Good Data is vital to reliable Test Results
Good Data can help testing stay of schedule
Problem caused by poor test data:
Unreliable Test Results
Degradation of Test Data Over Time
-
8/8/2019 01 Test Case Design v1 1 .0
22/44
22 2007, Cognizant Technology Solutions Confidential
Marketing Diagram
Classification of Test Data Types
Environmental
Data
Transitional
DataSetup Data Output DataInput Data
-
8/8/2019 01 Test Case Design v1 1 .0
23/44
23 2007, Cognizant Technology Solutions Confidential
Techniques for Test Data Preparation
Can reduce the need for exclusive access toenvironments/machinesFields are independent
Allow controlled and reliable data, reducingdata corruption / change problems
Fixed Input Data consists ofmany rows
PartitioningPermutations
-
8/8/2019 01 Test Case Design v1 1 .0
24/44
24 2007, Cognizant Technology Solutions Confidential
Test Data Preparation
Organizing the data helps because:
It Improves communication within and outside the team.
It reduces test errors caused by using the wrong data.
It allows another method way of doing sanity checks for corrupted or
inconsistent data.
It helps while checking data after input.
It helps in selecting data for investigative tests.
-
8/8/2019 01 Test Case Design v1 1 .0
25/44
25 2007, Cognizant Technology Solutions Confidential
Test Data Preparation (Contd.)
Data load and data maintenance:
Loading the data: Data can be loaded into a test system by
Using the system you are trying to test
Using a data load tool
Testing the Data: The advantages of testing the setup data include:
Overall testing will be improved if the quality of the setup data improves
Problems due to faults in the live setup data will be reduced
The business can reconfigure the software for new business needs withincreased confidence
Datarelated failures in the live system can be assessed in the light of good
data testing
-
8/8/2019 01 Test Case Design v1 1 .0
26/44
26 2007, Cognizant Technology Solutions Confidential
Questions from participants
-
8/8/2019 01 Test Case Design v1 1 .0
27/44
27 2007, Cognizant Technology Solutions Confidential
Requirement Traceability Matrix
Requirement Traceability Matrix:
Helps to ensure the tests of the requirements conforms to the
requirements by associating each requirement with the test.
Used to verify that all stated and derived requirements are allocated to
system components and other deliverables.
Used to determine the source of requirements.
-
8/8/2019 01 Test Case Design v1 1 .0
28/44
28 2007, Cognizant Technology Solutions Confidential
Test Coverage and Traceability
Test coverage:
The degree to which a given test or set of tests addresses all specifiedrequirements for a given system or component.
Traceability:
Ability to review all the test cases defined for each requirement.
Ability to review any defects associated with failed test cases and hence
Requirements.
-
8/8/2019 01 Test Case Design v1 1 .0
29/44
29 2007, Cognizant Technology Solutions Confidential
Building RTM
1. Test Requirement1. Test Requirement
2. Test Strategy2. Test Strategy
3. Test Plan3. Test Plan
4. Test Scenarios4. Test Scenarios
5. Test Cases5. Test Cases
6. Test Logs / Defect ids6. Test Logs / Defect ids
The following are the contents of the RTM:
-
8/8/2019 01 Test Case Design v1 1 .0
30/44
30 2007, Cognizant Technology Solutions Confidential
Bidirectional Traceability
Tracing each test back to its strategyTracing strategy into the tests
Tracing each requirement back to its
sources
Tracing each unique test requirement
forward into the design or strategy
Tracing each Test back to its
associated requirement
Business requirements to their
resulting test requirement
Backward TraceabilityForward Traceability
-
8/8/2019 01 Test Case Design v1 1 .0
31/44
31 2007, Cognizant Technology Solutions Confidential
RTM Tools
1. Databases1. Databases
4. Test Management Tools like QC4. Test Management Tools like QC
3. Hyper Links3. Hyper Links
2. Spread sheets2. Spread sheets
5. Requirements management software5. Requirements management software
The following are the tools that can be used to maintain RTM:
-
8/8/2019 01 Test Case Design v1 1 .0
32/44
32 2007, Cognizant Technology Solutions Confidential
Questions from participants
-
8/8/2019 01 Test Case Design v1 1 .0
33/44
33 2007, Cognizant Technology Solutions Confidential
Test Runs
Test runs:
Defining test execution flow
Setting the test properties
Defining the hierarchy of test cases
-
8/8/2019 01 Test Case Design v1 1 .0
34/44
34 2007, Cognizant Technology Solutions Confidential
Test Runs (Contd.)
Test Runs:
Grouping of test cases to execute the same
The necessity of Test Runs:
Aids in understanding the pattern and order of testing
Defines the Priority of Test Cases
-
8/8/2019 01 Test Case Design v1 1 .0
35/44
35 2007, Cognizant Technology Solutions Confidential
Building Test Runs
1. Functionalities that are being tested in a build1. Functionalities that are being tested in a build
2. Dependencies between test cases2. Dependencies between test cases
3. Test Scenarios based grouping3. Test Scenarios based grouping
4. Prioritization of test cases4. Prioritization of test cases
Test Runs can be created based on the aspects mentioned
below:
-
8/8/2019 01 Test Case Design v1 1 .0
36/44
36 2007, Cognizant Technology Solutions Confidential
Questions from participants
T U d d
-
8/8/2019 01 Test Case Design v1 1 .0
37/44
37 2007, Cognizant Technology Solutions Confidential
Test Your Understanding
1. State true or false. Test Case will be simple if we have more
than one possible outcome
2. All of the following statements are true while ranking a test
condition, EXCEPT:
a) The objective of ranking is to identify highpriority test conditions that
should be tested first.
b) Lowranked test conditions will not be tested .
c)Ranking is used to determine the amount of resources allocated toeach of the test conditions.
3. __________ is recommended as the basis for identifying
conditions to test.
T Y U d d ( d )
-
8/8/2019 01 Test Case Design v1 1 .0
38/44
38 2007, Cognizant Technology Solutions Confidential
Test Your Understanding (Contd.)
4. Among Test data types, Input data can further be classified
as:
a) Fixed and Temporary Input Data.
b) Fixed and Consumable Input Data.
c) Consumable and unconsumable Input Data.
d) Consumable and Temporary Input Data.
5. Name the Test Data Preparation Techniques.
T i
-
8/8/2019 01 Test Case Design v1 1 .0
39/44
39 2007, Cognizant Technology Solutions Confidential
Test Case Design: Summary
Test conditions identified should be in line with the test
objective which will ensure traceability and test coverage to
ensure a particular requirement is working as expected.
Based upon the risk and criticality associated with the
application under test, the project team should establish a
coverage goal during test planning.
The coverage goal defines the amount of code that must be
executed by the tests for the application.
The objective of test coverage is simply to assure that the test
process has covered the application.
T i ( d )
-
8/8/2019 01 Test Case Design v1 1 .0
40/44
40 2007, Cognizant Technology Solutions Confidential
Test Case Design: Summary (Contd.)
Test Designing refers to understanding the sources of test
cases and test coverage, developing and documenting test
cases and building and maintaining test data. Test design must resolve the ambiguities. Too much detail or
not enough will create extra work for the tester.
A test case identifies the specific input values that will be sentto the application, the procedures for applying those inputs,
and the expected application values for the procedure being
tested.
A good test case is one that has a high probability to find an
error.
T C D i S (C d )
-
8/8/2019 01 Test Case Design v1 1 .0
41/44
41 2007, Cognizant Technology Solutions Confidential
Test Case Design: Summary (Contd.)
Data can be influential on the quality of testing. Wellplanned
data can allow flexibility and help reduce the cost of test
maintenance.
The actions that can influence the quality of the data and the
effectiveness of its usage:
Plan the data for maintenance and flexibility
Know your data, and make its structure and content transparent
Use the data to improve understanding throughout testing and the
business
Test setup data as you would test functionality
T C D i S (C d )
-
8/8/2019 01 Test Case Design v1 1 .0
42/44
42 2007, Cognizant Technology Solutions Confidential
Test Case Design: Summary (Contd.)
RTM:
Aids in Test Coverage
Assess current status of the requirements
Analyze the impact of a change
Aids to follow the life of a Requirement
Test Runs:
Organizes Test Cases for Test Execution
Enables efficient test execution and defect tracking
Aids in Prioritization of test cases
T C D i S
-
8/8/2019 01 Test Case Design v1 1 .0
43/44
43 2007, Cognizant Technology Solutions Confidential
Test Case Design: Source
Websites:
www.qai.com
www.softwareqatest.com
www.qualityworld.com
Books:
ISTQB. Certified Tester Foundation Level Syllabus. Version 2007
William E Perry. CSTE Common Body of Knowledge. QAI, 2006
Cognizant Academy. Software Testing. Cognizant Technology Solutions,
2004
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).
-
8/8/2019 01 Test Case Design v1 1 .0
44/44
You have successfully completed
Test Case Design