akiellor / bananas

An experimental alternative to example based testing.
0 stars 0 forks source link

Bananas (name pending) [EXPERIMENTAL]

An experimental alternative to example based testing for system testing.

What is it?

Bananas is a testing tool, which instead of focusing on distinct 'scenarios' or 'examples', focuses of modelling the system as a state machine. With this state machine, Bananas will generate a set of tests which exercise and verify the system under test.

Motivation

The underlying hypothesis is that these problems stem from using example based testing tools (xUnit) via an interface that is inherently slow.

Goals

Terminology

Status

The project is currently in active development and research. Things will unapologetically break as this is an experiment.

Contributions in the form of ideas, code or feedback are all welcome.

There has been some progress in the following areas:

Generation

There are currently two strategies for generating tests named brute and quick. Brute will exercise every transition possible from every system state possible in the defined model. Quick follows a Random Walk through the model, generating a single test. Both of these strategies are used in the System Spec.

A reasonably complete model for todomvc can be found here

A weighted random walk is still being investigated as a way of encoding things like highest value scenario.

Inspection

Given the data centric nature of the defined models, it is easy to perform analysis or display information about the model in different ways.

The states script is able to take a model and generate a graphviz compatible graph of all the possible states and the valid transitions between them. Find an example here for the todomvc model.

There is still much room for improvement when it comes to test plan analysis and test naming. The current naming strategy is a hash of the transition names in the the test, this is not very user freindly.