Skip to content

removed cleanup methods #595

removed cleanup methods

removed cleanup methods #595

GitHub Actions / Xcode test results succeeded Oct 15, 2024 in 0s

Xcode test results

Testing workspace klaviyo-swift-sdk with scheme klaviyo-swift-sdk-Package

Summary

TotalSuccess PassedFailure FailedSkipped SkippedExpected Failure Expected Failure⏱️ Time
1341340001.78s

Test Summary

KlaviyoCoreTests

  • Device: iPhone 15 Pro, 17.2 (21C62)
  • SDK: Simulator - iOS 17.2, 17.2
TestTotalSuccessFailureSkippedExpected Failure
test-class ArchivalSystemTest11000
test-class ArchivalUtilsTests88000
test-class EncodableTests55000
test-class FileUtilsTests22000
test-class KlaviyoAPITests77000
test-class NetworkSessionTests33000

KlaviyoSwiftTests

  • Device: iPhone 15 Pro, 17.2 (21C62)
  • SDK: Simulator - iOS 17.2, 17.2
TestTotalSuccessFailureSkippedExpected Failure
test-class APIRequestErrorHandlingTests1515000
test-class AppLifeCycleEventsTests1111000
test-class EncodableTests11000
test-class KlaviyoEventTests11000
test-class KlaviyoModelsTest33000
test-class KlaviyoSDKTests1111000
test-class KlaviyoStateTests88000
test-class StateChangePublisherTests33000
test-class StateManagementEdgeCaseTests2828000
test-class StateManagementTests2525000

KlaviyoUITests

  • Device: iPhone 15 Pro, 17.2 (21C62)
  • SDK: Simulator - iOS 17.2, 17.2
TestTotalSuccessFailureSkippedExpected Failure
test-class KlaviyoUITests22000

Failure Failures

All tests passed 🎉


Code Coverage

Coverage Covered Executable
KlaviyoCoreTests 67.78 % 1161 1713
  PushBackground.swift 100.00 % 12 12
  PushTokenPayload.swift 93.33 % 42 45
  ProfilePayload.swift 100.00 % 44 44
  CreateEventPayload.swift 98.46 % 64 65
  KlaviyoEnvironment.swift 42.99 % 46 107
  FileUtilsTests.swift 84.78 % 39 46
  PrivateMethods.swift 0.00 % 0 6
  ArchivalUtilsTests.swift 100.00 % 128 128
  AppContextInfo.swift 53.25 % 41 77
  UnregisterPushTokenPayload.swift 100.00 % 48 48
  KlaviyoAPI.swift 77.59 % 45 58
  ArchivalUtils.swift 100.00 % 46 46
  AppLifeCycleEvents.swift 100.00 % 75 75
  KlaviyoRequest.swift 96.61 % 57 59
  SDKRequestIterator.swift 0.00 % 0 142
  FileUtils.swift 77.78 % 28 36
  TestUtils.swift 65.71 % 46 70
  EncodableTests.swift 100.00 % 44 44
  LoggerClient.swift 16.67 % 3 18
  PushEnablement.swift 100.00 % 14 14
  CreateProfilePayload.swift 100.00 % 3 3
  ReachabilitySwift.swift 15.74 % 37 235
  KlaviyoAPITests.swift 96.86 % 216 223
  NetworkSessionTests.swift 100.00 % 22 22
  NetworkSession.swift 62.82 % 49 78
  SimpleMockURLProtocol.swift 100.00 % 12 12
KlaviyoSwift 69.52 % 1877 2700
  Cancellation.swift 86.18 % 212 246
  Misc.swift 34.93 % 51 146
  Store.swift 59.63 % 192 322
  KlaviyoSwiftEnvironment.swift 68.75 % 11 16
  ConcurrencySupport.swift 3.03 % 4 132
  LifecycleEventsExtension.swift 100.00 % 12 12
  KlaviyoState.swift 76.79 % 301 392
  Event.swift 100.00 % 43 43
  StateChangePublisher.swift 43.18 % 19 44
  Profile.swift 100.00 % 28 28
  ProfileAPIExtension.swift 100.00 % 32 32
  Publisher.swift 46.15 % 66 143
  StateManagement.swift 93.95 % 466 496
  Klaviyo.swift 86.55 % 103 119
  Effect.swift 39.86 % 116 291
  Create.swift 90.21 % 129 143
  APIRequestErrorHandling.swift 96.84 % 92 95
KlaviyoSwiftExtension 0.00 % 0 0
KlaviyoSwiftTests 73.61 % 5753 7815
  KlaviyoEnvironment.swift 42.99 % 46 107
  NetworkSession.swift 62.82 % 49 78
  FileUtils.swift 77.78 % 28 36
  LoggerClient.swift 16.67 % 3 18
  KlaviyoTestUtils.swift 85.45 % 94 110
  SDKRequestIterator.swift 0.00 % 0 142
  Effect.swift 39.86 % 116 291
  Create.swift 90.21 % 129 143
  KlaviyoState.swift 76.79 % 301 392
  EventTests.swift 100.00 % 6 6
  Klaviyo.swift 86.55 % 103 119
  Event.swift 100.00 % 43 43
  TestData.swift 87.67 % 64 73
  Cancellation.swift 86.18 % 212 246
  ProfilePayload.swift 100.00 % 44 44
  Misc.swift 34.93 % 51 146
  KlaviyoStateTests.swift 95.71 % 201 210
  APIRequestErrorHandlingTests.swift 100.00 % 402 402
  APIRequestErrorHandling.swift 96.84 % 92 95
  StateChangePublisherTests.swift 99.18 % 242 244
  ArchivalUtils.swift 100.00 % 46 46
  PushEnablement.swift 100.00 % 14 14
  EncodableTests.swift 100.00 % 26 26
  PushBackground.swift 100.00 % 12 12
  StateManagementEdgeCaseTests.swift 100.00 % 447 447
  ProfileAPIExtension.swift 100.00 % 32 32
  Store.swift 59.63 % 192 322
  Publisher.swift 46.15 % 66 143
  StateManagementTests.swift 99.88 % 831 832
  CreateEventPayload.swift 98.46 % 64 65
  PrivateMethods.swift 0.00 % 0 6
  StateManagement.swift 93.95 % 466 496
  Profile.swift 100.00 % 28 28
  CreateProfilePayload.swift 100.00 % 3 3
  PushTokenPayload.swift 93.33 % 42 45
  TestStore.swift 36.50 % 388 1063
  LifecycleEventsExtension.swift 100.00 % 12 12
  KlaviyoSDKTests.swift 98.00 % 147 150
  KlaviyoRequest.swift 96.61 % 57 59
  AppContextInfo.swift 53.25 % 41 77
  KlaviyoModelsTest.swift 100.00 % 132 132
  AppLifeCycleEvents.swift 100.00 % 75 75
  KlaviyoAPI.swift 77.59 % 45 58
  ReachabilitySwift.swift 15.74 % 37 235
  UnregisterPushTokenPayload.swift 100.00 % 48 48
  StateChangePublisher.swift 43.18 % 19 44
  KlaviyoSwiftEnvironment.swift 68.75 % 11 16
  AppLifeCycleEventsTests.swift 96.03 % 242 252
  ConcurrencySupport.swift 3.03 % 4 132
KlaviyoUI 0.00 % 0 0
KlaviyoUITests 65.63 % 2553 3890
  SDKRequestIterator.swift 0.00 % 0 142
  ReachabilitySwift.swift 15.74 % 37 235
  StateChangePublisher.swift 43.18 % 19 44
  KlaviyoAPI.swift 77.59 % 45 58
  Cancellation.swift 86.18 % 212 246
  AppContextInfo.swift 53.25 % 41 77
  KlaviyoSwiftEnvironment.swift 68.75 % 11 16
  KlaviyoRequest.swift 96.61 % 57 59
  Event.swift 100.00 % 43 43
  ProfileAPIExtension.swift 100.00 % 32 32
  KlaviyoState.swift 76.79 % 301 392
  Publisher.swift 46.15 % 66 143
  Effect.swift 39.86 % 116 291
  CreateEventPayload.swift 98.46 % 64 65
  ConcurrencySupport.swift 3.03 % 4 132
  Create.swift 90.21 % 129 143
  LoggerClient.swift 16.67 % 3 18
  KlaviyoUITests.swift 100.00 % 22 22
  PushBackground.swift 100.00 % 12 12
  APIRequestErrorHandling.swift 96.84 % 92 95
  PushTokenPayload.swift 93.33 % 42 45
  Store.swift 59.63 % 192 322
  LifecycleEventsExtension.swift 100.00 % 12 12
  CreateProfilePayload.swift 100.00 % 3 3
  PrivateMethods.swift 0.00 % 0 6
  PushEnablement.swift 100.00 % 14 14
  ArchivalUtils.swift 100.00 % 46 46
  KlaviyoEnvironment.swift 42.99 % 46 107
  StateManagement.swift 93.95 % 466 496
  Profile.swift 100.00 % 28 28
  Misc.swift 34.93 % 51 146
  NetworkSession.swift 62.82 % 49 78
  FileUtils.swift 77.78 % 28 36
  ProfilePayload.swift 100.00 % 44 44
  AppLifeCycleEvents.swift 100.00 % 75 75
  UnregisterPushTokenPayload.swift 100.00 % 48 48
  Klaviyo.swift 86.55 % 103 119
Total 70.38 % 11344 16118

Details

Test Details

KlaviyoCoreTestsback

ArchivalSystemTest back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.02s
Successtest-method testArchiveUnarchive()

ArchivalUtilsTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testArchiveFails()
Successtest-method testArchiveUnarchive()
Successtest-method testArchiveWriteFails()
Successtest-method testUnarchive()
Successtest-method testUnarchiveInvalidData()
Successtest-method testUnarchiveUnableToRemoveFile()
Successtest-method testUnarchiveUnarchiveFails()
Successtest-method testUnarchiveWhereFileDoesNotExist()

EncodableTests back

SuccessFailureSkippedExpected Failure⏱️
5 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testEventPayload()
Successtest-method testKlaviyoRequest()
Successtest-method testProfilePayload()
Successtest-method testTokenPayload()
Successtest-method testUnregisterTokenPayload()

FileUtilsTests back

SuccessFailureSkippedExpected Failure⏱️
2 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testFilePathForData()
Successtest-method testRemoveItemWithError()

KlaviyoAPITests back

SuccessFailureSkippedExpected Failure⏱️
7 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testEncodingError()
Successtest-method testInvalidStatusCode()
Successtest-method testInvalidURL()
Successtest-method testNetworkError()
Successtest-method testSuccessfulResponseWithEvent()
Successtest-method testSuccessfulResponseWithProfile()
Successtest-method testSuccessfulResponseWithStoreToken()

NetworkSessionTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testCreateEmphemeralSesionHeaders()
Successtest-method testDefaultUserAgent()
Successtest-method testSessionDataTask()

KlaviyoSwiftTestsback

APIRequestErrorHandlingTests back

SuccessFailureSkippedExpected Failure⏱️
15 (100%)0 (0%)0 (0%)0 (0%)0.03s
Successtest-method testMissingOrInvalidResponse()
Successtest-method testRateLimitErrorWithExistingBackoffRetry()
Successtest-method testRateLimitErrorWithExistingRetry()
Successtest-method testRetryWithRetryAfter()
Successtest-method testSendRequestDataDecodingError()
Successtest-method testSendRequestFailureIncrementsRetryCount()
Successtest-method testSendRequestFailureWithBackoff()
Successtest-method testSendRequestHttpFailureDequesRequest()
Successtest-method testSendRequestHttpFailureForEmailResetsStateAndDequesRequest()
Successtest-method testSendRequestHttpFailureForPhoneNumberResetsStateAndDequesRequest()
Successtest-method testSendRequestInternalError()
Successtest-method testSendRequestInternalRequestError()
Successtest-method testSendRequestInvalidData()
Successtest-method testSendRequestMaxRetries()
Successtest-method testSendRequestUnknownError()

AppLifeCycleEventsTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testAppBackgroundGetsStopAction()
Successtest-method testAppBackgroundStopsReachability()
Successtest-method testAppBecomeActiveGetsStartAction()
Successtest-method testAppBecomesActiveStartsReachibility()
Successtest-method testAppTerminateGetsStopAction()
Successtest-method testAppTerminateStopsReachability()
Successtest-method testReachabilityNotificationStatusHandled()
Successtest-method testReachabilityStartFailureIsHandled()
Successtest-method testReachabilityStatusNilThenNotNil()
Successtest-method testReachaibilityNotificationGetsRightAction()
Successtest-method testStartReachabilityCalledOnSubscription()

EncodableTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testKlaviyoState()

KlaviyoEventTests back

SuccessFailureSkippedExpected Failure⏱️
1 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testOpenedPushEvent()

KlaviyoModelsTest back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testEmptyStringIdsConvertToNil()
Successtest-method testProfileModelConvertsToAPIModel()
Successtest-method testProfileWithNoIdsModelConvertsToAPIModel()

KlaviyoSDKTests back

SuccessFailureSkippedExpected Failure⏱️
11 (100%)0 (0%)0 (0%)0 (0%)1.00s
Successtest-method testCreateEvent()
Successtest-method testCreateEventFromDocumentation()
Successtest-method testHandlePushNotification()
Successtest-method testInitializeSDk()
Successtest-method testKlaviyoSDKInit()
Successtest-method testPropertyGetters()
Successtest-method testSetExternalId()
Successtest-method testSetFirstName()
Successtest-method testSetProfile()
Successtest-method testSetPushToken()
Successtest-method testUnhandlePushNotification()

KlaviyoStateTests back

SuccessFailureSkippedExpected Failure⏱️
8 (100%)0 (0%)0 (0%)0 (0%)0.01s
Successtest-method testBackgroundStates()
Successtest-method testFullKlaviyoStateEncodingDecodingIsEqual()
Successtest-method testLoadNewKlaviyoState()
Successtest-method testPushEnablementStates()
Successtest-method testSaveKlaviyoStateWithMissingApiKeyLogsError()
Successtest-method testStateFileExistsInvalidData()
Successtest-method testStateFileExistsInvalidJSON()
Successtest-method testValidStateFileExists()

StateChangePublisherTests back

SuccessFailureSkippedExpected Failure⏱️
3 (100%)0 (0%)0 (0%)0 (0%)0.00s
Successtest-method testQuickStateUpdatesTriggerOnlyOneSaves()
Successtest-method testStateChangeDuplicateAreRemoved()
Successtest-method testStateChangePublisher()

StateManagementEdgeCaseTests back

SuccessFailureSkippedExpected Failure⏱️
28 (100%)0 (0%)0 (0%)0 (0%)0.07s
Successtest-method testCompleteInitializationWhileAlreadyInitialized()
Successtest-method testCompleteInitializationWithExistingIdentifiers()
Successtest-method testEnqueueNonOpenedPushEventUninitializedDoesNotAddToPendingRequest()
Successtest-method testInitializeAfterInitialized()
Successtest-method testInitializeWhileInitializing()
Successtest-method testNetworkStatusChangedUninitialized()
Successtest-method testOpenedPushEventUninitializedAddsToPendingRequests()
Successtest-method testSendRequestBeforeInitialization()
Successtest-method testSetEmailMissingAnonymousIdStillSetsEmail()
Successtest-method testSetEmailUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetEmailWithWhiteSpace()
Successtest-method testSetEmptyEmail()
Successtest-method testSetEmptyExternalId()
Successtest-method testSetEmptyPhoneNumber()
Successtest-method testSetExternalIdMissingAnonymousIdStillSetsExternalId()
Successtest-method testSetExternalIdUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetExternalIdWithWhiteSpaces()
Successtest-method testSetPhoneNumberMissingApiKeyStillSetsPhoneNumber()
Successtest-method testSetPhoneNumberUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetPhoneNumberWithWhiteSpaces()
Successtest-method testSetProfileUnitialized()
Successtest-method testSetProfileWithEmptyStringIdentifiers()
Successtest-method testSetPushTokenUninitializedDoesNotAddToPendingRequest()
Successtest-method testSetPushTokenWithMissingAnonymousId()
Successtest-method testStartUninitialized()
Successtest-method testStopInitializing()
Successtest-method testStopUninitialized()
Successtest-method testTokenRequestMissingApiKey()

StateManagementTests back

SuccessFailureSkippedExpected Failure⏱️
25 (100%)0 (0%)0 (0%)0 (0%)0.06s
Successtest-method testEmptyQueueDoesNotFlush()
Successtest-method testEnqueueEvents()
Successtest-method testEnqueueEventWhenInitilizingSendsEvent()
Successtest-method testFlushQueueDuringExponentialBackoff()
Successtest-method testFlushQueueExponentialBackoffGoesToSize()
Successtest-method testFlushQueueWithMultipleRequests()
Successtest-method testFlushUninitializedQueueDoesNotFlush()
Successtest-method testFlushWithPendingProfile()
Successtest-method testInitializeSubscribesToAppropriatePublishers()
Successtest-method testInitialize()
Successtest-method testNetworkConnectivityChanges()
Successtest-method testQueueThatIsFlushingDoesNotFlush()
Successtest-method testSendRequestWhenNotFlushing()
Successtest-method testSendRequestWithNoRequestsInFlight()
Successtest-method testSetEmail()
Successtest-method testSetExternalId()
Successtest-method testSetPhoneNumber()
Successtest-method testSetProfileWithAllProfileIdentifiersAndProperties()
Successtest-method testSetProfileWithExistingProperties()
Successtest-method testSetPushEnablementChanged()
Successtest-method testSetPushEnablementPushTokenIsNil()
Successtest-method testSetPushTokenEnablementChanged()
Successtest-method testSetPushTokenMultipleTimes()
Successtest-method testSetPushToken()
Successtest-method testStopWithRequestsInFlight()

KlaviyoUITestsback

KlaviyoUITests back

SuccessFailureSkipped