Title: CoWTeSt: A Cost Weighted Test Strategy
1CoWTeSt A Cost Weighted Test Strategy
2Test Planning Strategy
- Objectives
- Decide which and how many test cases should be
executed. - Give a practical help to managers to support test
planning and evaluate the impact of testing the
phase on the cost of the final product.
3Features
- (Exclusively) UML based It uses the Use Cases
and Interaction diagrams developed during
analysis and design phases - Cowtest strategy development of a systematic
method for UML design-based integration test of
complex system. - Based exclusively on the use of UML diagrams
- immediately usable from industries already using
UML (no additional modeling or design costs) - analysis can be started soon, and done
contemporarily with project development - Different strategies for test cases selection
4Presentation Scheme
5CoWTeSt A Cost Weighted Test Strategy
- Weighted Tree Derivation
- Starting from the main UCD the UCs and SDs are
organized in a sort of hierarchical tree - Deduce the Critical Profile annotate every arch
with a value representing the importance of the
associate node (be it a UC or a SD scenario) - Test Case Derivation apply UIT for test
derivation
6(No Transcript)
7(No Transcript)
8Integration Stage
- The first integration stage is represented by the
main UC and the SDs (if any), which are children
of this node (hence they are at level 2 of the
tree). - The i-th integration stage is represented by the
UCs positioned in at i-th level of the tree and
every SDs, children of these nodes, situated at
i1-th level. - NOTE In the i-th integration stage the SDs at
level i1 are considered, because they represent
the interaction between the different components
that realize the functionalities described in the
UCs at i-th level of the tree.
93rd Integration Stage
10Test Case Selection
- For every node, the product of all the nodes
weights on the complete path from the root to
this node represents its final weight.
11Test Case Selection
1280 Functional Coverage
13Selection of leaves for different coverage levels
14Selection of leaves for different coverage levels
15Presentation Scheme
16Use Interaction Test methodology
- A method to systematically derive Integration
Test suites from UML diagrams - Use case diagrams
- Sequence (Interaction) diagrams
- Class diagrams
- Incremental test strategy (over the Use Case
organizational structure) - Seven steps involved
17Step 1 UML design analysis and search of
relevant Use Cases
18Step 2/1 Analysis of Sequence and Class diagrams
involved in the selected Use Case
19Step 2/2 Class diagram analysis
20Step 3 Test Units definition
- Test Units those system units separately
testable for exercising a possible use of system - Test Units
- DecisionModel, Decision, GoalModel, Goal.
21Step 4 Research of Settings and Interactions
Categories
- - SettingsCategories parameters and inputs
relevant in the Test Unit. - - InteractionsCategories objects interactions,
exchanged messages. -
- Categories
-
- DecisionModel
- Settings _decisions
- Interactions DecisionModel()
- getDecisions()
- Decision
- Interactions
- Decision(nameString,priorityint)
- GetName()
- GetPriority() ............
22Step 5 Test Specification construction
- For each identified category, we consider all its
possible values and constraints.
Test Specification DecisionModel Settings
Interactions _decisions
getDecisions() Naming Opening a new
file Storage Opening a saved
file Modularity After a modification and
before saving Inheritance After a
modification and after saving Stereotypes
DecisionModel() Relationship..
Class constructor
23Step 6 Search of Message Sequences and Test Case
definition
- Message Sequences set of Messages (in temporal
order) , involved in a SD, used by objects to
define and elaborate specific functionalities.
24Step 6 Search of Message Sequences and Test Case
definition
- Test Case is constructed, from a Test
Specification, for each possible combination of
choices of every category involved in a Message
Sequence
Test Case getDecisions() getName()/getPriority(
) Opening a saved file _decisions
Naming Note Such a Test Case must be
repeated for all possible values of _decisions
25Step 7 Definition of UseCase Test Suite and
Incremental Construction of TestFrame
26Cow_Suite Cow pluS UIT Environment
- Tool for automating
- Test cases derivation, from UIT
- Test management strategy, from COWTeST
- Uses UML diagrams already developed for the
analysis and design phase ? no additional effort
or information. - Rational Rose environment
27Cow_Suite Architecture
- Uses REI, Rational Rose Extensibily Interface.
- Composed by six different components
- MDL Analyser
- Test Tree Generator
- Weights Manager
- Test Case Generator
- Test Case Builder
- Test Case Checker
- Graphics interface organized in three tabs
- CowTree
- UIT Structure
- Test Specification
281.MDL Analyser
- Analysis of the .mdl file of Rose
- Search the information necessary to apply test
selection strategy - Actors and Use Cases
- Sequence diagrams and their messages
- Classes with attributes and methods
- Activity diagrams
- The information is passed as the input to the
next component.
292.Test Tree Generator
- All the UCDs and SDs from .mdl file are organized
in a hierarchical tree - using the explicit diagrams links or using the
UC associations and classes relations - To each node we associate
- Level identification number
- Default weight
- such that the sum of this weight plus the
weights - associated to all its brothers is equal to
1.
303.Weights Manager
- Interacts with the user for
- Assigning the real weight to each node
- Selecting directly a node
- Selecting a level number
- Check that the sum of the user assigned weights
of a level nodes is equal to 1. - Choosing the criterion for test case selection
- Fixing the maximum number of test cases to be
executed - Fixing the percentage of functionalities to be
covered. -
-
314.Test Case Generator
- queries the user for the deepest integration
level he/she is interested in and calculate the
final weight of every leaf. - implements the UIT method for test generation
- associates to each SD its test cases organized in
a hierarchical manner. - calculates and visualizes the number of test
cases for each SD depending on the chosen
selection criterion. - associates to each SD the frames of the test
cases that should be instantiated.
32Test Case Frame
- TEST CASE 8.2
- Description
- PreCondition
- Test Case 7
- Flow of event
- getEnterpriseForSourceAddress(caller)
- else
- routingResult doLRQ(caller, callee, Enterprise,
callcase,AccessAgent, BGAResult) - Categories
- SettingsCategories
- PEnterprise
- Callee
- BGAResult
- InteractionsCategories
- getEnterpriseForSourceAddress
- doLRQ
- PostCondition
- Comment
335.Test Case Builder
- Interaction with the user for test case
implementation - For the necessary parameters
- Adding and removing categories
- Changing operations value or even test cases
structure. - The changes involving the UML design are finally
saved in a new file.
346. Test Case Checker
- The tool maintains information about the test
cases generation. - This module will realize the comparison of
different versions of the same .mdl file. - The discovered differences, like, for example,
the existence of new test cases or changes in
those already generated, are saved into a
separate file. - The evaluation of the cost and impact required
for the updates to the test plan with respect to
the official version is derived analyzing this
file.
35References
- F. Basanieri, A. Bertolino, A Practical Approach
to UML-based Derivation of Integration Tests,
QWE2000, Bruxelles, 20-24 November, 3T. - Basanieri, F., Bertolino, A., Marchetti, E.,
CoWTeSt A Cost Weighed Test Strategy, accepted
for ESCOM-SCOPE 2001, London, England, 2-4 April
2001. - Basanieri, F., Bertolino, A., Marchetti, E.,
Ribolini, A., An Automated Test Strategy Based
on UML Diagrams submitted to ICSE 2001 WAPATV
workshop. -