Skip to content

Testing

This is a short canned synopsis of testing in the tremor project.

Coyote

Coyote is used for testing the tremor API via curl and via the command line tremor-tool

Install Coyote

brew install golang
go get -u github.com/landoop/coyote

Running Coyote against the API

Change directory to tremor-runtime/tremor-api

Then, run

$GOPATH/bin/coyote -c tests/coyote.yml

Running Coyote against tremor-tool

Change directory to tremor-runtime/tremor-tool

Then, run

$GOPATH/bin/coyote -c tests/coyote.yml

Viewing Coyote HTML reports

Via a python server:

python3 -m http.server 8000

A HTML based graphical report of the results.

EQC

EQC or 'QuickCheck' is a specification-based testing tool for Erlang supporting a test methodology called property-based testing. Programs are tested by writing properties - preconditions, postconditions and invariants. QuickCheck uses random generation to create constructive ( should pass ) and destructive ( should fail ) tests given the specified properties. This allows suitably defined specifications to cover a far greater set of use cases than would ordinarily be possible to write manually.

Further to this, QuickCheck can reduce a set of failing testcases to the minimal testcase that forces any failing test to fail its specification. This drastically reduces the amount of QA and developer time required to verify or prove a piece of code works given a suitably defined specification.

Start tremor

You need to start the tremor to run the tests:

cargo run -p tremor-server

Running EQC

In tremor-runtime/tremor-erl run:

rebar3 as eqc eqc