Hypershard iOS
This is a step-by-step guide of using Hypershard for companies that are unable to use symbol table dumping on iOS.
Installation
- Clone Github repository using
- https -
git clone https://github.com/dropbox/hypershard-ios.git
- SSH -
git clone git@github.com:dropbox/hypershard-ios.git
- Github CLI -
gh repo clone dropbox/hypershard-ios
- https -
- Install swift if you are not using macOS
- https://swift.org/download/#releases
- Open Terminal/cmd
- Change working directory to the path where you clone
hypershard-ios
- Build hyper shard-ios with command
swift build -c release
- It will build the binary into the
.build
folder - The resulting binary will be placed in the
.build/release/hypershard
.
Running
-
Open Terminal/cmd
-
change the working directory to
.build/release
or add it toPATH
-
To run hypershard make CLI invocation with the command:
hypershard TEST_TARGET_NAME ROOT_PATH
where
- `TEST_TARGET_NAME` - the name of the Xcode test target containing the UI tests
- `ROOT_PATH` - either a path where all the `XCUITest`s classes are stored, or the path of the Xcode project containing `TEST_TARGET_NAME`
for example based on Flank test project
./hypershard EarlGreyExample test_projects/ios/EarlGreyExample/EarlGreyExampleSwiftTests
- The output will be printed to console
{"path":"","phase":"XCUI test shard","env":{},"cmd":"","tests":["EarlGreyExample.EarlGreyExampleSwiftTests.testThatThrows","EarlGreyExample.EarlGreyExampleSwiftTests.testBasicSelection","EarlGreyExample.EarlGreyExampleSwiftTests.testBasicSelectionAndAction","EarlGreyExample.EarlGreyExampleSwiftTests.testBasicSelectionAndAssert","EarlGreyExample.EarlGreyExampleSwiftTests.testBasicSelectionActionAssert","EarlGreyExample.EarlGreyExampleSwiftTests.testSelectionOnMultipleElements","EarlGreyExample.EarlGreyExampleSwiftTests.testCollectionMatchers","EarlGreyExample.EarlGreyExampleSwiftTests.testWithInRoot","EarlGreyExample.EarlGreyExampleSwiftTests.testWithCustomMatcher","EarlGreyExample.EarlGreyExampleSwiftTests.testTableCellOutOfScreen","EarlGreyExample.EarlGreyExampleSwiftTests.testCatchErrorOnFailure","EarlGreyExample.EarlGreyExampleSwiftTests.testCustomAction","EarlGreyExample.EarlGreyExampleSwiftTests.testWithCustomAssertion","EarlGreyExample.EarlGreyExampleSwiftTests.testWithCustomFailureHandler","EarlGreyExample.EarlGreyExampleSwiftTests.testLayout","EarlGreyExample.EarlGreyExampleSwiftTests.testWithCondition","EarlGreyExample.EarlGreyExampleSwiftTests.testWithGreyAssertions"]}
- If you would like to store the output to a file just add a path to the file with
--path
option
For example:
./hypershard EarlGreyExample test_projects/ios/EarlGreyExample/EarlGreyExampleSwiftTests --path results.json
Resources
https://github.com/dropbox/hypershard-ios