Skip to content
Wessel Stoop edited this page Jun 20, 2018 · 1 revision

When making a change to Signbank, a lot of things can go wrong. The idea of our test suite is that we can quickly test for an installation if all basic functionality is still working.

How to

We have a tests.py file for each application. You can run them all with:

python bin/develop.py test -k

To run only an individual group of tests

python bin/develop.py test -k signbank.dictionary.tests.BasicCRUDTests

To create a fresh small test database based on your current database:

python repo/signbank/create_test_db.py

Test databases should be small, because the Django testing framework puts everything in one JSON string, which takes several minutes on the full database.

Overview

CRUD

Tests whether you can create, read, update and delete glosses. The RUD part is done using the same requests that are run when doing it pushing buttons in the interface.

Create Gloss

Also tests whether you can create glosses, using the same requests that are run when pushing buttons in the interface.

Search For Glosses

Checks if the search functionality returns the correct things.

DatasetListView_ECV_export_permission_change_dataset

Confirms you can only create an export of a dataset when you have the correct permissions for that dataset

Dataset ListView ECV Export Permission Change Dataset

Confirms you cannot export a dataset when you have no permission

Dataset List View Not Logged In ECV Export

Confirms you cannot export a dataset when you are not logged in

Export CSV

Checks whether a CSV is returned when you export one

Create And Delete Video

Checks whether you can add and remove videos.

Gloss suggestion

Checks whether the AJAX gloss suggestion helper functionality is still working

DetailViewRenders

Makes sure that the detail view gives a 200 (possibly empty if you don't have the dataset permissions)

JavaScriptIsValid

Verifies that a few characters combinations are not part of the Javascript