README.markdown

README

etap is a collection of Erlang modules that provide a TAP testing client library. These modules allow developers to create extensive and comprehensive tests covering many aspects of application and module development. This includes simple assertions, exceptions, the application behavior and event web requests. This library was originally written by Jeremy wall.

As per the TAP wiki:

TAP, the Test Anything Protocol, is a simple text-based interface between testing modules in a test harness. TAP started life as part of the test harness for Perl but now has implementations in C/C++, Python, PHP, Perl and probably others by the time you read this.

These modules are not meant to compete with eunit, but to offer a more general testing facility that isn't provided by eunit.

CREATING TESTS

A "test" is any number of etap:* or etap_*:* tests that are part of a test plan. When a plan is created using etap:plan/1, a process is started that tracks the status of the tests executed and handles diagnostic output.

BUILD & INSTALL

To build this library, from the root directory execute the make command. You should also execute the make test command to verify that the library functions correctly on your system. If you have the Perl module TAP::Harness you can use it to collect and display test results using the make prove target.

$ make
$ make test
$ make prove

If you choose to run the make test command then please be sure to make clean after to remove any of the temporary beam files created by the tests in the t/ directory.

The included tests cover the basic functionality of the etap modules. They can also be used as a reference when writing your own tests.

To install etap you need to create the etap/ebin/ directory in your current Erlang library and copy all of the .beam files created by the make file.

The make dist-src target can be used to create source distributions for further packaging and deployment.

USING TAP::Harness

The 'TAP::Harness' library can be used to collect TAP output produced by this module.

$ cpan install TAP::Harness
$ prove t/*.t
$ prove -v t/*.t

TEST COVERAGE

With etap it is possible to test the code coverage of your test suite. To enable code coverage you must set the "COVER" environmental variable and post-compile all of the .coverdata files created by the test suite.