Bita is a coverage-guided tool for testing actor programs written in Akka. Based on three covearge criteria, it generates schedules and runs the program with the generated schedules.
To compile the source code:
> sbt compile
To create a jar file from the source code:
> release.sh
This command will create the jar file in target/scala-2.9.2/
. For the information about how to use the jar file see
How to Use by Example page.
To run the test for bounded buffer example:
> sbt 'test-only test.integrationspecs.BufferSpec'
This command runs the buffer program to obtain a random execution trace, generates schedules for all criteria and all optmizations, runs the programs with those schedules, and measures the coverage obtained by running the program with each set of generated schedules.
Various steps of testing mentioned in the bounded buffer example are splitted into multiple tests in the test case for sleeping barber.
To run the test that obtains a random execution trace:
> sbt 'test-only test.integrationspecs.BarberSpec --- -n random'
To generate schedules (the criterion in the test in configured for PMHR; however, you can change it if you want)
> sbt 'test-only test.integrationspecs.BarberSpec --- -n generate'
To test with the generated schedules:
> sbt 'test-only test.integrationspecs.BarberSpec --- -n test'
To measure the coverage:
> sbt 'test-only test.integrationspecs.BarberSpec --- -n coverage'
To run with random scheduling (currently the it runs with a timeout of 5 minutes but it can be configured with different timeout):
> sbt 'test-only test.integrationspecs.BarberSpec --- -n random-timeout'