Software engineering and standardisation section (TEC- EME) 1 Automatic test case generation from a formal model LTG technology evaluation based on a B model of a part of ATV onboard software Julien ORSAT – Stagiaire from the University of Franche-Comté (France) 08/03 – 23/07/2004 Supervisor: Philippe CHEVALLEY
27
Embed
Software engineering and standardisation section (TEC-EME) 1 Automatic test case generation from a formal model LTG technology evaluation based on a B.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Software engineering and standardisation section (TEC-EME)
1Automatic test case generationfrom a formal model
LTG technology evaluation based ona B model of
a part of ATV onboard software
Julien ORSAT – Stagiaire from the University of Franche-Comté (France)
08/03 – 23/07/2004
Supervisor: Philippe CHEVALLEY
2Outline
B modelling for Leirios Test Generator
ATV software case study: Gyra functional unit
Gyra B formal model
LTG automatic test case generation
Conclusion
3Outline
B modelling for Leirios Test Generator B formal notation LTG requirement traceability LTG syntax restrictions
ATV software case study: Gyra functional Unit
Gyra B formal model
LTG automatic test case generation
Conclusion
4B formal notation
Used as input language for LTG Other supported input format : Statecharts/Statemate, UML
Part of the B method Code generation from the model Proof obligations to ensure correctness Several refinement steps from the model to the target code Created in the 90’s by J-R Abrial Applied in railway transports and smart card industry
LTG input: 1st step of the B method (“abstract machine”)
Text format Statecharts and UML are graphically used
5Some B concepts
Sets ; could be considered as base types GYRO_ID = {G1, G2, G3, G4} GYRO_MODE = {COARSE, FINE}
Relations ; to define sets of ordered pairs gyra_mode : GYRO_ID --> GYRO_MODE
An LTG test case is made of 1. Preambule 2. Body + Identification 3. Postambule
With Gyra, test programs may end in any FSM state no need for a postambule
Softwarecriticality
19Generated test cases
179 functional abstract test cases generated = 179 operation activation sequences XML format (HTML and RTF translators)
Comparison to EADS test plan Chaining of several tests (8 large test sequences)
difficult to compare
Traceable requirements covered by LTG: 37/43 Difficulty with generic requirements (5)
Multiple tags for one requirement Were those requirements fully covered ?
1 requirement was not covered: some behaviours, related to 1 B operation, were not reached different generation criteria should solve the problem.
HTML example
20EADS test plan coverage
Gyra FSM state and transition coverage
OFF_N
ON_N
ON_4ON_1
ON_2
ON_13
ON_14
ON_3
ON_24
ON_12
ON_23
ON_34
21Coverage comparison
State coverage EADS test plan: 9/12 LTG: 12/12
Graphically represented transition coverage
EADS test plan: 14/22 LTG : 22/22
Reflexive transition coverage EADS: 13/14, tested on one state LTG: 13/14, tested on every state
uncovered transition is relatedto uncovered B operation
ON_x (11 states)
Example: GYRA_TR_MODE
In EADS test plan:1 test case
Our choice:11 test cases
22
Required to generate test programs from test cases:
Tagged test program pattern Relation mapping between B operations and Ada services
Test program generation on a simple model Test program example
Not enough time to generate test programs
Ada test program generation
23Outline
B modelling for Leirios Test Generator
ATV software case study: Gyra functional unit
Gyra B formal model
LTG automatic test case generation
Conclusion
24
179 Test Cases
LTG Test CaseGenerator
Test CaseGeneration
Test GenerationCriteria
LTGeXecutable
Script Builder
Test Execution Environment Test Driver Generation
Test DriverSchemas
49 Gyra functional requirements
B Model (750 lines)FunctionalModeling
LTGModel Animator
ModelValidation
LEIRIOS Test Generator™
done
to do
24
25Conclusion
Technology evaluation: B notation Particularly suited to model finite state machines Difficulty to model real time aspects like scheduling Added requirement traceability Some restrictions on the notation
Automatically generated test cases on the case-study 15 hour computation on a desktop PC, for 179 test cases Coverage is similar or better compared to EADS test plan
LTG product stability, documentation quality to be raised
Transition from research prototypeto commercial product is in progress
26Perspectives
Short-term perspectives Generate and execute Gyra FSM test programs
2 possibilities: by Estec or by EADS Structural coverage study Fault injection in the Gyra implementation to evaluate test
efficiency Generate tests for Gyra algorithms
Long-term perspectives LTG input format comparison for space projects
B notation Statecharts UML
Software engineering and standardisation section (TEC-EME)
27Automatic test case generationfrom a formal model
LTG technology evaluation based ona B model of
a part of ATV onboard software
Julien ORSAT – Stagiaire from the University of Franche-Comté (France)