Testing (making sure things don’t explode)

This week the team focused on researching different methods to test our ECM system. Because we are using an off-the-shelf product, there are many tools available to help us with testing the ECM. For testing the complicated access control requirements and file permissions, we can use the API.

There are many ways to test code, but since we’ve done most of our API and backend work using Python, we have been researching different methods and strategies for testing our system using the Python API. One of the easiest ways to test a Python project is using the testing library Pytest. It enables us to write as many tests as we need and Pytest will execute them automatically and give us a readout of which tests passed and failed. Since our tests have to be performed on our system, it’s also possible to configure the tests to undo any changes they make to the ECM when they are done. This ensures that none of the tests can break anything for any of the other tests. When we’re finished, all we have to do is launch the application, run the testing script, and it will handle the rest.

An example of a Pytest script. Functions that begin with ‘test_’ are automatically run by Pytest.

Leave a Reply

Your email address will not be published. Required fields are marked *