Testing
This section covers information regarding our approach and results for Continuous Integration and general testing.
Unit Testing
Unit tests are run with github actions whenever a change is made to the master branch or when a pull request is made. Continuous Integration testing can be found on the github actions page: Java CI with Gradle
By entering one of the workflow runs, you will see the test results such as the example below:
The unit testing code itself is located in the src/test/java source folder.
We tested as much as we could to cover as much of the code as possible. We made sure every test passed
before merging with the master branch. All components tested are necessary to meet a requirement or support another function that meets a requirement. Below is a list of our tests and their associated requirements.
List of Tests and Their Descriptions/Requirements
Code Coverage
During development of the game, we used code coverage reports to inspect what code hasn’t been tested yet. We used the inbuilt code coverage tools found in Eclipse and IntelliJ but have since moved to CodeCov.io to have automated coverage reporting on our repository. Codecov analyses coverage reports generated by the JaCoCo plugin. From this analysis, it generates a graph as seen below along with a line by line breakdown of what has and hasn’t been tested. The coverage percentage can then be displayed in a badge as seen above.
Manual Testing
Unit tests are good for automation, but not everything can be tested automatically. The project needs to be manually reviewed to ensure the game is playable and meets the requirements. As such, we undertook manual testing along the development process of the project. We gave each test a unique ID (starting with MT_
) to make it easy to reference as needed.
Below is the latest test report: