Summary

Tests Errors Failures Skipped Success Rate Time
177 0 0 0 100% 52.826

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

Package List

Package Tests Errors Failures Skipped Success Rate Time
com.atlassian.seraph.logout 2 0 0 0 100% 0.011
com.atlassian.seraph.util 18 0 0 0 100% 0.038
com.atlassian.seraph.cookie 3 0 0 0 100% 0.096
com.atlassian.seraph.service 9 0 0 0 100% 0.082
com.atlassian.seraph.controller 1 0 0 0 100% 0.002
com.atlassian.security.auth.trustedapps 94 0 0 0 100% 17.857
com.atlassian.seraph.auth 8 0 0 0 100% 0.079
com.atlassian.security.auth.trustedapps.request.commonshttpclient 2 0 0 0 100% 0.046
com.atlassian.seraph.filter 40 0 0 0 100% 34.615

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

com.atlassian.seraph.logout

Class Tests Errors Failures Skipped Success Rate Time
TestLogoutServlet 2 0 0 0 100% 0.011

com.atlassian.seraph.util

Class Tests Errors Failures Skipped Success Rate Time
TestCookieUtils 1 0 0 0 100% 0.006
TestEncryptionUtils 9 0 0 0 100% 0.004
TestPathMapper 1 0 0 0 100% 0.001
TestRedirectUtils 7 0 0 0 100% 0.027

com.atlassian.seraph.cookie

Class Tests Errors Failures Skipped Success Rate Time
TestEncryptedCookieEncoder 3 0 0 0 100% 0.096

com.atlassian.seraph.service

Class Tests Errors Failures Skipped Success Rate Time
TestPathService 6 0 0 0 100% 0.02
TestWebworkService 3 0 0 0 100% 0.062

com.atlassian.seraph.controller

Class Tests Errors Failures Skipped Success Rate Time
TestNullSecurityController 1 0 0 0 100% 0.002

com.atlassian.security.auth.trustedapps

Class Tests Errors Failures Skipped Success Rate Time
TestBouncyCastleEncryptionProvider 17 0 0 0 100% 0.125
TestBouncyCastleEncryptionProviderKeyPairGeneration 4 0 0 0 100% 12.622
TestDefaultIPMatcher 5 0 0 0 100% 0.005
TestDefaultRequestMatcher 9 0 0 0 100% 0.007
TestDefaultTrustedApplication 5 0 0 0 100% 0.01
TestDefaultTrustedApplicationsManager 6 0 0 0 100% 0.007
TestDefaultURLMatcher 2 0 0 0 100% 0.001
TestListApplicationRetriever 11 0 0 0 100% 0.004
TestReaderApplicationRetriever 4 0 0 0 100% 0.014
TestStringUtil 14 0 0 0 100% 0.004
TestTransportErrorCtors 8 0 0 0 100% 0.004
TestTransportErrorMessageCode 2 0 0 0 100% 0.057
TestTransportErrorMessageParser 2 0 0 0 100% 0.006
TestTrustedApplications 3 0 0 0 100% 4.974
TestTrustedApplicationUtils 1 0 0 0 100% 0.003
TestUIDGenerator 1 0 0 0 100% 0.014

com.atlassian.seraph.auth

Class Tests Errors Failures Skipped Success Rate Time
TestDefaultAuthenticator 8 0 0 0 100% 0.079

com.atlassian.security.auth.trustedapps.request.commonshttpclient

Class Tests Errors Failures Skipped Success Rate Time
TestCommonsHttpClientTrustedRequest 2 0 0 0 100% 0.046

com.atlassian.seraph.filter

Class Tests Errors Failures Skipped Success Rate Time
TestTrustedAppAuthenticatorImpl 13 0 0 0 100% 0.024
TestTrustedAppCertificateServerImpl 2 0 0 0 100% 0.171
TestTrustedApplicationsFilter 15 0 0 0 100% 0.1
TestTrustedApplicationsFilterAuthenticate 10 0 0 0 100% 34.32

Test Cases

TestCommonsHttpClientTrustedRequest

testCannotCreateWithNullHttpMethod 0.044
testAddRequestParameter 0

TestBouncyCastleEncryptionProvider

testGetApplicationCertificateReturnsEmpty 0.005
testGetApplicationCertificateNotFoundAtAll 0.001
testGetApplicationCertificateMalformedUrl 0
testGetApplicationCertificateReturnsProperly 0.003
testDecodeBadSecretKey 0.016
testDecodeSecretKey 0.022
testDecodeBadMagicNumber 0.011
testDecodeInvalidCertificate 0.02
testDecodeNumberFormatException 0.02
testDecodeNullMagicNumberVersion0 0.011
testDecodeNullMagicNumberVersion1 0.009
testBCSecretKeyFactory 0
testSecretKeyValidatorValidatesLength16 0
testSecretKeyValidatorInValidatesLengthLessThan16 0
testSecretKeyValidatorInValidatesLengthGreaterThan16 0
testSecretKeyValidatorInValidatesLeadingZero 0
testValidatingSecretKeyFactory 0

TestBouncyCastleEncryptionProviderKeyPairGeneration

testPrivateKey 0.032
testPublicKey 0.002
testCertificateLifecycle 0.568
testFunnyUserName 0.098

TestDefaultIPMatcher

testIpMatcherFailsOutOfRangeNumber 0.001
testIpMatcherFailsOutOfRangeNegativeNumber 0.001
testIpMatcherFailsIllegalWildcard 0
testDefIPMatcher 0.001
testEmptyIpMatcherMatchesEverything 0

TestDefaultRequestMatcher

testAllGood 0.001
testBadIpAddress 0.001
testIpAddressInXForwardedForChecked 0.001
testMultipleIpAddressesInXForwardedForChecked 0
testBadIpAddressInXForwardedFor 0
testBadUrl 0
testContextPathRemoval 0
testNullIpMatcher 0
testNullUrlMatcher 0

TestDefaultTrustedApplication

testProductionCtor 0.004
testProductionCtorThrowsNullKey 0
testProductionCtorThrowsNullId 0.002
testProductionCtorThrowsNullUrlMatcher 0
testProductionCtorThrowsNullIpMatcher 0

TestDefaultTrustedApplicationsManager

testSimpleConstructor 0.001
testSimpleConstructorNullApp 0
testSimpleConstructorNullMap 0
testConstructorEncryptionProvider 0.001
testConstructorEncryptionProviderThrowsNoSuchAlgorithmException 0.001
testConstructorEncryptionProviderThrowsNoSuchProviderException 0

TestDefaultURLMatcher

testDefaultURLMatcher 0
testDefaultURLMatcherAgainstEmptySet 0

TestListApplicationRetriever

testGetApplicationListV0 0
testGetApplicationListV1 0.001
testGetApplicationListTooSmall 0
testConstructorAppIdParamContainNoNullsV1 0
testConstructorParamsContainNullsV1 0
testConstructorAppIdParamContainNullsV1 0
testConstructorPublicKeyParamContainNullsV1 0
testConstructorAppIdParamContainNoNullsV0 0
testConstructorParamsContainNullsV0 0
testConstructorAppIdParamContainNullsV0 0
testConstructorPublicKeyParamContainNullsV0 0

TestReaderApplicationRetriever

testProtocolVersion0 0.006
testProtocolVersion1 0.002
testProtocolVersion1BadMagic 0.003
testBadReaderThrowsCtorException 0

TestStringUtil

testSplitSimple 0
testSplitSimpleNoTrailingCloseBrace 0
testSplitWithCommaValues 0
testSplitWithNulls 0
testSplitWithTrailingComma 0.001
testSplitWithTrailingCommaNoTrailingBrace 0
testSplitEmpty 0
testSplitPartialEmpty 0
testSplitThrowsNoLeadingBrace 0
testArrayToString 0.001
testArrayToStringEncodesQuotes 0
testArrayToStringEncodesSemiTab 0
testRoundTripWithQuotes 0
testRoundTripWithTabs 0

TestTransportErrorCtors

testNullCodeCtor 0
testNullSingleMessageCtor 0
testNullStringArrayCtor 0
testStringArrayContainsNullCtor 0
testNullSingleStringCtor 0.001
testNullSecondStringCtor 0
testNullThirdStringCtor 0
testCtorWorks 0

TestTransportErrorMessageCode

testUnknownCode 0.005
testBadMagicCode 0

TestTransportErrorMessageParser

testParseSingle 0.004
testParseThrowsIfTooShort 0

TestTrustedApplications

testRoundTrip 0.097
testNonExpiry 0.101
testExpiry 0.317

TestTrustedApplicationUtils

testAddRequestParameters 0.002

TestUIDGenerator

testUidSanity 0.012

TestDefaultAuthenticator

testLogout 0.041
testLoginWithNoCustomCookiePath 0.005
testLoginWithCustomCookiePath 0.011
testGetUserChecksSessionFirst 0.005
testGetUserChecksCookieIfNoSession 0.003
testGetUserReturnsNullWithNoValidAuthentication 0.003
testGetUserBasicAuthRequiredButMissing 0.003
testGetUserBasicAuthProvided 0.005

TestNullSecurityController

testAlwaysOn 0

TestEncryptedCookieEncoder

testEncodePasswordCookieAndDecode 0.093
testDecodePasswordCookieBadText 0.002
testCannotCreateEncryptedCookieEncoderWithNullPassword 0

TestTrustedAppAuthenticatorImpl

testKnownAppProtocolVersion0 0.002
testKnownAppProtocolVersion1 0
testUnknownApp 0
testBlankAppId 0.001
testBadProtocolVersion 0
testMissingSecretKey 0
testMissingMagicNumber 0
testBadCertificate 0.003
testPrincipalNotFound 0
testPrincipalLoginDenied 0.001
testBadRequestIp 0.001
testBadXForwardIp 0
testBadRequestUrl 0.001

TestTrustedAppCertificateServerImpl

testCertificateServer 0.166
testCertificateServerWriterExceptionThrowsWrappedRuntimeEx 0.001

TestTrustedApplicationsFilter

testAuthenticatorResultCtor 0.001
testFilterLifecycle 0.048
testGetPathInfoNullContext 0.007
testGetPathInfoWithContext 0.001
testCertificateServerCalledForTrustURL 0.006
testAuthenticateCalledForNonCertURL 0.003
testSessionInvalidateCalledForNonCertURLWhenExceptionThrown 0.001
testSessionInvalidateNotCalledForNonCertURLWhenResultFailed 0.001
testSessionInvalidateNotCalledForNonCertURLWhenResultError 0.001
testSessionInvalidateNotCalledForNonCertURLWhenResultNoAttempt 0.002
testAythenticateNotCalledWhenAlreadyLoggedIn 0.001
testResultStatusSuccess 0
testResultStatusFailed 0
testResultStatusError 0
testResultStatusNoAttempt 0.001

TestTrustedApplicationsFilterAuthenticate

testKnownAppProtocolVersion0 0.099
testKnownAppProtocolVersion1 0.095
testUnknownApp 0
testBadCertificate 0.099
testBadRequestIp 0.098
testBadXForwardIp 0.098
testBadRequestUrl 0.098
testNoTrustedAppAttempt 0.001
testBadSecretKey 0.098
testBadPublicKey 0.095

TestLogoutServlet

testInternalLogoutPageCausesRedirectWithNoLogoutCalled 0.009
testExternalLogoutPageCausesLogoutAndRedirect 0

TestPathService

testParseRolesWorksWithSingleRole 0.017
testParseRolesPrefixingAndSuffixingSeparatorsShouldBeDiscarded 0.001
testParseRolesJustAQuoteShouldReturnEmptyArray 0
testParseRolesWorksWithExtraSpacesAndIsUserFriendlyEnough 0
testParseRolesAlsoWorksWithNewLinesAndTabs 0
testParseRolesWorksWithNoSpacesToo 0

TestWebworkService

testWithUnspecifiedActionsXmlFileParameter 0.027
testWithSpecifiedActionsXmlFileParameter 0.001
testWithSpecifiedActionExtensionsParameter 0.031

TestCookieUtils

testEncodeDecode 0.004

TestEncryptionUtils

testDecodeOffset 0
testEncodeOffset 0
testEncodePageNumber 0
testEncodePage0 0.001
testEncodePage1 0
testEncodePage2 0
testEncodePage3 0
testEncodeMultipleBytes 0
testDecode 0

TestPathMapper

testRemovePath 0.001

TestRedirectUtils

testRelativeLoginURLHasCorrectOSDestinationSet 0.02
testAbsoluteLoginURLHasCorrectOSDestinationSet 0.001
testRelativeLinkLoginURLHasCorrectOSDestinationSet 0
testAbsoluteLinkLoginURLHasCorrectOSDestinationSet 0
testOsDestinationKeepsOriginalValueWithLinkLoginURL 0
testOsDestinationKeepsOriginalValueWithLoginURL 0
testAppendPathToContext 0