Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
105 0 0 0 100% 5.944 s

Note: failures are anticipated and checked for with assertions while errors are unanticipated.


Package List

[Summary] [Package List] [Test Cases]


Package Tests Errors Failures Skipped Success Rate Time
com.hospital.portal.unit.TestModels 37 0 0 0 100% 0.193 s
com.hospital.portal.unit.TestConfig 2 0 0 0 100% 0.384 s
com.hospital.portal.unit.TestServices 36 0 0 0 100% 4.860 s
com.hospital.portal.unit.TestControllers 30 0 0 0 100% 0.507 s

Note: package statistics are not computed recursively, they only sum up all of its testsuites numbers.

com.hospital.portal.unit.TestModels

- Class Tests Errors Failures Skipped Success Rate Time
DoctorTest 6 0 0 0 100% 0.011 s
AdminTest 4 0 0 0 100% 0.013 s
PatientTest 13 0 0 0 100% 0.017 s
SpecialtyTest 5 0 0 0 100% 0.006 s
AppointmentTest 9 0 0 0 100% 0.146 s

com.hospital.portal.unit.TestConfig

- Class Tests Errors Failures Skipped Success Rate Time
ConfigTest 2 0 0 0 100% 0.384 s

com.hospital.portal.unit.TestServices

- Class Tests Errors Failures Skipped Success Rate Time
PasswordServiceTest 2 0 0 0 100% 0.557 s
PatientAppointmentServiceTest 8 0 0 0 100% 2.363 s
RoleServiceTest 4 0 0 0 100% 0.276 s
DocAppointmentServiceTest 5 0 0 0 100% 0.033 s
LoginServiceTest 5 0 0 0 100% 1.455 s
RegisterServiceTest 3 0 0 0 100% 0.124 s
AdminAppointmentServiceTest 9 0 0 0 100% 0.052 s

com.hospital.portal.unit.TestControllers

- Class Tests Errors Failures Skipped Success Rate Time
DocAppointmentControllerTest 4 0 0 0 100% 0.057 s
LoginControllerTest 4 0 0 0 100% 0.079 s
RegisterControllerTest 3 0 0 0 100% 0.054 s
TemplateControllerTest 7 0 0 0 100% 0.174 s
PatientAppointmentControllerTest 6 0 0 0 100% 0.070 s
AdminAppointmentControllerTest 6 0 0 0 100% 0.073 s

Test Cases

[Summary] [Package List] [Test Cases]

DoctorTest

testUpdateDoctorDoctorId 0.002 s
testGetDoctorById 0.001 s
testAddDoctor 0.003 s
testGetSetDoctorId 0.002 s
testGetDoctorById_NotFound 0.001 s
testGetSetSpecialty 0 s

PasswordServiceTest

testHashPassword 0.156 s
testVerifyPassword 0.394 s

AdminTest

testAddAdmin 0.002 s
testGetAdminById 0.002 s
testUpdateAdminWorkerId 0.002 s
testGetAdminById_NotFound 0.002 s

PatientAppointmentServiceTest

testGetAppointmentByPatientDniAndDoctorSpecialtyName 2.260 s
testModifyAppointment_ThrowsException_WhenNotFound 0.011 s
testAddAppointmentPatient_ThrowsException_WhenPatientNotFound 0.007 s
testDeleteAppointmentPatient 0.008 s
testAddAppointmentPatient 0.017 s
testGetAppointmentsByDate 0.005 s
testGetAppointmentsByPatientDNI 0.005 s
testModifyAppointment 0.007 s

PatientTest

testGetPassword 0.001 s
testGetSetPatientId 0.001 s
testGetEmail 0 s
testGetPhone 0 s
testGetSurname 0 s
testGetPatientById 0.002 s
testGetName 0.001 s
testGetBirthDate 0.001 s
testAddPatient 0.001 s
testUpdatePatientPatientId 0.001 s
testGetGender 0.001 s
testGetDni 0.001 s
testGetPatientById_NotFound 0.002 s

DocAppointmentControllerTest

testUpdateAppointment 0.049 s
testGetAppointmentsByDoctor 0.002 s
testDeleteAppointment 0.002 s
testCreateAppointment 0.002 s

LoginControllerTest

testLogin_Success 0.066 s
testLogin_InvalidCredentials 0.003 s
testLogin_MissingCredentials 0.002 s
testLogin_ServiceException 0.003 s

RegisterControllerTest

testRegisterPatient_Success 0.049 s
testRegisterPatient_DniAlreadyExists 0.003 s
testRegisterPatient_ServiceException 0.002 s

TemplateControllerTest

testShowInicioPaciente 0.155 s
testShowIndex 0.003 s
testShowRegistrationForm 0.002 s
testShowLoginForm 0.003 s
testShowInicioAdmin 0.002 s
testShowInicio 0.003 s
testShowInicioDoctor 0.002 s

SpecialtyTest

testGetSpecialtyName 0 s
testGetSetSpecialtyName 0.001 s
testGetSetSpecialtyDescription 0.001 s
testGetSpecialtyDescription 0 s
testDefaultConstructor 0 s

PatientAppointmentControllerTest

testGetAppointmentsBySpecialty 0.051 s
testDeleteAppointmentPatient 0.002 s
testAddAppointmentPatient 0.002 s
testGetAppointmentsByDate 0.003 s
testGetAppointmentsByPatientDNI 0.003 s
testModifyAppointment 0.003 s

RoleServiceTest

testDetermineUserRole_NotFound 0.257 s
testDetermineUserRole_Doctor 0.005 s
testDetermineUserRole_Admin 0.005 s
testDetermineUserRole_Patient 0.005 s

DocAppointmentServiceTest

testUpdateAppointment 0.013 s
testGetAppointmentsByDoctor 0.003 s
testDeleteAppointment 0.003 s
testCreateAppointmentWhenDoctorNotFound 0.005 s
testCreateAppointment 0.004 s

AdminAppointmentControllerTest

testGetAllAppointments 0.052 s
testUpdateAppointment 0.003 s
testGetAllPatients 0.002 s
testGetAllDoctors 0.003 s
testDeleteAppointment 0.003 s
testCreateAppointment 0.003 s

LoginServiceTest

testLoginAsDoctor_Success 1.409 s
testLogin_InvalidCredentials 0.012 s
testLogin_WrongPassword 0.008 s
testLoginAsAdmin_Success 0.007 s
testLoginAsPatient_Success 0.009 s

RegisterServiceTest

testGenerateIncrementalPatientId_WithExistingPatients 0.096 s
testRegisterPatient_Success 0.015 s
testGenerateIncrementalPatientId_FirstPatient 0.005 s

AppointmentTest

testAppointmentPurpose 0.120 s
testEndTime 0.002 s
testStartTime 0.002 s
testPatient 0.001 s
testDate 0.001 s
testToString 0.012 s
testObservations 0.002 s
testDoctor 0.002 s
testAppointmentId 0.001 s

ConfigTest

testPasswordEncoder 0.001 s
testSecurityFilterChain 0.383 s

AdminAppointmentServiceTest

testCreateAppointment_PatientNotFound 0.011 s
testUpdateAppointment_NotFound 0.005 s
testGetAllAppointments 0.004 s
testGetAllPatients 0.004 s
testGetAllDoctors 0.003 s
testCreateAppointment_DoctorNotFound 0.003 s
testDeleteAppointment 0.003 s
testCreateAppointment_Success 0.004 s
testUpdateAppointment_Success 0.006 s