Friday, 18 May 2012

Model-based testing


Model-based testing is the appliance of Archetypal based architecture for designing and optimally active the all-important artifacts to accomplish software testing. Models can be acclimated to represent the adapted behavior of the Arrangement Beneath Analysis (SUT), or to represent the adapted testing strategies and testing environment. The account on the appropriate depicts the above approach.

General model-based testing setting

A archetypal anecdotic the Arrangement Beneath Analysis (SUT) is usually an abstract, fractional presentation of the arrangement beneath test's adapted behavior. The analysis cases acquired from this archetypal are anatomic tests on the aforementioned akin of absorption as the model. These analysis cases are collectively accepted as the abstruse analysis suite. The abstruse analysis apartment cannot be anon accomplished adjoin the arrangement beneath analysis because it is on the amiss akin of abstraction. Therefore an executable analysis apartment have to be acquired from the abstruse analysis apartment that can acquaint with the arrangement beneath test. This is done by mapping the abstruse analysis cases to authentic analysis cases acceptable for execution. In some model-based testing tools, the archetypal contains abundant advice to accomplish an executable analysis apartment from it. In the case of online testing (see below), the abstruse analysis apartment exists alone as a abstraction but not as an absolute artifact.

There are abounding altered means to "derive" tests from a model. Because testing is usually beginning and based on heuristics, there is no one best way to do this. It is accepted to consolidate all analysis ancestry accompanying architecture decisions into a amalgamation that is generally accepted as "test requirements", "test purpose" or even "use case". This amalgamation can accommodate e.g. advice about the allotment of the archetypal that should be the focus for testing, or about the altitude area it is actual to stop testing (test endlessly criteria).

Because analysis suites are acquired from models and not from antecedent code, model-based testing is usually apparent as one anatomy of black-box testing. In some aspects, this is not absolutely accurate. Model-based testing can be accumulated with source-code akin analysis advantage measurement, and anatomic models can be based on absolute antecedent cipher in the aboriginal place.

Model-based testing for circuitous software systems is still an evolving field.

Deploying model-based testing There are various known ways to deploy model-based testing, whic


The capability of model-based testing is primarily due to the abeyant for automation it offers. If the archetypal is machine-readable and academic to the admeasurement that it has a categorical behavioral interpretation, analysis cases can in assumption be acquired mechanically.

Often the archetypal is translated to or interpreted as a bound accompaniment apparatus or a accompaniment alteration system. This apparatus represents the accessible configurations of the arrangement beneath test. To acquisition analysis cases, the apparatus is searched for executable paths. A accessible beheading aisle can serve as a analysis case. This adjustment works if the archetypal is deterministic or can be adapted into a deterministic one. Valuable off-nominal analysis cases may be acquired by leveraging un-specified transitions in these models.

Depending on the complication of the arrangement beneath analysis and the agnate archetypal the bulk of paths can be actual large, because of the huge bulk of accessible configurations of the system. For award adapted analysis cases, i.e. paths that accredit to a assertive claim to proof, the seek of the paths has to be guided. For analysis case generation, assorted techniques accept been activated and are surveyed in.2The capability of model-based testing is primarily due to the abeyant for automation it offers. If the archetypal is machine-readable and academic to the admeasurement that it has a categorical behavioral interpretation, analysis cases can in assumption be acquired mechanically.

Often the archetypal is translated to or interpreted as a bound accompaniment apparatus or a accompaniment alteration system. This apparatus represents the accessible configurations of the arrangement beneath test. To acquisition analysis cases, the apparatus is searched for executable paths. A accessible beheading aisle can serve as a analysis case. This adjustment works if the archetypal is deterministic or can be adapted into a deterministic one. Valuable off-nominal analysis cases may be acquired by leveraging un-specified transitions in these models.

Depending on the complication of the arrangement beneath analysis and the agnate archetypal the bulk of paths can be actual large, because of the huge bulk of accessible configurations of the system. For award adapted analysis cases, i.e. paths that accredit to a assertive claim to proof, the seek of the paths has to be guided. For analysis case generation, assorted techniques accept been activated and are surveyed in.2

Deriving tests algorithmically


The capability of model-based testing is primarily due to the abeyant for automation it offers. If the archetypal is machine-readable and academic to the admeasurement that it has a categorical behavioral interpretation, analysis cases can in assumption be acquired mechanically.

Often the archetypal is translated to or interpreted as a bound accompaniment apparatus or a accompaniment alteration system. This apparatus represents the accessible configurations of the arrangement beneath test. To acquisition analysis cases, the apparatus is searched for executable paths. A accessible beheading aisle can serve as a analysis case. This adjustment works if the archetypal is deterministic or can be adapted into a deterministic one. Valuable off-nominal analysis cases may be acquired by leveraging un-specified transitions in these models.

Depending on the complication of the arrangement beneath analysis and the agnate archetypal the bulk of paths can be actual large, because of the huge bulk of accessible configurations of the system. For award adapted analysis cases, i.e. paths that accredit to a assertive claim to proof, the seek of the paths has to be guided. For analysis case generation, assorted techniques accept been activated and are surveyed in.2

Test case generation by theorem proving

Theorem proving has been originally acclimated for automatic proving of analytic formulas. For model-based testing approaches the arrangement is modeled by a set of analytic expressions (predicates) allegorical the system's behavior.3 For selecting analysis cases the archetypal is abstracted into adequation classes over the accurate estimation of the set of the analytic expressions anecdotic the arrangement beneath development. Each chic is apery a assertive arrangement behavior and can accordingly serve as a analysis case. The simplest administration is done by the disjunctive accustomed anatomy approach. The analytic expressions anecdotic the system's behavior are adapted into the disjunctive accustomed form.

est case generation by constraint logic programming and symbolic execution


Constraint programming can be acclimated to baddest assay cases acceptable specific constraints by analytic a set of constraints over a set of variables. The arrangement is declared by the agency of constraints.4 Analytic the set of constraints can be done by Boolean solvers (e.g. SAT-solvers based on the Boolean satisfiability problem) or by after analysis, like the Gaussian elimination. A band-aid begin by analytic the set of constraints formulas can serve as a assay cases for the agnate system.

Constraint programming can be accumulated with allegorical execution. In this access a arrangement archetypal is accomplished symbolically, i.e. accession abstracts constraints over altered ascendancy paths, and again application the coercion programming adjustment for analytic the constraints and bearing assay cases.

Test case generation by model checking

Model checkers can aswell be acclimated for analysis case generation.5 Originally archetypal blockage was developed as a address to analysis if a acreage of a blueprint is accurate in a model. When acclimated for testing, a archetypal of the arrangement beneath test, and a acreage to analysis is provided to the archetypal checker. Within the action of proofing, if this acreage is accurate in the model, the archetypal checker detects assemblage and counterexamples. A attestant is a path, area the acreage is satisfied, admitting a counterexample is a aisle in the beheading of the model, area the acreage is violated. These paths can afresh be acclimated as analysis cases.

Test case generation by using an event-flow model

A accepted archetypal that has afresh been acclimated abundantly for testing software with a graphical user-interface (GUI) front-end is alleged the event-flow archetypal that represents contest and accident interactions. In abundant the aforementioned way as a control-flow archetypal represents all accessible beheading paths in a program, and a data-flow archetypal represents all accessible definitions and uses of a anamnesis location, the event-flow archetypal represents all accessible sequences of contest that can be accomplished on the GUI. Added specifically, a GUI is addle into a bureaucracy of modal dialogs; this bureaucracy is represented as an affiliation tree; anniversary modal chat is represented as an event-flow blueprint that shows all accessible accident beheading paths in the dialog; alone contest are represented application their preconditions and effects. An overview of the event-flow archetypal with associated algorithms to semi-automatically about-face architect the archetypal from an active GUI software is presented in this 2007 paper.6 Because the event-flow archetypal is not angry to a specific aspect of the GUI testing process, it may be acclimated to accomplish a advanced array of testing tasks by defining specialized model-based techniques alleged event-space analysis strategies (ESES). These ESES use the event-flow archetypal in a amount of means to advance an end-to-end GUI testing process, namely by blockage the model, test-case generation, and analysis answer creation. Please see the GUI Testing page for added details.