Skip to content

Commit 2c9b1dc

Browse files
authored
chore(geo): Add stress tests for Geo category (#2621)
* chore(geo): Add stress tests * Update tests * Add separate resources and test target for stress tests in CI/CD
1 parent 17196e0 commit 2c9b1dc

File tree

5 files changed

+365
-2
lines changed

5 files changed

+365
-2
lines changed

AmplifyPlugins/Geo/Tests/GeoHostApp/GeoHostApp.xcodeproj/project.pbxproj

Lines changed: 175 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
978B1D6429515FFB0079E55A /* AsyncTesting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 978B1D5E29515DEF0079E55A /* AsyncTesting.swift */; };
11+
978B1D6529515FFB0079E55A /* AsyncExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 978B1D5F29515DEF0079E55A /* AsyncExpectation.swift */; };
12+
978B1D6629515FFB0079E55A /* XCTestCase+AsyncTesting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 978B1D6029515DEF0079E55A /* XCTestCase+AsyncTesting.swift */; };
13+
97914B82295570E1002000EA /* AsyncTesting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 978B1D5E29515DEF0079E55A /* AsyncTesting.swift */; };
14+
97914B83295570E1002000EA /* AsyncExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 978B1D5F29515DEF0079E55A /* AsyncExpectation.swift */; };
15+
97914B84295570E1002000EA /* XCTestCase+AsyncTesting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 978B1D6029515DEF0079E55A /* XCTestCase+AsyncTesting.swift */; };
16+
97914B86295570E1002000EA /* TestConfigHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97DB82542823466800FC2228 /* TestConfigHelper.swift */; };
17+
97914B8F2955711A002000EA /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 97914B7829556F88002000EA /* README.md */; };
18+
97914B9029557126002000EA /* GeoStressTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97914B7029556F38002000EA /* GeoStressTests.swift */; };
1019
97AD223228230B98001AFCC1 /* GeoHostAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD223128230B98001AFCC1 /* GeoHostAppApp.swift */; };
1120
97AD223428230B98001AFCC1 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97AD223328230B98001AFCC1 /* ContentView.swift */; };
1221
97AD223628230B9A001AFCC1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97AD223528230B9A001AFCC1 /* Assets.xcassets */; };
@@ -20,6 +29,13 @@
2029
/* End PBXBuildFile section */
2130

2231
/* Begin PBXContainerItemProxy section */
32+
97914B80295570E1002000EA /* PBXContainerItemProxy */ = {
33+
isa = PBXContainerItemProxy;
34+
containerPortal = 97AD222628230B98001AFCC1 /* Project object */;
35+
proxyType = 1;
36+
remoteGlobalIDString = 97AD222D28230B98001AFCC1;
37+
remoteInfo = GeoHostApp;
38+
};
2339
97DB823F282339B700FC2228 /* PBXContainerItemProxy */ = {
2440
isa = PBXContainerItemProxy;
2541
containerPortal = 97AD222628230B98001AFCC1 /* Project object */;
@@ -30,6 +46,12 @@
3046
/* End PBXContainerItemProxy section */
3147

3248
/* Begin PBXFileReference section */
49+
978B1D5E29515DEF0079E55A /* AsyncTesting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncTesting.swift; sourceTree = "<group>"; };
50+
978B1D5F29515DEF0079E55A /* AsyncExpectation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncExpectation.swift; sourceTree = "<group>"; };
51+
978B1D6029515DEF0079E55A /* XCTestCase+AsyncTesting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "XCTestCase+AsyncTesting.swift"; sourceTree = "<group>"; };
52+
97914B7029556F38002000EA /* GeoStressTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeoStressTests.swift; sourceTree = "<group>"; };
53+
97914B7829556F88002000EA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
54+
97914B8E295570E1002000EA /* GeoStressTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GeoStressTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3355
97AD222E28230B98001AFCC1 /* GeoHostApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GeoHostApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
3456
97AD223128230B98001AFCC1 /* GeoHostAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GeoHostAppApp.swift; sourceTree = "<group>"; };
3557
97AD223328230B98001AFCC1 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
@@ -43,6 +65,13 @@
4365
/* End PBXFileReference section */
4466

4567
/* Begin PBXFrameworksBuildPhase section */
68+
97914B87295570E1002000EA /* Frameworks */ = {
69+
isa = PBXFrameworksBuildPhase;
70+
buildActionMask = 2147483647;
71+
files = (
72+
);
73+
runOnlyForDeploymentPostprocessing = 0;
74+
};
4675
97AD222B28230B98001AFCC1 /* Frameworks */ = {
4776
isa = PBXFrameworksBuildPhase;
4877
buildActionMask = 2147483647;
@@ -63,12 +92,33 @@
6392
/* End PBXFrameworksBuildPhase section */
6493

6594
/* Begin PBXGroup section */
95+
978B1D5D29515DEF0079E55A /* AsyncTesting */ = {
96+
isa = PBXGroup;
97+
children = (
98+
978B1D5E29515DEF0079E55A /* AsyncTesting.swift */,
99+
978B1D5F29515DEF0079E55A /* AsyncExpectation.swift */,
100+
978B1D6029515DEF0079E55A /* XCTestCase+AsyncTesting.swift */,
101+
);
102+
name = AsyncTesting;
103+
path = ../../../../../AmplifyAsyncTesting/Sources/AsyncTesting;
104+
sourceTree = "<group>";
105+
};
106+
97914B6F29556F38002000EA /* GeoStressTests */ = {
107+
isa = PBXGroup;
108+
children = (
109+
97914B7829556F88002000EA /* README.md */,
110+
97914B7029556F38002000EA /* GeoStressTests.swift */,
111+
);
112+
path = GeoStressTests;
113+
sourceTree = "<group>";
114+
};
66115
97AD222528230B98001AFCC1 = {
67116
isa = PBXGroup;
68117
children = (
69118
97DB824C28233F2B00FC2228 /* Packages */,
70119
97AD223028230B98001AFCC1 /* GeoHostApp */,
71120
97DB823C282339B700FC2228 /* AWSLocationGeoPluginIntegrationTests */,
121+
97914B6F29556F38002000EA /* GeoStressTests */,
72122
97AD222F28230B98001AFCC1 /* Products */,
73123
97DB824E2823417000FC2228 /* Frameworks */,
74124
);
@@ -79,13 +129,15 @@
79129
children = (
80130
97AD222E28230B98001AFCC1 /* GeoHostApp.app */,
81131
97DB823B282339B700FC2228 /* AWSLocationGeoPluginIntegrationTests.xctest */,
132+
97914B8E295570E1002000EA /* GeoStressTests.xctest */,
82133
);
83134
name = Products;
84135
sourceTree = "<group>";
85136
};
86137
97AD223028230B98001AFCC1 /* GeoHostApp */ = {
87138
isa = PBXGroup;
88139
children = (
140+
978B1D5D29515DEF0079E55A /* AsyncTesting */,
89141
97AD223128230B98001AFCC1 /* GeoHostAppApp.swift */,
90142
97AD223328230B98001AFCC1 /* ContentView.swift */,
91143
97AD223528230B9A001AFCC1 /* Assets.xcassets */,
@@ -130,6 +182,25 @@
130182
/* End PBXGroup section */
131183

132184
/* Begin PBXNativeTarget section */
185+
97914B7E295570E1002000EA /* GeoStressTests */ = {
186+
isa = PBXNativeTarget;
187+
buildConfigurationList = 97914B8B295570E1002000EA /* Build configuration list for PBXNativeTarget "GeoStressTests" */;
188+
buildPhases = (
189+
97914B81295570E1002000EA /* Sources */,
190+
97914B87295570E1002000EA /* Frameworks */,
191+
97914B88295570E1002000EA /* Resources */,
192+
97914B8A295570E1002000EA /* Copy Configuration Folder */,
193+
);
194+
buildRules = (
195+
);
196+
dependencies = (
197+
97914B7F295570E1002000EA /* PBXTargetDependency */,
198+
);
199+
name = GeoStressTests;
200+
productName = AWSLocationGeoPluginIntegrationTests;
201+
productReference = 97914B8E295570E1002000EA /* GeoStressTests.xctest */;
202+
productType = "com.apple.product-type.bundle.unit-test";
203+
};
133204
97AD222D28230B98001AFCC1 /* GeoHostApp */ = {
134205
isa = PBXNativeTarget;
135206
buildConfigurationList = 97AD223C28230B9A001AFCC1 /* Build configuration list for PBXNativeTarget "GeoHostApp" */;
@@ -178,7 +249,7 @@
178249
isa = PBXProject;
179250
attributes = {
180251
BuildIndependentTargetsInParallel = 1;
181-
LastSwiftUpdateCheck = 1320;
252+
LastSwiftUpdateCheck = 1400;
182253
LastUpgradeCheck = 1320;
183254
TargetAttributes = {
184255
97AD222D28230B98001AFCC1 = {
@@ -206,11 +277,20 @@
206277
targets = (
207278
97AD222D28230B98001AFCC1 /* GeoHostApp */,
208279
97DB823A282339B700FC2228 /* AWSLocationGeoPluginIntegrationTests */,
280+
97914B7E295570E1002000EA /* GeoStressTests */,
209281
);
210282
};
211283
/* End PBXProject section */
212284

213285
/* Begin PBXResourcesBuildPhase section */
286+
97914B88295570E1002000EA /* Resources */ = {
287+
isa = PBXResourcesBuildPhase;
288+
buildActionMask = 2147483647;
289+
files = (
290+
97914B8F2955711A002000EA /* README.md in Resources */,
291+
);
292+
runOnlyForDeploymentPostprocessing = 0;
293+
};
214294
97AD222C28230B98001AFCC1 /* Resources */ = {
215295
isa = PBXResourcesBuildPhase;
216296
buildActionMask = 2147483647;
@@ -231,6 +311,24 @@
231311
/* End PBXResourcesBuildPhase section */
232312

233313
/* Begin PBXShellScriptBuildPhase section */
314+
97914B8A295570E1002000EA /* Copy Configuration Folder */ = {
315+
isa = PBXShellScriptBuildPhase;
316+
buildActionMask = 2147483647;
317+
files = (
318+
);
319+
inputFileListPaths = (
320+
);
321+
inputPaths = (
322+
);
323+
name = "Copy Configuration Folder";
324+
outputFileListPaths = (
325+
);
326+
outputPaths = (
327+
);
328+
runOnlyForDeploymentPostprocessing = 0;
329+
shellPath = /bin/sh;
330+
shellScript = "TEMP_FILE=$HOME/.aws-amplify/amplify-ios/testconfiguration/.\nDEST_PATH=\"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/testconfiguration/\"\n\nif [[ ! -d $TEMP_FILE ]] ; then\n echo \"${TEMP_FILE} does not exist. Using empty configuration.\"\n exit 0\nfi\n \nif [[ -f $DEST_PATH ]] ; then\n rm $DEST_PATH\nfi\n \ncp -r $TEMP_FILE $DEST_PATH\n";
331+
};
234332
97DB82512823429C00FC2228 /* Copy Configuration Folder */ = {
235333
isa = PBXShellScriptBuildPhase;
236334
buildActionMask = 2147483647;
@@ -252,6 +350,18 @@
252350
/* End PBXShellScriptBuildPhase section */
253351

254352
/* Begin PBXSourcesBuildPhase section */
353+
97914B81295570E1002000EA /* Sources */ = {
354+
isa = PBXSourcesBuildPhase;
355+
buildActionMask = 2147483647;
356+
files = (
357+
97914B9029557126002000EA /* GeoStressTests.swift in Sources */,
358+
97914B82295570E1002000EA /* AsyncTesting.swift in Sources */,
359+
97914B83295570E1002000EA /* AsyncExpectation.swift in Sources */,
360+
97914B84295570E1002000EA /* XCTestCase+AsyncTesting.swift in Sources */,
361+
97914B86295570E1002000EA /* TestConfigHelper.swift in Sources */,
362+
);
363+
runOnlyForDeploymentPostprocessing = 0;
364+
};
255365
97AD222A28230B98001AFCC1 /* Sources */ = {
256366
isa = PBXSourcesBuildPhase;
257367
buildActionMask = 2147483647;
@@ -265,6 +375,9 @@
265375
isa = PBXSourcesBuildPhase;
266376
buildActionMask = 2147483647;
267377
files = (
378+
978B1D6429515FFB0079E55A /* AsyncTesting.swift in Sources */,
379+
978B1D6529515FFB0079E55A /* AsyncExpectation.swift in Sources */,
380+
978B1D6629515FFB0079E55A /* XCTestCase+AsyncTesting.swift in Sources */,
268381
97DB824728233A1D00FC2228 /* AWSLocationGeoPluginIntegrationTests.swift in Sources */,
269382
97DB82552823466800FC2228 /* TestConfigHelper.swift in Sources */,
270383
);
@@ -273,6 +386,11 @@
273386
/* End PBXSourcesBuildPhase section */
274387

275388
/* Begin PBXTargetDependency section */
389+
97914B7F295570E1002000EA /* PBXTargetDependency */ = {
390+
isa = PBXTargetDependency;
391+
target = 97AD222D28230B98001AFCC1 /* GeoHostApp */;
392+
targetProxy = 97914B80295570E1002000EA /* PBXContainerItemProxy */;
393+
};
276394
97DB8240282339B700FC2228 /* PBXTargetDependency */ = {
277395
isa = PBXTargetDependency;
278396
target = 97AD222D28230B98001AFCC1 /* GeoHostApp */;
@@ -281,6 +399,53 @@
281399
/* End PBXTargetDependency section */
282400

283401
/* Begin XCBuildConfiguration section */
402+
97914B8C295570E1002000EA /* Debug */ = {
403+
isa = XCBuildConfiguration;
404+
buildSettings = {
405+
BUNDLE_LOADER = "$(TEST_HOST)";
406+
CLANG_ENABLE_MODULES = YES;
407+
CODE_SIGN_STYLE = Automatic;
408+
CURRENT_PROJECT_VERSION = 1;
409+
GENERATE_INFOPLIST_FILE = YES;
410+
LD_RUNPATH_SEARCH_PATHS = (
411+
"$(inherited)",
412+
"@executable_path/Frameworks",
413+
"@loader_path/Frameworks",
414+
);
415+
MARKETING_VERSION = 1.0;
416+
PRODUCT_BUNDLE_IDENTIFIER = com.amazon.com.AWSLocationGeoPluginIntegrationTests;
417+
PRODUCT_NAME = "$(TARGET_NAME)";
418+
SWIFT_EMIT_LOC_STRINGS = NO;
419+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
420+
SWIFT_VERSION = 5.0;
421+
TARGETED_DEVICE_FAMILY = "1,2";
422+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GeoHostApp.app/GeoHostApp";
423+
};
424+
name = Debug;
425+
};
426+
97914B8D295570E1002000EA /* Release */ = {
427+
isa = XCBuildConfiguration;
428+
buildSettings = {
429+
BUNDLE_LOADER = "$(TEST_HOST)";
430+
CLANG_ENABLE_MODULES = YES;
431+
CODE_SIGN_STYLE = Automatic;
432+
CURRENT_PROJECT_VERSION = 1;
433+
GENERATE_INFOPLIST_FILE = YES;
434+
LD_RUNPATH_SEARCH_PATHS = (
435+
"$(inherited)",
436+
"@executable_path/Frameworks",
437+
"@loader_path/Frameworks",
438+
);
439+
MARKETING_VERSION = 1.0;
440+
PRODUCT_BUNDLE_IDENTIFIER = com.amazon.com.GeoStressTests;
441+
PRODUCT_NAME = "$(TARGET_NAME)";
442+
SWIFT_EMIT_LOC_STRINGS = NO;
443+
SWIFT_VERSION = 5.0;
444+
TARGETED_DEVICE_FAMILY = "1,2";
445+
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/GeoHostApp.app/GeoHostApp";
446+
};
447+
name = Release;
448+
};
284449
97AD223A28230B9A001AFCC1 /* Debug */ = {
285450
isa = XCBuildConfiguration;
286451
buildSettings = {
@@ -503,6 +668,15 @@
503668
/* End XCBuildConfiguration section */
504669

505670
/* Begin XCConfigurationList section */
671+
97914B8B295570E1002000EA /* Build configuration list for PBXNativeTarget "GeoStressTests" */ = {
672+
isa = XCConfigurationList;
673+
buildConfigurations = (
674+
97914B8C295570E1002000EA /* Debug */,
675+
97914B8D295570E1002000EA /* Release */,
676+
);
677+
defaultConfigurationIsVisible = 0;
678+
defaultConfigurationName = Release;
679+
};
506680
97AD222928230B98001AFCC1 /* Build configuration list for PBXProject "GeoHostApp" */ = {
507681
isa = XCConfigurationList;
508682
buildConfigurations = (

AmplifyPlugins/Geo/Tests/GeoHostApp/GeoHostApp.xcodeproj/xcshareddata/xcschemes/GeoHostApp.xcscheme

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,23 @@
3232
skipped = "NO">
3333
<BuildableReference
3434
BuildableIdentifier = "primary"
35-
BlueprintIdentifier = "97AD225F28231287001AFCC1"
35+
BlueprintIdentifier = "97DB823A282339B700FC2228"
3636
BuildableName = "AWSLocationGeoPluginIntegrationTests.xctest"
3737
BlueprintName = "AWSLocationGeoPluginIntegrationTests"
3838
ReferencedContainer = "container:GeoHostApp.xcodeproj">
3939
</BuildableReference>
4040
</TestableReference>
41+
<TestableReference
42+
skipped = "NO"
43+
parallelizable = "YES">
44+
<BuildableReference
45+
BuildableIdentifier = "primary"
46+
BlueprintIdentifier = "97914B6D29556F38002000EA"
47+
BuildableName = "GeoStressTests.xctest"
48+
BlueprintName = "GeoStressTests"
49+
ReferencedContainer = "container:GeoHostApp.xcodeproj">
50+
</BuildableReference>
51+
</TestableReference>
4152
</Testables>
4253
</TestAction>
4354
<LaunchAction
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1400"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
</BuildAction>
9+
<TestAction
10+
buildConfiguration = "Debug"
11+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
12+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
13+
shouldUseLaunchSchemeArgsEnv = "YES">
14+
<Testables>
15+
<TestableReference
16+
skipped = "NO">
17+
<BuildableReference
18+
BuildableIdentifier = "primary"
19+
BlueprintIdentifier = "97914B7E295570E1002000EA"
20+
BuildableName = "GeoStressTests.xctest"
21+
BlueprintName = "GeoStressTests"
22+
ReferencedContainer = "container:GeoHostApp.xcodeproj">
23+
</BuildableReference>
24+
</TestableReference>
25+
</Testables>
26+
</TestAction>
27+
<LaunchAction
28+
buildConfiguration = "Debug"
29+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
30+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
31+
launchStyle = "0"
32+
useCustomWorkingDirectory = "NO"
33+
ignoresPersistentStateOnLaunch = "NO"
34+
debugDocumentVersioning = "YES"
35+
debugServiceExtension = "internal"
36+
allowLocationSimulation = "YES">
37+
</LaunchAction>
38+
<ProfileAction
39+
buildConfiguration = "Release"
40+
shouldUseLaunchSchemeArgsEnv = "YES"
41+
savedToolIdentifier = ""
42+
useCustomWorkingDirectory = "NO"
43+
debugDocumentVersioning = "YES">
44+
</ProfileAction>
45+
<AnalyzeAction
46+
buildConfiguration = "Debug">
47+
</AnalyzeAction>
48+
<ArchiveAction
49+
buildConfiguration = "Release"
50+
revealArchiveInOrganizer = "YES">
51+
</ArchiveAction>
52+
</Scheme>

0 commit comments

Comments
 (0)