PR #165 #143
Xcode test results
Testing workspace klaviyo-swift-sdk with scheme klaviyo-swift-sdk-Package
Summary
Total | Passed | Failed | Skipped | Expected Failure | ⏱️ Time |
---|---|---|---|---|---|
121 | 113 | 8 | 0 | 0 | 3.87s |
Test Summary
KlaviyoSwiftTests
- Device: iPhone 14, 17.2 (21C62)
- SDK: Simulator - iOS 16.4, 16.4
Test | Total | ||||
---|---|---|---|---|---|
APIRequestErrorHandlingTests | 15 | 15 | 0 | 0 | 0 |
AppLifeCycleEventsTests | 11 | 11 | 0 | 0 | 0 |
ArchivalSystemTest | 1 | 1 | 0 | 0 | 0 |
ArchivalUtilsTests | 8 | 8 | 0 | 0 | 0 |
EncodableTests | 7 | 7 | 0 | 0 | 0 |
FileUtilsTests | 2 | 2 | 0 | 0 | 0 |
KlaviyoAPITests | 7 | 4 | 3 | 0 | 0 |
KlaviyoSwiftTests.xctest | 0 | 0 | 0 | 0 | 0 |
KlaviyoSDKTests | 11 | 11 | 0 | 0 | 0 |
KlaviyoStateTests | 8 | 4 | 4 | 0 | 0 |
NetworkSessionTests | 3 | 3 | 0 | 0 | 0 |
StateChangePublisherTests | 3 | 3 | 0 | 0 | 0 |
StateManagementEdgeCaseTests | 24 | 24 | 0 | 0 | 0 |
StateManagementTests | 21 | 20 | 1 | 0 | 0 |
Failures
KlaviyoSwiftTests/KlaviyoAPITests/testSuccessfulResponseWithEvent()
File | |
Issue Type | Assertion Failure |
Message | Test crashed with signal abrt. |
KlaviyoSwiftTests/KlaviyoAPITests/testSuccessfulResponseWithProfile()
File | |
Issue Type | Assertion Failure |
Message | Test crashed with signal abrt. |
KlaviyoSwiftTests/KlaviyoAPITests/testSuccessfulResponseWithStoreToken()
File | |
Issue Type | Assertion Failure |
Message | Test crashed with signal abrt. |
KlaviyoSwiftTests/KlaviyoStateTests/testLoadNewKlaviyoState()
File | /Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:78 |
Issue Type | Assertion Failure |
Message | failed - Snapshot does not match reference.
@− To configure output for a custom diff tool, like Kaleidoscope:
@@ −14,6 +14,6 @@
|
KlaviyoSwiftTests/KlaviyoStateTests/testStateFileExistsInvalidData()
File | /Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:94 |
Issue Type | Assertion Failure |
Message | failed - Snapshot does not match reference.
@− To configure output for a custom diff tool, like Kaleidoscope:
@@ −14,6 +14,6 @@
|
KlaviyoSwiftTests/KlaviyoStateTests/testStateFileExistsInvalidJSON()
File | /Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:109 |
Issue Type | Assertion Failure |
Message | failed - Snapshot does not match reference.
@− To configure output for a custom diff tool, like Kaleidoscope:
@@ −14,6 +14,6 @@
|
KlaviyoSwiftTests/KlaviyoStateTests/testValidStateFileExists()
File | /Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift:122 |
Issue Type | Assertion Failure |
Message | failed - Snapshot does not match reference.
@− To configure output for a custom diff tool, like Kaleidoscope:
@@ −14,6 +14,6 @@
|
KlaviyoSwiftTests/StateManagementTests/testFlushQueueExponentialBackoffGoesToSize()
File | /Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/StateManagementTests.swift:294 |
Issue Type | Assertion Failure |
Message | A state change does not match expectation: …
(Expected: −, Actual: +) |
Code Coverage
Details
Test Details
KlaviyoSwiftTests
APIRequestErrorHandlingTests
⏱️ | ||||
---|---|---|---|---|
15 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.01s |
AppLifeCycleEventsTests
⏱️ | ||||
---|---|---|---|---|
11 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.01s |
ArchivalSystemTest
⏱️ | ||||
---|---|---|---|---|
1 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.00s |
testArchiveUnarchive()
|
ArchivalUtilsTests
⏱️ | ||||
---|---|---|---|---|
8 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.00s |
EncodableTests
⏱️ | ||||
---|---|---|---|---|
7 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.01s |
testEventPayloadWithMetadata()
| |
testEventPayloadWithoutMetadata()
| |
testKlaviyoRequest()
| |
testKlaviyoState()
| |
testProfilePayload()
| |
testTokenPayload()
| |
testUnregisterTokenPayload()
|
FileUtilsTests
⏱️ | ||||
---|---|---|---|---|
2 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.00s |
testFilePathForData()
| |
testRemoveItemWithError()
|
KlaviyoAPITests
⏱️ | ||||
---|---|---|---|---|
4 (57%) | 3 (43%) | 0 (0%) | 0 (0%) | 0.00s |
testEncodingError()
| |
testInvalidStatusCode()
| |
testInvalidURL()
| |
testNetworkError()
| |
testSuccessfulResponseWithEvent()
| |
testSuccessfulResponseWithProfile()
| |
testSuccessfulResponseWithStoreToken()
|
KlaviyoSwiftTests.xctest
⏱️ | ||||
---|---|---|---|---|
0 (0%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.00s |
All tests passed 🎉
KlaviyoSDKTests
⏱️ | ||||
---|---|---|---|---|
11 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 3.72s |
KlaviyoStateTests
⏱️ | ||||
---|---|---|---|---|
4 (50%) | 4 (50%) | 0 (0%) | 0 (0%) | 0.02s |
testBackgroundStates()
| |
testFullKlaviyoStateEncodingDecodingIsEqual()
| |
testLoadNewKlaviyoState() Activities:
| |
testPushEnablementStates()
| |
testSaveKlaviyoStateWithMissingApiKeyLogsError()
| |
testStateFileExistsInvalidData() Activities:
| |
testStateFileExistsInvalidJSON() Activities:
| |
testValidStateFileExists() Activities:
|
NetworkSessionTests
⏱️ | ||||
---|---|---|---|---|
3 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.08s |
testCreateEmphemeralSesionHeaders()
| |
testDefaultUserAgent()
| |
testSessionDataTask()
|
StateChangePublisherTests
⏱️ | ||||
---|---|---|---|---|
3 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.00s |
testQuickStateUpdatesTriggerOnlyOneSaves()
| |
testStateChangeDuplicateAreRemoved()
| |
testStateChangePublisher()
|
StateManagementEdgeCaseTests
⏱️ | ||||
---|---|---|---|---|
24 (100%) | 0 (0%) | 0 (0%) | 0 (0%) | 0.02s |
StateManagementTests
⏱️ | ||||
---|---|---|---|---|
20 (95%) | 1 (5%) | 0 (0%) | 0 (0%) | 0.01s |
testEmptyQueueDoesNotFlush()
| |
testEnqueueEventWhenInitilizingSendsEvent()
| |
testEnqueueEvent()
| |
testFlushQueueDuringExponentialBackoff()
| |
testFlushQueueExponentialBackoffGoesToSize()
| |
testFlushQueueWithMultipleRequests()
| |
testFlushUninitializedQueueDoesNotFlush()
| |
testFlushWithPendingProfile()
| |
testInitializeSubscribesToAppropriatePublishers()
| |
testInitialize()
| |
testNetworkConnectivityChanges()
| |
testQueueThatIsFlushingDoesNotFlush()
| |
testSendRequestWhenNotFlushing()
| |
testSendRequestWithNoRequestsInFlight()
| |
testSetEmail()
| |
testSetExternalId()
| |
testSetPhoneNumber()
| |
testSetProfileWithExistingProperties()
| |
testSetPushTokenMultipleTimes()
| |
testSetPushToken()
| |
testStopWithRequestsInFlight()
|
Annotations
Check failure on line 78 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift
github-actions / Xcode test results
Assertion Failure
failed - Snapshot does not match reference.
@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testLoadNewKlaviyoState.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testLoadNewKlaviyoState.1.txt"
To configure output for a custom diff tool, like Kaleidoscope:
SnapshotTesting.diffTool = "ksdiff"
@@ −14,6 +14,6 @@
- pushTokenData: Optional<PushTokenData>.none
- queue: 0 elements
- requestsInFlight: 0 elements
▿ retryInfo: RetryInfo
− - retry: 0
+ - retry: 1
Check failure on line 94 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift
github-actions / Xcode test results
Assertion Failure
failed - Snapshot does not match reference.
@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testStateFileExistsInvalidData.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testStateFileExistsInvalidData.1.txt"
To configure output for a custom diff tool, like Kaleidoscope:
SnapshotTesting.diffTool = "ksdiff"
@@ −14,6 +14,6 @@
- pushTokenData: Optional<PushTokenData>.none
- queue: 0 elements
- requestsInFlight: 0 elements
▿ retryInfo: RetryInfo
− - retry: 0
+ - retry: 1
Check failure on line 109 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift
github-actions / Xcode test results
Assertion Failure
failed - Snapshot does not match reference.
@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testStateFileExistsInvalidJSON.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testStateFileExistsInvalidJSON.1.txt"
To configure output for a custom diff tool, like Kaleidoscope:
SnapshotTesting.diffTool = "ksdiff"
@@ −14,6 +14,6 @@
- pushTokenData: Optional<PushTokenData>.none
- queue: 0 elements
- requestsInFlight: 0 elements
▿ retryInfo: RetryInfo
− - retry: 0
+ - retry: 1
Check failure on line 122 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/KlaviyoStateTests.swift
github-actions / Xcode test results
Assertion Failure
failed - Snapshot does not match reference.
@−
"/Users/runner/work/klaviyo-swift-sdk/klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/__Snapshots__/KlaviyoStateTests/testValidStateFileExists.1.txt"
@+
"/Users/runner/Library/Developer/CoreSimulator/Devices/F121F282-D17F-4DD4-9F38-8261D6FE310F/data/tmp/KlaviyoStateTests/testValidStateFileExists.1.txt"
To configure output for a custom diff tool, like Kaleidoscope:
SnapshotTesting.diffTool = "ksdiff"
@@ −14,6 +14,6 @@
- pushTokenData: Optional<PushTokenData>.none
- queue: 0 elements
- requestsInFlight: 0 elements
▿ retryInfo: RetryInfo
− - retry: 0
+ - retry: 1
Check failure on line 294 in klaviyo-swift-sdk/Tests/KlaviyoSwiftTests/StateManagementTests.swift
github-actions / Xcode test results
Assertion Failure
A state change does not match expectation: …
KlaviyoState(
apiKey: "fake-key",
email: nil,
anonymousId: "00000000-0000-0000-0000-000000000001",
phoneNumber: nil,
externalId: nil,
pushTokenData: KlaviyoState.PushTokenData(…),
queue: [],
requestsInFlight: [],
initalizationState: KlaviyoState.InitializationState.initialized,
flushing: false,
flushInterval: 10.0,
− retryInfo: RetryInfo.retry(0)
+ retryInfo: RetryInfo.retry(1)
pendingRequests: [],
pendingProfile: nil
)
(Expected: −, Actual: +)