Skip to content

Commit 12193d2

Browse files
authored
chore(storage): Add stress tests for Storage category (#2630)
* chore(storage): Add stress tests for Storage category * Add missing files * Add separate resources and test target for stress tests in CI/CD * Update config file name * Update README
1 parent 2c9b1dc commit 12193d2

File tree

6 files changed

+543
-2
lines changed

6 files changed

+543
-2
lines changed

AmplifyPlugins/Storage/Tests/StorageHostApp/AWSS3StoragePluginIntegrationTests/AWSS3StoragePluginBasicIntegrationTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class AWSS3StoragePluginBasicIntegrationTests: AWSS3StoragePluginTestBase {
335335
// XCTFail("Failed to get AWSS3StoragePlugin")
336336
// }
337337
// }
338-
338+
339339
// MARK: Helper functions
340340

341341
func removeIfExists(_ fileURL: URL) {

AmplifyPlugins/Storage/Tests/StorageHostApp/StorageHostApp.xcodeproj/project.pbxproj

Lines changed: 147 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
68828E4628C2736C006E7C0A /* AWSS3StoragePluginProgressTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684FB08C28BEAF8E00C8A6EB /* AWSS3StoragePluginProgressTests.swift */; };
2929
68828E4728C27745006E7C0A /* AWSS3StoragePluginPutDataResumabilityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684FB08828BEAF8E00C8A6EB /* AWSS3StoragePluginPutDataResumabilityTests.swift */; };
3030
68828E4828C2AAA6006E7C0A /* AWSS3StoragePluginGetDataResumabilityTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684FB08B28BEAF8E00C8A6EB /* AWSS3StoragePluginGetDataResumabilityTests.swift */; };
31+
97914BA32955798D002000EA /* AsyncTesting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 681DFEAF28E748270000C36A /* AsyncTesting.swift */; };
32+
97914BA52955798D002000EA /* AsyncExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 681DFEB028E748270000C36A /* AsyncExpectation.swift */; };
33+
97914BB02955798D002000EA /* XCTestCase+AsyncTesting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 681DFEB128E748270000C36A /* XCTestCase+AsyncTesting.swift */; };
34+
97914BB22955798D002000EA /* TestConfigHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684FB09D28BEAFE700C8A6EB /* TestConfigHelper.swift */; };
35+
97914BBB29557A52002000EA /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 97914BBA29557A52002000EA /* README.md */; };
36+
97914BBC29557A81002000EA /* StorageStressTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97914B972955797E002000EA /* StorageStressTests.swift */; };
37+
97914BBD29557AB6002000EA /* AWSS3StoragePluginTestBase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684FB07E28BEAF8E00C8A6EB /* AWSS3StoragePluginTestBase.swift */; };
38+
97914BBE29557DBD002000EA /* AuthSignInHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 684FB0C228BEB45600C8A6EB /* AuthSignInHelper.swift */; };
3139
B4A5B59B2919730700D873D2 /* Amplify in Frameworks */ = {isa = PBXBuildFile; productRef = B4A5B59A2919730700D873D2 /* Amplify */; };
3240
B4A5B59D2919730700D873D2 /* AWSCognitoAuthPlugin in Frameworks */ = {isa = PBXBuildFile; productRef = B4A5B59C2919730700D873D2 /* AWSCognitoAuthPlugin */; };
3341
B4A5B59F2919730700D873D2 /* AWSS3StoragePlugin in Frameworks */ = {isa = PBXBuildFile; productRef = B4A5B59E2919730700D873D2 /* AWSS3StoragePlugin */; };
@@ -41,6 +49,13 @@
4149
remoteGlobalIDString = 684FB06928BEAF1500C8A6EB;
4250
remoteInfo = StorageHostApp;
4351
};
52+
97914BA02955798D002000EA /* PBXContainerItemProxy */ = {
53+
isa = PBXContainerItemProxy;
54+
containerPortal = 684FB06228BEAF1500C8A6EB /* Project object */;
55+
proxyType = 1;
56+
remoteGlobalIDString = 684FB06928BEAF1500C8A6EB;
57+
remoteInfo = StorageHostApp;
58+
};
4459
/* End PBXContainerItemProxy section */
4560

4661
/* Begin PBXFileReference section */
@@ -69,6 +84,9 @@
6984
684FB0A928BEB07200C8A6EB /* AWSS3StoragePluginIntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AWSS3StoragePluginIntegrationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
7085
684FB0C228BEB45600C8A6EB /* AuthSignInHelper.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthSignInHelper.swift; sourceTree = "<group>"; };
7186
684FB0C528BEB84800C8A6EB /* StorageHostApp.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = StorageHostApp.entitlements; sourceTree = "<group>"; };
87+
97914B972955797E002000EA /* StorageStressTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StorageStressTests.swift; sourceTree = "<group>"; };
88+
97914BB92955798D002000EA /* StorageStressTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StorageStressTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
89+
97914BBA29557A52002000EA /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
7290
B4A5B5982919725100D873D2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
7391
B4A5B5992919727700D873D2 /* amplify-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "amplify-swift"; path = ../../../..; sourceTree = "<group>"; };
7492
/* End PBXFileReference section */
@@ -91,6 +109,13 @@
91109
);
92110
runOnlyForDeploymentPostprocessing = 0;
93111
};
112+
97914BB32955798D002000EA /* Frameworks */ = {
113+
isa = PBXFrameworksBuildPhase;
114+
buildActionMask = 2147483647;
115+
files = (
116+
);
117+
runOnlyForDeploymentPostprocessing = 0;
118+
};
94119
/* End PBXFrameworksBuildPhase section */
95120

96121
/* Begin PBXGroup section */
@@ -121,6 +146,7 @@
121146
684FB07B28BEAF5500C8A6EB /* Packages */,
122147
684FB07D28BEAF8E00C8A6EB /* AWSS3StoragePluginIntegrationTests */,
123148
684FB06C28BEAF1500C8A6EB /* StorageHostApp */,
149+
97914B962955797E002000EA /* StorageStressTests */,
124150
684FB06B28BEAF1500C8A6EB /* Products */,
125151
684FB0A028BEB02E00C8A6EB /* Frameworks */,
126152
);
@@ -131,6 +157,7 @@
131157
children = (
132158
684FB06A28BEAF1500C8A6EB /* StorageHostApp.app */,
133159
684FB0A928BEB07200C8A6EB /* AWSS3StoragePluginIntegrationTests.xctest */,
160+
97914BB92955798D002000EA /* StorageStressTests.xctest */,
134161
);
135162
name = Products;
136163
sourceTree = "<group>";
@@ -200,6 +227,15 @@
200227
path = Helpers;
201228
sourceTree = "<group>";
202229
};
230+
97914B962955797E002000EA /* StorageStressTests */ = {
231+
isa = PBXGroup;
232+
children = (
233+
97914BBA29557A52002000EA /* README.md */,
234+
97914B972955797E002000EA /* StorageStressTests.swift */,
235+
);
236+
path = StorageStressTests;
237+
sourceTree = "<group>";
238+
};
203239
/* End PBXGroup section */
204240

205241
/* Begin PBXNativeTarget section */
@@ -249,14 +285,35 @@
249285
productReference = 684FB0A928BEB07200C8A6EB /* AWSS3StoragePluginIntegrationTests.xctest */;
250286
productType = "com.apple.product-type.bundle.unit-test";
251287
};
288+
97914B9E2955798D002000EA /* StorageStressTests */ = {
289+
isa = PBXNativeTarget;
290+
buildConfigurationList = 97914BB62955798D002000EA /* Build configuration list for PBXNativeTarget "StorageStressTests" */;
291+
buildPhases = (
292+
97914BA12955798D002000EA /* Sources */,
293+
97914BB32955798D002000EA /* Frameworks */,
294+
97914BB42955798D002000EA /* Resources */,
295+
97914BB52955798D002000EA /* Copy Configuration */,
296+
);
297+
buildRules = (
298+
);
299+
dependencies = (
300+
97914B9F2955798D002000EA /* PBXTargetDependency */,
301+
);
302+
name = StorageStressTests;
303+
packageProductDependencies = (
304+
);
305+
productName = AWSS3StoragePluginIntegrationTests;
306+
productReference = 97914BB92955798D002000EA /* StorageStressTests.xctest */;
307+
productType = "com.apple.product-type.bundle.unit-test";
308+
};
252309
/* End PBXNativeTarget section */
253310

254311
/* Begin PBXProject section */
255312
684FB06228BEAF1500C8A6EB /* Project object */ = {
256313
isa = PBXProject;
257314
attributes = {
258315
BuildIndependentTargetsInParallel = 1;
259-
LastSwiftUpdateCheck = 1340;
316+
LastSwiftUpdateCheck = 1400;
260317
LastUpgradeCheck = 1340;
261318
TargetAttributes = {
262319
684FB06928BEAF1500C8A6EB = {
@@ -283,6 +340,7 @@
283340
targets = (
284341
684FB06928BEAF1500C8A6EB /* StorageHostApp */,
285342
684FB0A828BEB07200C8A6EB /* AWSS3StoragePluginIntegrationTests */,
343+
97914B9E2955798D002000EA /* StorageStressTests */,
286344
);
287345
};
288346
/* End PBXProject section */
@@ -304,6 +362,14 @@
304362
);
305363
runOnlyForDeploymentPostprocessing = 0;
306364
};
365+
97914BB42955798D002000EA /* Resources */ = {
366+
isa = PBXResourcesBuildPhase;
367+
buildActionMask = 2147483647;
368+
files = (
369+
97914BBB29557A52002000EA /* README.md in Resources */,
370+
);
371+
runOnlyForDeploymentPostprocessing = 0;
372+
};
307373
/* End PBXResourcesBuildPhase section */
308374

309375
/* Begin PBXShellScriptBuildPhase section */
@@ -327,6 +393,26 @@
327393
shellScript = "${PROJECT_DIR}/copy_configuration.sh\n";
328394
showEnvVarsInLog = 0;
329395
};
396+
97914BB52955798D002000EA /* Copy Configuration */ = {
397+
isa = PBXShellScriptBuildPhase;
398+
alwaysOutOfDate = 1;
399+
buildActionMask = 2147483647;
400+
files = (
401+
);
402+
inputFileListPaths = (
403+
);
404+
inputPaths = (
405+
);
406+
name = "Copy Configuration";
407+
outputFileListPaths = (
408+
);
409+
outputPaths = (
410+
);
411+
runOnlyForDeploymentPostprocessing = 0;
412+
shellPath = /bin/sh;
413+
shellScript = "${PROJECT_DIR}/copy_configuration.sh\n";
414+
showEnvVarsInLog = 0;
415+
};
330416
/* End PBXShellScriptBuildPhase section */
331417

332418
/* Begin PBXSourcesBuildPhase section */
@@ -363,6 +449,20 @@
363449
);
364450
runOnlyForDeploymentPostprocessing = 0;
365451
};
452+
97914BA12955798D002000EA /* Sources */ = {
453+
isa = PBXSourcesBuildPhase;
454+
buildActionMask = 2147483647;
455+
files = (
456+
97914BBE29557DBD002000EA /* AuthSignInHelper.swift in Sources */,
457+
97914BBD29557AB6002000EA /* AWSS3StoragePluginTestBase.swift in Sources */,
458+
97914BBC29557A81002000EA /* StorageStressTests.swift in Sources */,
459+
97914BA32955798D002000EA /* AsyncTesting.swift in Sources */,
460+
97914BA52955798D002000EA /* AsyncExpectation.swift in Sources */,
461+
97914BB02955798D002000EA /* XCTestCase+AsyncTesting.swift in Sources */,
462+
97914BB22955798D002000EA /* TestConfigHelper.swift in Sources */,
463+
);
464+
runOnlyForDeploymentPostprocessing = 0;
465+
};
366466
/* End PBXSourcesBuildPhase section */
367467

368468
/* Begin PBXTargetDependency section */
@@ -383,6 +483,11 @@
383483
target = 684FB06928BEAF1500C8A6EB /* StorageHostApp */;
384484
targetProxy = 684FB0AD28BEB07200C8A6EB /* PBXContainerItemProxy */;
385485
};
486+
97914B9F2955798D002000EA /* PBXTargetDependency */ = {
487+
isa = PBXTargetDependency;
488+
target = 684FB06928BEAF1500C8A6EB /* StorageHostApp */;
489+
targetProxy = 97914BA02955798D002000EA /* PBXContainerItemProxy */;
490+
};
386491
/* End PBXTargetDependency section */
387492

388493
/* Begin XCBuildConfiguration section */
@@ -594,6 +699,38 @@
594699
};
595700
name = Release;
596701
};
702+
97914BB72955798D002000EA /* Debug */ = {
703+
isa = XCBuildConfiguration;
704+
baseConfigurationReference = 0311113428EBED6500D58441 /* Tests.xcconfig */;
705+
buildSettings = {
706+
CURRENT_PROJECT_VERSION = 1;
707+
DEVELOPMENT_TEAM = "";
708+
GENERATE_INFOPLIST_FILE = YES;
709+
INFOPLIST_KEY_CFBundleDisplayName = IntegTests;
710+
MARKETING_VERSION = 1.0;
711+
PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.StorageStressTests;
712+
PRODUCT_NAME = "$(TARGET_NAME)";
713+
SWIFT_EMIT_LOC_STRINGS = NO;
714+
TARGETED_DEVICE_FAMILY = 1;
715+
};
716+
name = Debug;
717+
};
718+
97914BB82955798D002000EA /* Release */ = {
719+
isa = XCBuildConfiguration;
720+
baseConfigurationReference = 0311113428EBED6500D58441 /* Tests.xcconfig */;
721+
buildSettings = {
722+
CURRENT_PROJECT_VERSION = 1;
723+
DEVELOPMENT_TEAM = "";
724+
GENERATE_INFOPLIST_FILE = YES;
725+
INFOPLIST_KEY_CFBundleDisplayName = IntegTests;
726+
MARKETING_VERSION = 1.0;
727+
PRODUCT_BUNDLE_IDENTIFIER = com.aws.amplify.StorageStressTests;
728+
PRODUCT_NAME = "$(TARGET_NAME)";
729+
SWIFT_EMIT_LOC_STRINGS = NO;
730+
TARGETED_DEVICE_FAMILY = 1;
731+
};
732+
name = Release;
733+
};
597734
/* End XCBuildConfiguration section */
598735

599736
/* Begin XCConfigurationList section */
@@ -624,6 +761,15 @@
624761
defaultConfigurationIsVisible = 0;
625762
defaultConfigurationName = Release;
626763
};
764+
97914BB62955798D002000EA /* Build configuration list for PBXNativeTarget "StorageStressTests" */ = {
765+
isa = XCConfigurationList;
766+
buildConfigurations = (
767+
97914BB72955798D002000EA /* Debug */,
768+
97914BB82955798D002000EA /* Release */,
769+
);
770+
defaultConfigurationIsVisible = 0;
771+
defaultConfigurationName = Release;
772+
};
627773
/* End XCConfigurationList section */
628774

629775
/* Begin XCSwiftPackageProductDependency section */

AmplifyPlugins/Storage/Tests/StorageHostApp/StorageHostApp.xcodeproj/xcshareddata/xcschemes/StorageHostApp.xcscheme

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@
3838
ReferencedContainer = "container:StorageHostApp.xcodeproj">
3939
</BuildableReference>
4040
</TestableReference>
41+
<TestableReference
42+
skipped = "NO"
43+
parallelizable = "YES">
44+
<BuildableReference
45+
BuildableIdentifier = "primary"
46+
BlueprintIdentifier = "97914B942955797E002000EA"
47+
BuildableName = "StorageStressTests.xctest"
48+
BlueprintName = "StorageStressTests"
49+
ReferencedContainer = "container:StorageHostApp.xcodeproj">
50+
</BuildableReference>
51+
</TestableReference>
4152
</Testables>
4253
</TestAction>
4354
<LaunchAction
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 = "97914B9E2955798D002000EA"
20+
BuildableName = "StorageStressTests.xctest"
21+
BlueprintName = "StorageStressTests"
22+
ReferencedContainer = "container:StorageHostApp.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)