5. Testing - adle29/cs373-idb GitHub Wiki

Testing

Phase 1

Our current testing harness is a bit crude due to the fact that we cannot actually test anything yet. But we have a testing philosophy to promote completeness and the robustness of our models.

We are using Python's unittest framework and we are testing for each of our models the type and values of the constituent types.

Phase 2

After updating our models, we have done plentiful changes to the test harness in order to match with the variable format of each model. We also improved our logic of running the tests by changing our imported libraries in order to improve test runs.

However, we are still implementing the same testing philosophy as we are checking whether the values are correct for each running method for each model.

Phase 3

Now that we implemented the API in Flask, we created another test suite to test it. We use python's requests framework to request data from our API and assert that the data retrieved from the JSON has the corresponding keys for the model retrieved.