Skip to content

Commit

Permalink
docs: Added hypershard-ios setup tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Adamczyk authored and mergify-bot committed Apr 9, 2021
1 parent cc63b0f commit c71b6b8
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
61 changes: 61 additions & 0 deletions docs/hypershard_ios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# 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

1. Clone Github repository using
1. https - `git clone https://github.com/dropbox/hypershard-ios.git`
2. SSH - `git clone [email protected]:dropbox/hypershard-ios.git`
3. Github CLI - `gh repo clone dropbox/hypershard-ios`
2. Install swift if you are not using macOS
1. https://swift.org/download/#releases
3. Open Terminal/cmd
4. Change working directory to the path where you clone `hypershard-ios`
5. Build hyper shard-ios with command `swift build -c release`
6. It will build the binary into the `.build` folder
7. The resulting binary will be placed in the `.build/release/hypershard`.


### Running

1. Open Terminal/cmd

2. change the working directory to `.build/release` or add it to `PATH`

3. To run hypershard make CLI invocation with the command:

```bash
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

```bash
./hypershard EarlGreyExample test_projects/ios/EarlGreyExample/EarlGreyExampleSwiftTests
```

4. The output will be printed to console

```json
{"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"]}
```


5. If you would like to store the output to a file just add a path to the file with `--path` option

For example:

```bash
./hypershard EarlGreyExample test_projects/ios/EarlGreyExample/EarlGreyExampleSwiftTests --path results.json
```


### Resources

https://github.com/dropbox/hypershard-ios
3 changes: 3 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ nav:
- Domain: "https://github.com/Flank/flank/tree/master/test_runner/src/main/kotlin/ftl/domain#domain"
- Data: "https://github.com/Flank/flank/tree/master/test_runner/src/main/kotlin/ftl/data#data"
- Adapter: "https://github.com/Flank/flank/tree/master/test_runner/src/main/kotlin/ftl/adapter#adapter"
- Hypershard:
- iOS: hypershard_ios.md


theme:
name: material
Expand Down

0 comments on commit c71b6b8

Please sign in to comment.