Fastest
Encyclopedia
Fastest is a model-based testing
Model-based testing
Model-based testing is the application of Model based design for designing and optionally executing the necessary artifacts to perform software testing. Models can be used to represent the desired behavior of the System Under Test , or to represent the desired testing strategies and testing...

 tool that works with specifications written in the Z notation
Z notation
The Z notation , named after Zermelo–Fraenkel set theory, is a formal specification language used for describing and modelling computing systems. It is targeted at the clear specification of computer programs and computer-based systems in general.-History:...

. The tool implements the Test Template Framework
Test Template Framework
The Test Template Framework is a model-based testing framework proposed by Phil Stocks and David Carrington in . Although the TTF was meant to be notation-independent, the original presentation was made using the Z formal notation. It is one of the few MBT frameworks approaching unit...

 (TTF) proposed by Phil Stocks and David Carrington in . It is freely available online.

Usage

Fastest presents a command-line user interface. The user first needs to load a Z specification written in LaTeX
LaTeX
LaTeX is a document markup language and document preparation system for the TeX typesetting program. Within the typesetting system, its name is styled as . The term LaTeX refers only to the language in which documents are written, not to the editor used to write those documents. In order to...

 format verifying the ISO
International Organization for Standardization
The International Organization for Standardization , widely known as ISO, is an international standard-setting body composed of representatives from various national standards organizations. Founded on February 23, 1947, the organization promulgates worldwide proprietary, industrial and commercial...

 standard . 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.

Testing tactics supported by Fastest

Currently, 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 .
  • 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 :
  • 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
Undecidable problem
In computability theory and computational complexity theory, an undecidable problem is a decision problem for which it is impossible to construct a single algorithm that always leads to a correct yes-or-no answer....

, 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 . Finite models are calculated by restricting the type of each VIS variable to a finite set and then by calculating the Cartesian product
Cartesian product
In mathematics, a Cartesian product is a construction to build a new set out of a number of given sets. Each member of the Cartesian product corresponds to the selection of one element each in every one of those sets...

 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)
Community Z Tools
The project is a SourceForge project to build a set of tools for the Z notation, a formal method useful in software engineering. Tools include support for editing, typechecking and animating Z specifications. There is some support for extensions such as Object-Z and TCOZ. The tools are built...

 project. The tool can be used in one of two modes :
  • 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
Test Template Framework
The Test Template Framework is a model-based testing framework proposed by Phil Stocks and David Carrington in . Although the TTF was meant to be notation-independent, the original presentation was made using the Z formal notation. It is one of the few MBT frameworks approaching unit...

 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
Interface (Java)
An interface in the Java programming language is an abstract type that is used to specify an interface that classes must implement. Interfaces are declared using the interface keyword, and may only contain method signature and constant declarations...

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 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);
}
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK