Architecture and Technology Adding new testing tactics
See also
Notes
References
{{About||the 2011 film|Fastest (film)}}Fastest is a model-based testing tool that works with specifications written in the Z notation. The tool implements {{Harv|Cristia|Rodriguez Monetti|2009}} the Test Template Framework (TTF) proposed by Phil Stocks and David Carrington in {{Harv|Stocks|Carrington|1996}}. It is freely available online.[1]
Usage
Fastest presents a command-line user interface. The user first needs to load a Z specification written in LaTeX format verifying the ISO standard {{Harv|Z Standard|2002}}. Then, the user has to enter a list of the operations to test as well as the testing tactics to apply to each of them. In a third step Fastest generates the testing tree of each operation. After testing trees have been generated, users can browse them and their test classes, and, more importantly, they can prune any test class both automatically or manually. Once testing trees have been pruned, users can instruct Fastest to find one abstract test case for each leaf in each testing tree. {{Harv|Cristia|Rodriguez Monetti|Albertengo|2009}}
Testing tactics supported by Fastest
Currently,{{when|date=February 2011}} Fastest supports the following testing tactics:
Disjunctive Normal Form (DNF). It is the only testing tactic applied by default (regardless of whether the user has added or not other testing tactics) and the first one to be applied.
Standard partitions (SP). The user can add, modify and delete standard partitions for any predefined Z mathematical operator by simply editing a text file {{Harv|Cristia|Rodriguez Monetti|Albertengo|2009}}.
Free Types (FT)
In Set Extension (ISE)
Proper Subset of Set Extension (PSSE)
Subset of Set Extension (SSE)
Pruning testing trees in Fastest
Fastest provides two ways of pruning testing trees {{Harv|Cristia|Rodriguez Monetti|Albertengo|2010}}:
Automatic pruning.
To prune a testing tree, Fastest analyzes the predicate of each leaf to determine if the predicate is a contradiction or not. Since this problem is undecidable, the tool implements a best-effort algorithm that can be improved by users. The most important aspect of the algorithm is a library of so called elimination theorems each of which represents a family of contradictions. This library can be extended by users by simply editing a text file. Elimination theorems are conjunctions of parametric Z atomic predicates.
Manual pruning.
Fastest users can prune subtrees or individual leaves of testing trees by issuing two commands. These commands will prune all the test classes in the subtree regardless of them being empty or not. The main purpose of these commands is to allow engineers to reduce the number of or to eliminate unimportant test cases.
How Fastest finds abstract test cases
The tool finds abstract test cases by calculating a finite model for each leaf in a testing tree {{Harv|Cristia|Rodriguez Monetti|2009}}. Finite models are calculated by restricting the type of each VIS variable to a finite set and then by calculating the Cartesian product between these sets. Each leaf predicate is evaluated on each element of this Cartesian product until one satisfies the predicate (meaning that an abstract test case was found) or until it is exhausted (meaning that either the test class is unsatisfiable or the finite model is inadequate). In the last case, the user has the chance to assist the tool in finding the right finite model or to prune the test class because it is unsatisfiable.
Architecture and Technology
Fastest is a Java application based on the Community Z Tools (CZT) project. The tool can be used in one of two modes {{Harv|Cristia|Rodriguez Monetti|2009}}:
In distributed mode Fastest works as a client-server application. The application can be installed in a number of computers each acting as client, a server or both. Users access the application through clients which send test classes to servers (called testing servers) which try to find an abstract test case out of them. In this way the heaviest task is distributed across as many computers as possible. Since the calculation of an abstract test case from a test class is completely independent from each other, this architecture speeds up the entire process proportionally with respect to the number of testing servers.
In application mode each instance of Fastest is completely independent of each other. All the tasks are computed in the local computer.
Adding new testing tactics
As can be seen from the TTF presentation, testing tactics are essential to the method. They are the tools that engineers must use to create the most discovering test cases possible. Then, the more sound testing tactics available to engineers the better.
In Fastest users can add testing tactics of their own by implementing the Tactic interface provided by the tool. This interface has methods to configure and apply testing tactics. The interface definition is the following:
See also
Test Template Framework
Model-based testing
Notes
1. ^FG-Tools, Flowgate Consulting.
References
{{cite conference | last1=Cristiá | last2=Rodríguez Monetti | first1=Maximiliano | first2=Pablo | title=Implementing and Applying the Stocks-Carrington Framework for Model-Based Testing | booktitle=Formal Methods and Software Engineering, 11th International Conference on Formal Engineering Methods, ICFEM 2009 | publisher=Springer-Verlag | location=Rio de Janeiro, Brazil | year=2009 | ref={{harvid|Cristia|Rodriguez Monetti|2009}}}}
| title = Information Technology — Z Formal Specification Notation — Syntax, Type System and Semantics | edition = ISO/IEC 13568:2002 | year = 2002 | url = http://standards.iso.org/ittf/PubliclyAvailableStandards/c021573_ISO_IEC_13568_2002(E).zip | format = 1 MB PDF | pages = 196 pages | ref={{harvid|Z Standard|2002}}
}}.
{{cite conference | last1=Cristiá | last2=Albertengo | last3=Rodríguez Monetti | first1=Maximiliano | first2=Pablo | first3=Pablo | title=Pruning Testing Trees in the Test Template Framework by Detecting Mathematical Contradictions | booktitle=8th IEEE International Conference on Software Engineering and Formal Methods (SEFM), 2010 | publisher=IEEE | location=Pisa, Italy | year=2010 | ref={{harvid|Cristia|Rodriguez Monetti|Albertengo|2010}}}}
4 : Software testing tools|Formal methods tools|Z notation|Articles with example Java code