Surefire Report

Summary

[Summary] [Package List] [Test Cases]


Tests Errors Failures Skipped Success Rate Time
78 0 0 0 100% 13.77 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.flogin.backend 78 0 0 0 100% 13.77 s

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

com.flogin.backend

- Class Tests Errors Failures Skipped Success Rate Time
ProductControllerIntegrationTest 17 0 0 0 100% 6.106 s
AuthControllerIntegrationTest 10 0 0 0 100% 1.252 s
ProductServiceImplTest 14 0 0 0 100% 0.124 s
BackendApplicationTests 5 0 0 0 100% 1.024 s
AuthControllerMockTest 5 0 0 0 100% 5.182 s
AuthServiceImplTest 27 0 0 0 100% 0.085 s

Test Cases

[Summary] [Package List] [Test Cases]

ProductControllerIntegrationTest

deleteProduct_Forbidden_NonAdmin 0.093 s
listProducts_WithNameFilter 0.090 s
listProducts_EmptyDatabase 0.034 s
createProduct_ValidationError_PriceZero 0.061 s
updateProduct_Success 0.052 s
getProductById_Success 0.037 s
listProducts_WithCategoryFilter 0.027 s
getProductById_NotFound 0.031 s
listProducts_AllProducts 0.030 s
deleteProduct_NotFound 0.021 s
updateProduct_NotFound 0.020 s
listProducts_WithPagination 0.026 s
createProduct_ValidationError_NameTooShort 0.022 s
createProduct_Forbidden_NonAdminUser 0.019 s
deleteProduct_Success 0.042 s
createProduct_Unauthenticated 0.021 s
createProduct_Success 0.031 s

AuthControllerIntegrationTest

login_InvalidUsername_InvalidCharacters 0.096 s
login_InactiveUser 0.306 s
login_InvalidUsername_TooShort 0.088 s
login_MalformedJSON 0.085 s
login_InvalidPassword_TooShort 0.083 s
login_InvalidPassword_NoNumbers 0.088 s
login_Success 0.162 s
login_UserNotFound 0.085 s
login_WrongPassword 0.158 s
login_EmptyRequestBody 0.084 s

ProductServiceImplTest

testGetProducts_ShouldReturnPageProductResponse 0.098 s
testDeleteProduct_ShouldThrowException_WhenProductNotFound 0.002 s
testUpdateProduct_ShouldThrowException_WhenProductNameAlreadyExists 0.002 s
testGetProducts_ShouldReturnPageProductResponse_WhenCategoryKeywordNull 0.001 s
testUpdateProduct_ShouldThrowException_WhenProductNotFound 0.002 s
testCreateProduct_ShouldReturnProductResponse_WhenProductCreated 0.002 s
testGetProductById_ShouldThrowException_WhenNotFound 0.001 s
testGetProducts_ShouldThrowException_WhenPageNegative 0.001 s
testGetProducts_ShouldReturnPageProductResponse_WhenNameKeyWordNull 0.002 s
testGetProductById_ShouldReturnProductResponse_WhenFound 0.001 s
testGetProducts_ShouldThrowException_WhenSizeIsZero 0.001 s
testCreateProduct_ShouldThrowException_WhenProductNameAlreadyExists 0.002 s
testUpdateProduct_ShouldReturnProductResponse_WhenProductUpdated 0.002 s
testDeleteProduct_ShouldDeleteProduct_WhenSuccess 0.001 s

BackendApplicationTests

applicationPropertiesAreLoaded 0.005 s
allControllersAreLoaded 0.003 s
allNecessaryBeansAreInitialized 0.018 s
databaseConnectionWorks 0.004 s
applicationContextLoads 0.004 s

AuthControllerMockTest

testMalformedJson 0.252 s
testEmptyBody 0.106 s
testWrongPassword 0.012 s
testLoginWithMockedService 0.016 s
testUserNotFound 0.010 s

AuthServiceImplTest

testValidatePassword_ShouldReturnErrorMessage_WhenPasswordNull 0.019 s
testValidatePassword_ShouldReturnEmpty_WhenPasswordValid 0.002 s
testValidatePassword_ShouldReturnErrorMessage_WhenPasswordTooShort 0.002 s
testAuthenticate_ShouldReturnIsSuccessFalse_WhenUsernameNotFound 0.004 s
testValidatePassword_ShouldReturnErrorMessage_WhenPasswordTooLong 0.002 s
testValidateUsername_ShouldReturnErrorMessage_WhenUsernameNull 0.002 s
testValidateUsername_ShouldReturnEmpty_WhenUsernameValid 0.002 s
testValidatePassword_MinLengthEdge 0.002 s
testValidateUsername_ShouldReturnErrorMessage_WhenUsernameTooLong 0.001 s
testValidatePassword_ShouldReturnErrorMessage_WhenPasswordMissingDigit 0.001 s
testAuthenticate_ShouldReturnIsSuccessFalse_WhenInvalidUsername 0.001 s
testValidateUsername_ShouldReturnErrorMessage_WhenUsernameTooShort 0.001 s
testValidatePassword_ShouldReturnErrorMessage_WhenPasswordMissingLetter 0.001 s
testValidateUsername_ShouldReturnErrorMessage_WhenUsernameBlank 0.001 s
testValidateUsername_BlankWithSpaces_IsTreatedAsEmpty 0.002 s
testAuthenticate_WhenBothUsernameAndPasswordInvalid_ReturnsUsernameErrorFirst 0.002 s
testValidateUsername_ShouldReturnErrorMessage_WhenUsernameInValidCharacters 0.002 s
testValidatePassword_ShouldReturnErrorMessage_WhenPasswordBlank 0.002 s
testAuthenticate_ShouldNotGenerateToken_WhenPasswordInvalidLength 0.003 s
testAuthenticate_ShouldReturnIsSuccessFalse_WhenInvalidPassword 0.001 s
testValidateUsername_ShouldRejectSpaces 0.002 s
testValidatePassword_AllowsSpecialCharactersIfContainsLetterAndDigit 0.002 s
testAuthenticate_ShouldReturnIsSuccessTrueAndToken_WhenAuthenticateSuccess 0.004 s
testAuthenticate_ShouldNotCallRepoWhenUsernameInvalid 0.002 s
testValidatePassword_MaxLengthEdge 0.001 s
testAuthenticate_ShouldReturnIsSuccessFalse_WhenWrongPassword 0.002 s
testValidateUsername_ShouldAcceptDotDashUnderscore 0.001 s