Backend Testing Report
Introduction
This document presents the testing strategy, tools, and outcomes for our backend services. Our goal is to ensure high-quality and robust software through automated testing.
Testing Tools and Frameworks
JUnit
- Description: JUnit is a widely-used testing framework in the Java ecosystem, perfect for unit and integration testing.
- Usage: We used JUnit to write and execute our unit tests, ensuring that each component functions correctly in isolation as well as in integration with other components.
JaCoCo
- Description: JaCoCo is a code coverage library for Java, which is integrated into our build process to generate coverage reports.
- Usage: After running our JUnit tests, JaCoCo collects coverage data which is then used to generate a visual report indicating the coverage of our tests.
Tested Modules
We focused on comprehensive testing across various modules of our backend system. Below is a list of the primary modules and components we tested:
com.se.market.controller
com.se.document.controller
com.se.forum.controller
com.se.counsel_teacher.controller
com.se.chat.controller
com.se.course.controller
- More modules as listed in the coverage report.
Test Coverage Report
The following screenshot shows our test coverage report generated by JaCoCo. It provides a detailed look at the instruction and branch coverage for each component, helping us identify areas where additional tests may be needed.
To view the full report: jacoco report
Effectiveness of Tests
Our tests cover a significant portion of the codebase, with some modules achieving higher coverage than others:
- Overall Coverage: Approximately 26% to 67% coverage across various modules.
- Highlights:
com.se.market.controller
: 67% instruction coverage, 73% branch coverage.com.se.course.controller
: 26% instruction coverage, reflecting areas that need more testing.
Areas for Improvement
- Increased Coverage: Modules such as
com.se.course.controller
andcom.se.chat.controller
show lower coverage, indicating a need for more comprehensive tests. - Integration Testing: Expanding our integration tests to cover interactions between different services and modules.
Conclusion
The current automated testing setup has helped maintain code quality and catch bugs early. However, ongoing efforts are needed to improve coverage and ensure all functionalities are thoroughly tested.
Appendix
- Test Source Code: GitHub Repository Link