@@ -39,7 +39,7 @@ class AppStartReportingStrategyTests: XCTestCase {
3939
4040 // MARK: - AttachToTransactionStrategy
4141
42- func testAttach_SetsMeasurementOnGlobalStatic ( ) throws {
42+ func testReport_whenColdStart_shouldSetMeasurementOnGlobalStatic ( ) throws {
4343 let measurement = createMeasurement ( type: . cold)
4444
4545 AttachToTransactionStrategy ( ) . report ( measurement)
@@ -49,7 +49,7 @@ class AppStartReportingStrategyTests: XCTestCase {
4949 XCTAssertEqual ( stored. duration, measurement. duration)
5050 }
5151
52- func testAttach_WarmStart_SetsMeasurementOnGlobalStatic ( ) throws {
52+ func testReport_whenWarmStart_shouldSetMeasurementOnGlobalStatic ( ) throws {
5353 let measurement = createMeasurement ( type: . warm)
5454
5555 AttachToTransactionStrategy ( ) . report ( measurement)
@@ -60,7 +60,7 @@ class AppStartReportingStrategyTests: XCTestCase {
6060
6161 // MARK: - StandaloneTransactionStrategy
6262
63- func testSendStandalone_SDKNotEnabled_DoesNotCaptureTransaction ( ) {
63+ func testReport_whenSDKNotEnabled_shouldNotCaptureTransaction ( ) {
6464 let hub = createHub ( )
6565 // Don't set hub on SDK — isEnabled returns false
6666 let measurement = createMeasurement ( type: . cold)
@@ -70,7 +70,7 @@ class AppStartReportingStrategyTests: XCTestCase {
7070 XCTAssertTrue ( hub. capturedEventsWithScopes. invocations. isEmpty)
7171 }
7272
73- func testSendStandalone_ColdStart_CapturesTransaction ( ) throws {
73+ func testReport_whenColdStart_shouldCaptureTransaction ( ) throws {
7474 let hub = createHub ( )
7575 SentrySDKInternal . setCurrentHub ( hub)
7676 let measurement = createMeasurement ( type: . cold)
@@ -86,7 +86,7 @@ class AppStartReportingStrategyTests: XCTestCase {
8686 XCTAssertEqual ( traceContext [ " origin " ] as? String , " auto.app.start " )
8787 }
8888
89- func testSendStandalone_WarmStart_CapturesTransaction ( ) throws {
89+ func testReport_whenWarmStart_shouldCaptureTransaction ( ) throws {
9090 let hub = createHub ( )
9191 SentrySDKInternal . setCurrentHub ( hub)
9292 let measurement = createMeasurement ( type: . warm)
@@ -101,7 +101,17 @@ class AppStartReportingStrategyTests: XCTestCase {
101101 XCTAssertEqual ( traceContext [ " op " ] as? String , " app.start.warm " )
102102 }
103103
104- func testSendStandalone_DoesNotSetGlobalStatic( ) {
104+ func testReport_whenUnknownStartType_shouldNotCaptureTransaction( ) {
105+ let hub = createHub ( )
106+ SentrySDKInternal . setCurrentHub ( hub)
107+ let measurement = createMeasurement ( type: . unknown)
108+
109+ StandaloneTransactionStrategy ( ) . report ( measurement)
110+
111+ XCTAssertTrue ( hub. capturedTransactionsWithScope. invocations. isEmpty)
112+ }
113+
114+ func testReport_whenColdStart_shouldNotSetGlobalStatic( ) {
105115 let hub = createHub ( )
106116 SentrySDKInternal . setCurrentHub ( hub)
107117 let measurement = createMeasurement ( type: . cold)
@@ -135,7 +145,7 @@ class AppStartReportingStrategyTests: XCTestCase {
135145 return hub
136146 }
137147
138- func testSendStandalone_ColdStart_AddsAppStartMeasurement ( ) throws {
148+ func testReport_whenColdStart_shouldAddAppStartMeasurement ( ) throws {
139149 let hub = setUpIntegrationHub ( )
140150 let measurement = createMeasurement ( type: . cold, duration: 0.5 )
141151
@@ -147,7 +157,7 @@ class AppStartReportingStrategyTests: XCTestCase {
147157 XCTAssertEqual ( appStartCold [ " value " ] as? Double , 500 )
148158 }
149159
150- func testSendStandalone_WarmStart_AddsAppStartMeasurement ( ) throws {
160+ func testReport_whenWarmStart_shouldAddAppStartMeasurement ( ) throws {
151161 let hub = setUpIntegrationHub ( )
152162 let measurement = createMeasurement ( type: . warm, duration: 0.3 )
153163
@@ -159,7 +169,7 @@ class AppStartReportingStrategyTests: XCTestCase {
159169 XCTAssertEqual ( appStartWarm [ " value " ] as? Double , 300 )
160170 }
161171
162- func testSendStandalone_AddsDebugMeta ( ) throws {
172+ func testReport_whenColdStart_shouldAddDebugMeta ( ) throws {
163173 let hub = setUpIntegrationHub ( )
164174 let measurement = createMeasurement ( type: . cold)
165175
@@ -175,7 +185,7 @@ class AppStartReportingStrategyTests: XCTestCase {
175185 XCTAssertEqual ( image [ " image_vmaddr " ] as? String , expectedImage. imageVmAddress)
176186 }
177187
178- func testSendStandalone_SetsStartTimeToAppStartTimestamp ( ) throws {
188+ func testReport_whenColdStart_shouldSetStartTimeToAppStartTimestamp ( ) throws {
179189 let hub = setUpIntegrationHub ( )
180190 let measurement = createMeasurement ( type: . cold)
181191
@@ -192,7 +202,7 @@ class AppStartReportingStrategyTests: XCTestCase {
192202
193203 /// Verifies the full span tree for a warm non-prewarmed standalone app start transaction.
194204 /// More span edge cases (cold, prewarmed, grouping span) are covered in SentryBuildAppStartSpansTests.
195- func testSendStandalone_WarmNotPrewarmed_ContainsCorrectSpans ( ) throws {
205+ func testReport_whenWarmNotPrewarmed_shouldContainCorrectSpans ( ) throws {
196206 let hub = setUpIntegrationHub ( )
197207 let dateProvider = TestCurrentDateProvider ( )
198208 let appStart = dateProvider. date ( )
@@ -254,28 +264,28 @@ class AppStartReportingStrategyTests: XCTestCase {
254264
255265 // MARK: - StandaloneAppStartTransactionHelper
256266
257- func testHelper_ColdStartWithAutoOrigin_ReturnsTrue ( ) {
267+ func testIsStandaloneAppStartTransaction_whenColdStartWithAutoOrigin_shouldReturnTrue ( ) {
258268 XCTAssertTrue ( StandaloneAppStartTransactionHelper . isStandaloneAppStartTransaction (
259269 operation: " app.start.cold " ,
260270 origin: " auto.app.start "
261271 ) )
262272 }
263273
264- func testHelper_WarmStartWithAutoOrigin_ReturnsTrue ( ) {
274+ func testIsStandaloneAppStartTransaction_whenWarmStartWithAutoOrigin_shouldReturnTrue ( ) {
265275 XCTAssertTrue ( StandaloneAppStartTransactionHelper . isStandaloneAppStartTransaction (
266276 operation: " app.start.warm " ,
267277 origin: " auto.app.start "
268278 ) )
269279 }
270280
271- func testHelper_UILoadWithAutoOrigin_ReturnsFalse ( ) {
281+ func testIsStandaloneAppStartTransaction_whenUILoadWithAutoOrigin_shouldReturnFalse ( ) {
272282 XCTAssertFalse ( StandaloneAppStartTransactionHelper . isStandaloneAppStartTransaction (
273283 operation: " ui.load " ,
274284 origin: " auto.app.start "
275285 ) )
276286 }
277287
278- func testHelper_ColdStartWithManualOrigin_ReturnsFalse ( ) {
288+ func testIsStandaloneAppStartTransaction_whenColdStartWithManualOrigin_shouldReturnFalse ( ) {
279289 XCTAssertFalse ( StandaloneAppStartTransactionHelper . isStandaloneAppStartTransaction (
280290 operation: " app.start.cold " ,
281291 origin: " manual "
0 commit comments