How to Write Tests

An important requirement for contributing code to Floodlight, be it a patch fixing a bug, new Java code, or new applications in any language (e.g., python), contributors are REQUIRED to develop rigorous unit tests and integration tests and confirm passing them before the contribution can be merged to Floodlight.

Note that a large community of developers are actively developing applications based on Floodlight.  It is all developers' responsibility to maintain the quality and integrity of Floodlight by assuring adequate tests developed together with their code.

After completing the tests, see How to Submit a Patch page to see step-by-step instructions to submit your code and tests for review.

Integration Tests

For integration tests, the Floodlight-Test integration test framework is released for developers to create and execute integration tests in a consistent manner.  See the Floodlight-Test page for detailed instructions and examples on how to obtain, install, and develop tests with it.

Unit Tests

Unit tests for Floodlight are based on JUnit and packaged with the Floodlight source tree. See the Unit Tests page for a quick introduction of writing JUnit EasyMock tests.