Automated Test Script Generation for Model-Based Testing - Copstein, Bernardo; Oliveira, Flávio (Anais do Simpósio Brasileiro de Qualidade de Software (SBQS), 2005)
Statistical testing based on a usage model is a key technique for realistic reliability estimation. Since this technique requires large samples (test suites), test execution is automated via scripts and script-based execution engines. However, such scripts are too complex to design manually, both because of the sample size and the complexity of the usage model, which is normally represented with a Markov chain. At the CPTS (Software Testing Research Center), we developed an approach that automates two steps of script design: test suite generation and converting test cases into scripts. The only manual step is the usage model design, which is represented in two models: a stochastic automata network (SAN) for representing the usage model and an intermediate model (called the Interface Event-State Model) to map the abstract usage model into the implemented interface components. SANs allow modular representation of systems with complex non-eterministic behavior, minimizing the state-space explosion found in Markov chains. The use of a separate model for the implementation has the advantage of making changes in the interface and generating the script automatically without affecting the abstract usage model. We implemented the technique into the STAGE environment; the experiments indicate that the modeling task takes less than one day for a typical model with 420 global states and 8 days for one with over 200.000 global states, while the test suite and script generation takes less than 1 minute. Also, the performance of test case and script generation with SANs is at least compatible with Markov-based generation.