UPMBT Extending the Unified Process with ModelBased Testing
UPMBT Extending the Unified Process with Model-Based Testing Fabrice Bouquet, Stéphane Debricon, Bruno Legeard and Jean-Daniel Nicolet Mo. De. V 2 a 2006 Saturday, September 26, 2020 Projet Cassis FRE 2661 1
> Outline 1. Unified Process (UP) 1. 1 Overview 1. 2 Structure 2. Model-Based Testing (MBT) 3. Extending the Unified Process with Model-Based Testing (UPMBT) 3. 1 Process 3. 2 Workflows 3. 3 Phases 4. RTAXPM case study 5. Conclusion and Future work UPMBT 2
> Introduction Process The UP : a software engineering process (SEP). MBT : a process conducting the generation and execution of tests. UP + MBT = UPMBT : methodological framework for MBT. Modeling <<refine>> UPMBT Design model Analysis model <<refine>> Test Model 3
> Outline 1. Unified Process (UP) 1. 1 Overview 1. 2 Structure 2. Model-Based Testing (MBT) 3. Extending the Unified Process with Model-Based Testing (UPMBT) 3. 1 Process 3. 2 Workflows 3. 3 Phases 4. RTax. PM case study 5. Conclusion and Future work UPMBT 4
> UP > Overview (1) The UP, a SEP Requirements Software. A template of process to be customized. The UP is : Iterative : short time-boxed iterations made of workflows. Incremental : each iteration generates a partially complete version of the final system. UPMBT 5
> UP > Overview (2) Architecture-centric : Develop and evolve a robust system architecture. Focus of early iterations. Risk driven : Develop high-risk elements in early iterations. Requirements driven through use case : To help plan iteration. UPMBT 6
> UP > Structure A SEP (here the UP) defines : WHO participate? WHAT is there to do? HOW to develop it? WHEN to deliver a version? A 2 axes structure : Workflows Phases UPMBT 7
> Outline 1. Unified Process (UP) 1. 1 Overview 1. 2 Structure 2. Model-Based Testing (MBT) 3. Extending the Unified Process with Model-Based Testing (UPMBT) 3. 1 Process 3. 2 Workflows 3. 3 Phases 4. RTAXPM case study 5. Conclusion and Future work UPMBT 8
> MBT > Overview Goals : Identify failures in software. Functional validation of a system using a model. Key practices : Use of a model, abstract enough, that capture the expected behavior of a system. Test cases generation from selection criteria. Execution on the System Under Test. UPMBT 9
> MBT > Processes Activities 1 2 3 Building a model Documents Model Defining test selection criteria Generating tests Test selection criteria Test cases 4 adapter Setting up adapter Test scripts adapter layer SUT 5 Executing tests verdict UPMBT 10
> Outline 1. Unified Process (UP) 1. 1 Overview 1. 2 Structure 2. Model-Based Testing (MBT) 3. Extending the Unified Process with Model-Based Testing (UPMBT) 3. 1 Process 3. 2 Workflows 3. 3 Phases 4. RTAXPM case study 5. Conclusion and Future work UPMBT 11
> UPMBT > Process <<realize>> Use case model Development Process <<refine>> Analysis model <<implement>> Design model Implementation model Validation <<refine>> Test Model <<use>> Adaptation layer <<implement>> <<use>> Tests generation Executable scripts Validation Process 12
> UPMBT > Workflows Design workflow : Production of the test model, Design and Test models are : • Produced in parallel, • Independent to ensure the quality of the generated tests. Test target and selection criteria definition • UPMBT Test Cases 13
> UPMBT > Workflows Implementation workflow : Production of an implementation for the design model, Production of the adapter and the adaptation layer, Generation of test scripts from the adapter and the test cases. Test workflow : Execution of tests scripts on the system. UPMBT 14
> UPMBT > Phases Inception : Not impacted by the approach. Elaboration : Production of the test model, the adapter and the adaptation layer. The adaptation layer architecture should be defined. UPMBT 15
> UPMBT > Phases Construction : Evolution of points of control and observation to keep coherence with design. Transition : Manually produced tests scripts and generated tests scripts are executed on the SUT. UPMBT 16
> UPMBT > Benefits Feedback Questions Test Model Analysis model Corrections produced earlier in the process. Quality improvement and better coverage of produced tests. Increased productivity : Automatic tests generation. Functional evolutions are easy to introduce in test campaign. From an incremental point of view. UPMBT 17
> Outline 1. Unified Process (UP) 1. 1 Overview 1. 2 Structure 2. Model-Based Testing (MBT) 3. Extending the Unified Process with Model-Based Testing (UPMBT) 3. 1 Process 3. 2 Workflows 3. 3 Phases 4. RTAXPM case study 5. Conclusion and Future work UPMBT 18
> RTax. PM > Context Project with the Canton of Geneva Information and Technology Center (CTI), Switzerland. Good practices exist, but they are not applied systematically in every project A reference UML model used to capture many project aspects, like business modeling, use cases, analysis, design. . . Most projects perform some testing, but neither in a systematic nor uniform way. UPMBT 19
> RTax. PM > Overview The Cantonal Fiscal Administration (AFC) started, a few years ago, the rebuilding of all taxing applications. An important sub-project is the taxation of legal entities named RTax. PM (Refonte Taxation Personnes Morales). Once a taxation file has been completed, several different taxes are calculated (federal, cantonal and commune-bound). These taxes must then be distributed among the various communes of the canton. UPMBT 20
> RTax. PM > Overview The tax computation itself involves complex business rules (several taxes, percentage lookup tables, threshold effects, …) Besides unit testing, a functional testing framework has been developed previously Specific cases have been manually devised with the help of a complex Excel spreadsheet It relies on a database updated with production data (percentages) on a regular basis A need for testing of both the computation and the life cycle exists UPMBT 21
> RTax. PM > Taxation Lifecycle Correct In taxation Controlled At work Validate To stamp [No stamp] Opposition Stamp To notify To correct Stamp Notify Notified Embedded states Computing-bound conditions Back loops Complex business rules Security issues (stamping requires special privileges) Suppress Canceled 22
> RTax. PM > Lifecycle for MBT Correct In taxation Login( taxer) Taxer logged in Creation To stamp At work Logout( taxer) Check Taxer logged out Controlled [taxer. allow_stamp=true or taxation. stamp_needed=false] Login( group leader) Validate [taxer. allow_stamp=false and taxation. stamp_needed=true] Opposition Stamp To correct To notify Stamp Notify Notified Group leader logged in Suppress Canceled 23
> RTax. PM > Generated Test cases Function – Taxation computation 250 generated test cases and expected results Combinatory on tax reduction and tax scale Function – Taxation life cycle 50 generated test cases : • all transitions • all-one-loop paths on the life cycle Test combinatory as round trips within the UML state machine UPMBT 24
> RTax. PM > Tests execution Use a XML framework with JUnit to execute generated test cases 25
> Outline 1. Unified Process (UP) 1. 1 Overview 1. 2 Structure 2. Model-Based Testing (MBT) 3. Extending the Unified Process with Model-Based Testing (UPMBT) 3. 1 Process 3. 2 Workflows 3. 3 Phases 4. RTAXPM case study 5. Conclusion and Future work UPMBT 26
> Conclusion This first experimentation is a success for the CTI and UPMBT Integration of MBT into a SEP : Can accelerate its adoption. Reduce the risk of incoherence between design and test model. Give permanent feedback from the test model to the analysis model. Don’t start from scratch but use the analysis model to derive the test model. UPMBT can be used with any tools supporting UP UPMBT 27
> Future work Experimenting : With other case study the parallel development of the design and test model. Defining : Guidelines to model for test. A subset of UML. An action language to be used for MBT. 28
- Slides: 28