Fastest is a model-based testing tool that works with specifications written in the Z notation. The tool implements[1] the Test Template Framework (TTF) proposed by Phil Stocks and David Carrington.[2]
Fastest presents a command-line user interface. The user first needs to load a Z specification written in LaTeX format verifying the ISO standard.[3] 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.[4]
Currently,[when?] Fastest supports the following testing tactics:
Fastest provides two ways of pruning testing trees:[6]
The tool finds abstract test cases by calculating a finite model for each leaf in a testing tree.[7] 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.
Fastest is a Java application based on the Community Z Tools (CZT) project. The tool can be used in one of two modes:[8]
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:
package client.blogic.testing.ttree.tactics; import java.util.*; import net.sourceforge.czt.z.ast.Spec; import common.z.TClass; import common.z.OpScheme; /** * Interface that abstracts a testing tactic (needed to generate test trees) and * makes possible its application to a test class in order to generate new ones. */ public interface Tactic { /** * Applies this tactic to the specified test class and returns the list with * the generated test classes. * @param tClass * @return */ public List<TClass> applyTactic(TClass tClass); /** * Sets the specification of the system under test. * @param opScheme */ public void setSpec(Spec spec); /** * Gets the Z schema box of the operation under test. * @return */ public Spec getSpec(); /** * Sets the Z schema box of the operation under test. * @param opScheme */ public void setOriginalOp(OpScheme opScheme); /** * Gets the Z schema box of the operation under test. * @return */ public OpScheme getOriginalOp(); /** * Parses the parameters of this tactic. * @param str * @return */ public boolean parseArgs(String str); /** * Sets the instance of TacticInfo associated to this object. * @param tacticInfo */ public void setTacticInfo(TacticInfo tacticInfo); /** * Gets the instance of TacticInfo associated to this object. * @return */ public TacticInfo getTacticInfo(); /** * Gets the description of this tactic. * @return the string with the description of this tactic. */ public String getDescription(); /** * Sets the description of this tactic. * @param description */ public void setDescription(String description); }
Original source: https://en.wikipedia.org/wiki/Fastest.
Read more |