Practical Model-Based Testing gives a practical introduction to model-based testing, showing how to write models for testing purposes and how to use model-based testing tools to generate test suites. It is aimed at testers and software developers who wish to use model-based testing, rather than at tool-developers or academics.
The book focuses on the mainstream practice of functional black-box testing and covers different styles of models, especially transition-based models (UML state machines) and pre/post models (UML/OCL specifications and B notation). The steps of applying model-based testing are demonstrated on examples and case studies from a variety of software domains, including embedded software and information systems.
From this book you will learn:
- The basic principles and terminology of model-based testing
- How model-based testing differs from other testing processes
- How model-based testing fits into typical software lifecycles such as agile methods and the Unified Process
- The benefits and limitations of model-based testing, its cost effectiveness and how it can reduce time-to-market
- A step-by-step process for applying model-based testing
- How to write good models for model-based testing
- How to use a variety of test selection criteria to control the tests that are generated from your models
- How model-based testing can connect to existing automated test execution platforms such as Mercury Test Director, Java JUnit, and proprietary test execution environments
- Presents the basic principles and terminology of model-based testing
- Shows how model-based testing fits into the software lifecycle, its cost-effectiveness, and how it can reduce time to market
- Offers guidance on how to use different kinds of modeling techniques, useful test generation strategies, how to apply model-based testing techniques to real applications using case studies
Inhaltsverzeichnis
1;Front cover;1 2;Title page;4 3;Copyright page;5 4;Table of Contents;8 5;Preface;14 5.1;Acknowledgements;17 6;About the authors;20 7;Chapter 1 The challenge;22 7.1;1.1 What Do We Mean by Testing?;24 7.2;1.2 What Is Model-Based Testing?;27 7.3;1.3 A Smart Card Example;31 7.4;1.4 Summary;38 7.5;1.5 Further Reading;38 8;Chapter 2 The pain and the gain;40 8.1;2.1 Classic Testing Processes;40 8.2;2.2 The Model-Based Testing Process;47 8.3;2.3 Models: Build or Borrow?;52 8.4;2.4 Your Maturity Level;54 8.5;2.5 Hypothetical Case: Total Testing Hours;56 8.6;2.6 Model-Based Testing Experience Reports;61 8.7;2.7 Benefits of Model-Based Testing;69 8.8;2.8 Limitations of Model-Based Testing;75 8.9;2.9 Summary;77 8.10;2.10 Further Reading;77 9;Chapter 3 A model of your system;80 9.1;3.1 How to Model Your System;81 9.2;3.2 A Case Study;87 9.3;3.3 Transition-Based Models;90 9.4;3.4 Pre/Post Models in B;99 9.5;3.5 Summary;124 9.6;3.6 Further Reading;125 10;Chapter 4 Selecting your tests;128 10.1;4.1 Structural Model Coverage;131 10.2;4.2 Data Coverage Criteria;143 10.3;4.3 Fault-Based Criteria;151 10.4;4.4 Requirements-Based Criteria;152 10.5;4.5 Explicit Test Case Specifications;153 10.6;4.6 Statistical Test Generation Methods;154 10.7;4.7 Combining Test Selection Criteria;154 10.8;4.8 Summary;157 10.9;4.9 Further Reading;157 11;Chapter 5 Testing from finite state machines;160 11.1;5.1 Testing Qui-Donc with a Simple FSM;161 11.2;5.2 EFSMs and the ModelJUnit Library;178 11.3;5.3 Unit Testing ZLive with EFSMs;188 11.4;5.4 Labeled Transition Systems Models;203 11.5;5.5 Summary;204 11.6;5.6 Further Reading;205 12;Chapter 6 Testing from pre/post models;208 12.1;6.1 How to Write Pre/Post Models for Testing;209 12.2;6.2 The System Process Scheduler Example;213 12.3;6.3 The Triangle Example;235 12.4;6.4 Robustness Testing from a Pre/Post Model;254 12.5;6.5 Testing a Chat System with Spec Explorer;258 12.6;6.6 Summary;269 12.7;6.7 Further Reading;271 13;Chapter 7 Testing from UML transitio
n-based models;272 13.1;7.1 UML Modeling Notations;273 13.2;7.2 Testing an eTheater with LTG/UML;274 13.3;7.3 Testing a Protocol with Qtronic;287 13.4;7.4 Summary;301 13.5;7.5 Further Reading;302 14;Chapter 8 Making tests executable;304 14.1;8.1 Principles of Test Adaptation;305 14.2;8.2 Example: The eTheater System;312 14.3;8.3 Summary;324 14.4;8.4 Further Reading;324 15;Chapter 9 The gsm 11.11 case study;326 15.1;9.1 Overview of the GSM 11.11 Standard;327 15.2;9.2 Modeling GSM 11.11 in B;332 15.3;9.3 Validation and Verification of the B Model;342 15.4;9.4 Generating Tests with LTG/B;344 15.5;9.5 Generating Executable Scripts;348 15.6;9.6 Test Execution;355 15.7;9.7 Summary;358 15.8;9.8 Further Reading;359 16;Chapter 10 The atm case study;360 16.1;10.1 Overview of the ATM System;361 16.2;10.2 Modeling the ATM System in UML;365 16.3;10.3 Generating Test Cases;378 16.4;10.4 Generating Executable Test Scripts;385 16.5;10.5 Executing the Tests;386 16.6;10.6 Summary;391 16.7;10.7 Further Reading;391 17;Chapter 11 Putting it into practice;392 17.1;11.1 Prerequisites for Model-Based Testing;392 17.2;11.2 Selecting a Model-Based Testing Approach;394 17.3;11.3 People, Roles, and Training;398 17.4;11.4 Model-Based Testing and Agile Methods;401 17.5;11.5 Model-Based Testing and the Unified Process;403 17.6;11.6 Epilogue;408 18;Appendix A Summary of B abstract machine notation;412 19;Appendix B Summary of common OCL constructs;418 20;Appendix C Commercial tools;422 21;Glossary;426 22;Bibliography;430 23;Index;440