z-logo
open-access-imgOpen Access
PyModel: Model-based testing in Python
Author(s) -
Jonathan Jacky
Publication year - 2011
Publication title -
proceedings of the python in science conferences
Language(s) - English
Resource type - Conference proceedings
ISSN - 2575-9752
DOI - 10.25080/majora-ebaa42b7-008
Subject(s) - computer science , programmer , python (programming language) , white box testing , programming language , unit testing , model based testing , oracle , test case , interleaving , code coverage , black box testing , integration testing , operating system , software , software development , software construction , regression analysis , machine learning
With model program and test harness in hand, developers or testers can use the tools of the model-based testing framework in various activities: Before generating tests from a model, it is helpful to use an analyzer to validate the model program, visualize its behaviors, and (optionally) perform safety and liveness analyses. An offline test generator generates test cases and expected test results from the model program, which can later be executed and checked by a test runner connected to the implementation through the test harness. This is a similar workflow to unit testing, except the test cases and expected results are generated automatically. In contrast, onthe-fly testing is quite different: the test runner generates the test case from the model as the test run is executing. On-thefly testing can execute indefinitely long nonrepeating test runs, and can accommodate nondeterminism in the implementation or its environment. To focus automated test generation on scenarios of interest, it is possible to code an optional scenario machine, a lightweight model that describes a particular scenario. The tools can combine this with the comprehensive contract model program using an operation called composition. It is also possible to code an optional strategy in order to improve test coverage according to some chosen measure. Some useful strategies are already provided. Model-based testing supports close integration of design and analysis with testing. The analyzer is similar to a model checker; it can can check safety, liveness, and temporal properties. And, the same models are used for these analyses as for automated testing. Moreover, the models are written in the same language as the implementation.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom