Indholdsfortegnelse

Code coverage

Code coverage rapporten bliver håndteret af et JaCoCo plugin i Maven.

Det er kun klasser som er blevet udviklet i forbindelse med denne service. Alle klasser der er autogenereret, eller som kommer i form af afhængigheder, de er blevet sorteret fra i rapporten.

En anden vigtig detalje at pointere, de klasser som kobler direkte op med tredjepart services (som SDM eller SOR databaser), ingen unit tests kører på dem. Så hele pakken dk.sds.nsp.sor.sorls.service.external har ingen tests på sig overhovedet.


InstructionsBranchesComplexityLinesMethodsClasses
ElementMissedTestedCoverageMissedTestedCoverageMissedTotalMissedTotalMissedTotalMissedTotal
dk,sds,nsp.sor.sorls.service.external37482%2400%192173757902
dk.sds.nsp.sor.sorls.servlet43785966%252550%295394301112504
dk.sds.nsp.sor.sorls.helper2270996%63281%652715803307
dk.sds.nsp.sor.sorls.model0321100%00N/A06609506604
dk.sds.nsp.sor.sorls2400%00N/A22332211
dk.sds.nsp.sor.sorls.service120142192%2210883%23972231913014
dk.sds.nsp.sor.sorls.exception56492%00N/A11122511104
dk.sds.nsp.sor.sorls.util51210697%1211090%14931239633108
dk.sds.nsp.sor.sorls.helper.proxy183767%1150%363112501
Total1051552584%9027075%97401216138327212235

Nærmere uddybning af hver pakke kan findes i JaCoCo rapporten, som bliver genereret ved hver eksekvering af unit tests.

Unit tests

Unit tests gør flittig brug af mocking frameworked Mockito i tests, for at kunne komme i forskellige situationer. De forskellige test klasser tester udelukkende på den klasse de er opkaldt efter, og alle andre er mocked af, for at kontrollere testmiljøet fuldstændigt.

ClassMethodResult
AuditHelperUnitTestauditLog(tick)
AuthenticationHelperTestvalidHeaderShouldSucceedAuthentication(tick)
missingHeaderShouldFailAuthentication(tick)
invalidTokenShouldFailAuthentication(tick)
AuthorizationHelperTestauthorizeRequestValidShouldSucceed(tick)
expiredTokenShouldFailAuthorization(tick)
tooLowAuthenticationLevelShouldFailAuthorization(tick)
invalidTypeShouldFailAuthorization(tick)
cvrNotWhitelistedShouldFailAuthorization(tick)
JaxBHelperTestcorrectMarshalWriteObjectShouldSucceed(tick)
nullObjectMarshalWriteShouldFail(tick)
nullWriterMarshalWriteShouldFail(tick)
invalidWriterMarshalWriteShouldFail(tick)
correctMarshalObjectShouldSucceed(tick)
nullObjectMarshalShouldFail(tick)
correctUnmarshalElementShouldSucceed(tick)
nullClassUnmarshalShouldFail(tick)
incorrectClassUnmarshalShouldFail(tick)
 nullElementUnmarshalShouldFail   (tick)
incorrectElementUnmarshalShouldFail(tick)
PropertiesHelperTestgetPropertiesTest(tick)
getExistingStringProperty(tick)
getExistingIntegerProperty   (tick)
getNonexistentStringPropertyReturnNull(tick)
getExistingStringPropertyNotDefault(tick)
getExistingBooleanProperty   (tick)
getNonexistentBooleanPropertyReturnFalse   (tick)
getInvalidBooleanPropertyReturnFalse   (tick)
getExistingBooleanPropertyNotDefault   (tick)
getNonexistentBooleanPropertyReturnDefault    (tick)
getNonexistentStringPropertyReturnDefault(tick)
SLALogHelperTestvalidSuccessSlaLogStored(tick)
validErrorSlaLogStored(tick)
ModelUnitTestserviceStatus(tick)
certificateInformation   (tick)
requestInformation(tick)
certificateSerialNumber(tick)
SorlsLookupServiceGetSorEntityOperationUnitTestgetSorEntity(tick)
getSorEntityALLDBFieldsNull(tick)
getSorEntityNoDataFound   (tick)
getSorEntityException(tick)
getSorEntitySqlException(tick)
getSorEntityNamingException(tick)
SorlsLookupServiceSearchOperationUnitTestsearchAll(tick)
searchAllDBFieldsAllNull(tick)
searchDefaultWithParametersEntityNameAndLocalCodeAndNOSearchScopeSorId(tick)
searchAllChildrenWithParametersEntityNameAndLocalCodeAndSearchScopeSorId(tick)
searchDirectChildrenWithParametersEntityNameAndLocalCodeAndSearchScopeSorId   (tick)
 searchAllParameters   (tick)
searchAllChildren    (tick)
 searchDirectChildren   (tick)
searchDefaultNoSearchTypeNoSearchScopeId(tick)
searchSqlException(tick)
searchNamingException(tick)
SorlsLookupServiceShakSorMapOperationUnitTestshakSorMap(tick)
shakSorMapALLDBFieldsNull(tick)
 shakSorMapNoDataFound   (tick)
 shakSorMapException   (tick)
 shakSorMapSqlException   (tick)
shakSorMapNamingException(tick)
SorlsLookupServiceSorShakMapOperationUnitTestsorShakMap(tick)
 sorShakMapAllDBFieldsNull   (tick)
 sorShakMapNoDataFound   (tick)
 sorShakMapException   (tick)
sorShakMapSqlException(tick)
sorShakMapNamingException(tick)
SorlsLookupServiceUtilityMethodsUnitTest constructSearchQuery(tick)
dateToXMLGregorianCalendar   (tick)
 WhitelistServiceUnitTestcheckCvrWhitelistedValidShouldSucceed

(tick)

checkCvrWhitelistedInvalidShouldFail   (tick)
checkCvrWhitelistedErrorShouldFail   (tick)
DksServletUnitTestcallDoGetNoHeaderShouldSucceed   (tick)
callDoGetValidRFC1123ShouldSucceed   (tick)
callDoGetValidRFC850ShouldSucceed    (tick)
callDoGetValidAsctimeShouldSucceed   (tick)
callDoGetInvalidFormatShouldSucceed   (tick)
callDoGetInvalidWriterShouldFail    (tick)
 SorlsServletUnitTest  doGet    (tick)
doPostInvalidSoapAction    (tick)
getSlaLogPoint    (tick)
 StatusServletUnitTest callDoGetShouldSucceed    (tick)
callDoGetErrorWriterShouldFail    (tick)
CertificateParserUnitTest parseAlternativeIdentifier    (tick)
 ResponseHelperTest writeSuccess   (tick)
writeError   (tick)

Totalt set er der udført 85 unit tests.

Performancemålinger

SORLS Performance testrapport, udarbejdet af Capgemini,  modtaget af SOR teamet d. 22. december 2022.

Konklusionerne er godkendt af SDS, SOR-Teamleder.

Endurance test resultater

TBD



  • No labels