Skip to content
Benjamin edited this page Mar 16, 2020 · 1 revision

Writing tests:

The system supports both unit tests and functional tests through selenium.

Unit tests

They are located in the root of the test folder. The unit tests should cover all model functions with both negative and positive tests. To populate the test database you can either create the data manually in the setUp function or you can use the factories to create data. Be aware that the factories do not live up to real world constraints, for instance a parent can be older than their child

For examples of unit tests see

Functional tests

Functional tests are located in a subfolder in the test directory. Start your functional test with a doctoring that outlines the flow of the tests. Use inline comments to describe the individual steps. Each test should end with writing a screenshot to disk, they make it easier to debug regressions.

You can use test_create_family as an example.

Clone this wiki locally