Programming Capstone Unit test suite (and code skeleton)
June 12th, 2022
- Unit test suite (and code skeleton)—In this phase you translate your design into a skeleton program, which typically means a set of classes with stub public methods (methods with a correct signature/prototype and return statement, but no implementation at all). The skeleton should include comments based on the design. Building a test database (or test data files) is also part of this phase. You will probably need some simple user interface (for example, a PHP web interface) to be able to examine and update your data. This “scaffolding” code is in addition to your actual project code, as are any testing code and deployment scripts. Then build and deliver a unit test suite, based on the design and requirements. For Java, use JUnit. Remember, the purpose of the unit tests is to ensure the implementation properly fulfills the design. You need enough test cases for this. (At this point, none of your tests are expected to pass. You work on making each test pass, one at a time, in the implementation and testing phase.) Chapter 22 of the text has resources on testing—be sure to read this chapter thoroughly.