The tests in trd are run in the following order:
- unit tests
- regression tests
- integration tests
- smoke tests
- acceptance tests
- non functional tests.
- formal verification (WIP)
Unit tests test only one specific function or method of a class. The smaller the function and the more specialized it is the better the unit test.
Regression tests are tests which document fixed bugs. To implement a regression test you need to do the following:
- Have a bug in trd (see bug label in issues)
- Reproduce the bug in a test under the
regression/
directory. - Assert the behaviour which you would like this bug to have.
- Fix the bug and make the test pass.
Integration tests test the behaviour of trd. Meaning it tests the interaction between multiple functions or classes.
Smoke tests test if trd starts, runs and ends under different cirumstances.
Acceptance tests test the functionality which users are expecting to work. E.g. the correct and reliable distribution of rewards.
Non functional tests test the performance, load time, transaction speed etc. of trd.
Checking the FSM model systematically with exhaustive exploration. This consists of exploring all states and transitions in the model (source).