Testing
Context
The circumstances of our project mean most of our workload is on the data sanitisation and tweaking of models to try to maximise the KPI (R^2). For these tasks, testing is not exactly available since the inputs and outputs are simple and the complexity lies in manipulating data and model parameters.
Testing strategy
The main parts that are available for us to test are the implementation of the backend and frontend. Our testing philosophy deviates from maximising coverage, rather prioritising the correctness of inputs and outputs for individual functions.
Unit testing
We wrote unit tests for each function and feed possible inputs into the functions then ensure that the output is as expected. By doing this for each individual function, we can remove the possibility of bugs due to Python’s lack of static typing. Our conclusion from unit testing is that it is important when working in a non-statically typed language.