Skip to content
Dallas Fraser edited this page Feb 6, 2019 · 3 revisions

Testing


Unit testing

The unittesting is done just using python unittest. All tests that interact with the APIs or Database should inherit BaseTest.TestSetup class. All tests should clean up upon completion. BaseTest.TestSetup has methods for adding different objects to the database and will delete them upon tear down.

To run the tests on docker use the following scripts: ./run_tests.sh If not using dockers: python -m unittest discover

Acceptance Testing

The acceptance test is just a quick test of the website frontend. It is not exhaustive but just make sure that most of the pages have some basic functionality. UI testing should be done by the developer. Additional features should consider adding more feature files for testing. Using the python behave and feature files for the testing.

Setup

I could not figure out how to run the tests in chrome headless. So you will need to setup this up manually. So need to to install python and then pip install requirements.txt under the feature folder. Additionally, need to install chromedriver and ensure python behave can find it. You may need to add it to your environment path.

Running Tests

To run the tests use the following scripts: ./run_ui_tests.sh or If not using dockers: behave

Clone this wiki locally