Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Automatic Testing

Olaf Szmidt edited this page Nov 9, 2017 · 5 revisions

Old article can be found in the history of this page or in the following gist..

Unit Tests

Currently our unit tests are located in [module name]/tests/test_simulation. They check that individual pieces of our code base work correctly, without integration of other functionality. They are all prefixed with test_ and this is the requirement for it to be recognized when all_tests.py is ran.

Every time you add a new piece of functionality; the bare minimum is to reflect this in the unit tests.

Functional Tests

Our functional tests can be found in [module name]/tests/functional. They generally tend to mock all the logic of the game without actually integrating the surrounding server architectures.

Integration Tests

Right now, we have no integration tests.

Hypothesis

Hypothesis is a property based tool that can be used to run tests with a way wider range of scenario's than we could possibly design. It tends to find edge cases that we may have (and have already) missed various times. We encourage to convert current tests to make use of this framework as well as designing new ones with this.

Coverage

Our coverage tool right now is coveralls. For the moment we do not count the coverage over the tests. This gives a closer to reality coverage, but it does not check if all the tests run.

Clone this wiki locally