Skip to content
matjames007 edited this page Mar 12, 2015 · 1 revision

Testing

Within a week, Johnny wrote his first module in python! He launches the application but it fails catastrophically. Johnny Appleseed forgot to do any testing! This next section ensures that the products designed and developed are of the high quality that is expected of the SlashRoots Engineering Lab.

Unit Testing

This is a type of testing in which discrete units of source code is tested to verify they work as desired. These tests are recommended to run automatically throughout the development process. If the system being developed is written in Python it is recommended that the Python Unit Testing (PyUnit) be used unless another, more supported framework has been chosen by a senior engineer.

In each project a suite of tests should be developed and maintained through the project lifecycle allowing for faster debug times. Each engineering resource is responsible for the development of his/her own unit tests.

Test suites are primarily used to check if requirements developed during the research phases are met by the software development team. When used in conjunction with a continuous integration tool such as Travis it allows for more robust deployments that are of a high quality. Travis runs a series of tests using the test suites developed against a target environment to ensure that the requirements are adhered to.

*An example of this is an API where a session should expire after 1 hr. To test this Travis may attempt to set up a session then expire the session by using the database. If the session is still active after manually expiring the session then the test will fail. *

Clone this wiki locally