Missing verification of generated reports in ReportControllerIntegrationTest
pmoustopoulos opened this issue · 0 comments
Issue Description
The ReportControllerIntegrationTest
class in the src/test/java/com/ainigma100/departmentapi/integration/
directory is missing verification steps for the generated reports. The tests currently only check the HTTP response status, but they do not verify the content or correctness of the reports themselves. JasperReport libraries were used to generate the reports
.
Steps to Reproduce
- Set up the project and execute the
ReportControllerIntegrationTest
class. - Review the tests
givenNoInput_whenGenerateDepartmentsExcelReport
,givenNoInput_whenGenerateEmployeesExcelReport
,givenNoInput_whenGeneratePdfFullReport
,givenNoInput_whenGenerateAndZipReports
, andgivenNoInput_whenGenerateMultiSheetExcelReport
. - Notice that the tests only verify the HTTP response status and do not perform any assertions on the actual report content.
Expected Behavior
The integration tests for generating reports should include assertions to verify that the generated reports, created using the JasperReport libraries (version 6.20.5), contain the correct values, ensuring their accuracy and integrity.
Proposed Solution
To fix this issue, we need to modify the ReportControllerIntegrationTest
class and add appropriate assertions to verify the content of the generated reports. This may involve using the JasperReport API to extract the report data from the response, parsing it, and asserting on specific values or structures.