Skip to content

Commit 42507a6

Browse files
committed
Merge branch 'develop' into feature/apple
# Conflicts: # vendor/vendor-apple/base/src/main/kotlin/com/malinskiy/marathon/apple/xctestrun/TestRootFactory.kt
2 parents 015f7d1 + 5d68e88 commit 42507a6

File tree

6 files changed

+104
-208
lines changed

6 files changed

+104
-208
lines changed

docs/cloud/cli/parameters.md

+91-28
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,97 @@ title: "Parameters"
33
---
44

55
###
6-
You can find all the available marathon-cli parameters by running the command `marathon-cloud --help.`
7-
Below, you'll find a list of the parameters you can set.
6+
You can find all the available marathon-cli parameters by running the command `marathon-cloud help.`
7+
Below, you'll find a list of the commands and options you can set.
88

99
```bash
10-
marathon-cloud --help
11-
-app string
12-
application filepath. Required
13-
android example: /home/user/workspace/sample.apk
14-
ios example: /home/user/workspace/sample.zip
15-
-testapp string
16-
test apk file path. Required
17-
android example: /home/user/workspace/testSample.apk
18-
ios example: /home/user/workspace/sampleUITests-Runner.zip
19-
-platform string
20-
testing platform. Required
21-
possible values: "Android" or "iOS"
22-
-api-key string
23-
api-key for client. Required
24-
-os-version string
25-
Android or iOS OS version
26-
-link string
27-
link to commit
28-
-name string
29-
name for run, for example it could be description of commit
30-
-o string
31-
allure raw results output folder
32-
-system-image string
33-
OS-specific system image. For Android one of [default,google_apis]. For iOS only [default]
34-
-isolated bool
35-
Run each test using isolated execution. Default is false.
10+
--> marathon-cloud help
11+
12+
Command-line client for Marathon Cloud
13+
14+
Usage: marathon-cloud [OPTIONS] [COMMAND]
15+
16+
Commands:
17+
run Submit a test run
18+
download Download artifacts from a previous test run
19+
completions Output shell completion code for the specified shell (bash, zsh, fish)
20+
help Print this message or the help of the given subcommand(s)
21+
22+
Options:
23+
-v, --verbose... Increase logging verbosity
24+
-q, --quiet... Decrease logging verbosity
25+
-h, --help Print help
26+
-V, --version Print version
27+
28+
--> marathon-cloud run android -h
29+
30+
Run tests for Android
31+
32+
Usage: marathon-cloud run android [OPTIONS] --test-application <TEST_APPLICATION> --api-key <API_KEY>
33+
34+
Options:
35+
-a, --application <APPLICATION>
36+
application filepath, example: /home/user/workspace/sample.apk
37+
-t, --test-application <TEST_APPLICATION>
38+
test application filepath, example: /home/user/workspace/testSample.apk
39+
--os-version <OS_VERSION>
40+
OS version [10, 11, 12, 13]
41+
--system-image <SYSTEM_IMAGE>
42+
Runtime system image [possible values: default, google-apis]
43+
-v, --verbose...
44+
More output per occurrence
45+
-o, --output <OUTPUT>
46+
Output folder for test run results
47+
-q, --quiet...
48+
Less output per occurrence
49+
--isolated <ISOLATED>
50+
Run each test in isolation, i.e. isolated batching. [possible values: true, false]
51+
--filter-file <FILTER_FILE>
52+
Test filters supplied as a YAML file following the schema at https://docs.marathonlabs.io/runner/configuration/filtering/#filtering-logic. For iOS see also https://docs.marathonlabs.io/runner/next/ios#test-plans
53+
--wait
54+
Wait for test run to finish if true, exits after triggering a run if false
55+
--name <NAME>
56+
name for run, for example it could be description of commit
57+
--link <LINK>
58+
link to commit
59+
--api-key <API_KEY>
60+
Marathon Cloud API key [env: MARATHON_CLOUD_API_KEY=]
61+
--base-url <BASE_URL>
62+
Base url for Marathon Cloud API [default: https://cloud.marathonlabs.io/api/v1]
63+
-h, --help
64+
Print help
65+
66+
--> marathon-cloud run ios -h
67+
68+
Run tests for iOS
69+
70+
Usage: marathon-cloud run ios [OPTIONS] --application <APPLICATION> --test-application <TEST_APPLICATION> --api-key <API_KEY>
71+
72+
Options:
73+
-a, --application <APPLICATION>
74+
application filepath, example: /home/user/workspace/sample.zip
75+
-t, --test-application <TEST_APPLICATION>
76+
test application filepath, example: /home/user/workspace/sampleUITests-Runner.zip
77+
-o, --output <OUTPUT>
78+
Output folder for test run results
79+
--isolated <ISOLATED>
80+
Run each test in isolation, i.e. isolated batching. [possible values: true, false]
81+
-v, --verbose...
82+
More output per occurrence
83+
--filter-file <FILTER_FILE>
84+
Test filters supplied as a YAML file following the schema at https://docs.marathonlabs.io/runner/configuration/filtering/#filtering-logic. For iOS see also https://docs.marathonlabs.io/runner/next/ios#test-plans
85+
-q, --quiet...
86+
Less output per occurrence
87+
--wait
88+
Wait for test run to finish if true, exits after triggering a run if false
89+
--name <NAME>
90+
name for run, for example it could be description of commit
91+
--link <LINK>
92+
link to commit
93+
--api-key <API_KEY>
94+
Marathon Cloud API key [env: MARATHON_CLOUD_API_KEY=]
95+
--base-url <BASE_URL>
96+
Base url for Marathon Cloud API [default: https://cloud.marathonlabs.io/api/v1]
97+
-h, --help
98+
Print help
3699
```

docs/cloud/cloud/getting-started.md

-145
This file was deleted.

docs/cloud/cloud/overview.md

-26
This file was deleted.

docs/cloud/index.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import TabItem from '@theme/TabItem';
33

44
# Quick start
55

6+
67
### Install
78
The installation can be performed using [Homebrew](https://brew.sh/). Here’s how to add the MarathonLabs repository:
89
```shell
@@ -64,13 +65,15 @@ Now you can start running your tests. Use the following command to execute the C
6465
<TabItem value="iOS" label="iOS">
6566

6667
```shell
67-
marathon-cloud -api_key generated_api_key -apk sample.zip -testapk sampleUITests-Runner.zip -platform iOS
68+
export MARATHON_CLOUD_API_KEY=generated_api_key
69+
marathon-cloud run ios --application sample.zip --test-application sampleUITests-Runner.zip
6870
```
6971
</TabItem>
7072
<TabItem value="Android" label="Android">
7173

7274
```shell
73-
marathon-cloud -api_key api_key -apk app.apk -testapk appTest.apk -platform Android
75+
export MARATHON_CLOUD_API_KEY=generated_api_key
76+
marathon-cloud run android --application app.apk --test-application appTest.apk
7477
```
7578
</TabItem>
7679
</Tabs>

docs/cloud/intro/ios.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ Let's say our project is called "Sample". The code snippet below shows how to bu
2222
# |--sample.xcodeproj
2323

2424
xcodebuild build-for-testing \
25-
-project sample.xcodeproj \
26-
-scheme sample \
27-
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.1' \
28-
-derivedDataPath ./build
25+
-project sample.xcodeproj \
26+
-scheme sample \
27+
-destination 'platform=iOS Simulator,name=iPhone 14,OS=16.1' \
28+
-derivedDataPath ./build
2929
```
3030

3131
Note the relative paths of applications, as they will be required for running the tests. In the context of our example and `debug` build, these files can be located at the following paths:

vendor/vendor-apple/base/src/main/kotlin/com/malinskiy/marathon/apple/xctestrun/TestRootFactory.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,14 @@ class TestRootFactory(
8282
val userFrameworkPath =
8383
xctestrunEnv["DYLD_FRAMEWORK_PATH"]?.split(":")?.filter { it.isNotBlank() } ?: emptySet()
8484
val userLibraryPath = xctestrunEnv["DYLD_LIBRARY_PATH"]?.split(":")?.filter { it.isNotBlank() } ?: emptySet()
85+
val userInsertLibraries = xctestrunEnv["DYLD_INSERT_LIBRARIES"]?.split(":")?.filter { it.isNotBlank() } ?: emptySet()
8586

8687
val dyldFrameworks = mutableListOf("__TESTROOT__", frameworks, privateFrameworks, *userFrameworkPath.toTypedArray())
8788
val dyldLibraries = listOf("__TESTROOT__", usrLib, *userLibraryPath.toTypedArray())
8889
val dyldInsertLibraries = if (useLibParseTests) {
89-
listOf(remoteFileManager.remoteXctestParserFile())
90+
listOf(remoteFileManager.remoteXctestParserFile(), *userInsertLibraries.toTypedArray())
9091
} else {
91-
emptyList()
92+
listOf(*userInsertLibraries.toTypedArray())
9293
}
9394

9495
/**
@@ -105,7 +106,7 @@ class TestRootFactory(
105106
"DYLD_INSERT_LIBRARIES" to dyldInsertLibraries.joinToString(":")
106107
).apply {
107108
xctestrunEnv
108-
.filterKeys { !setOf("DYLD_FRAMEWORK_PATH", "DYLD_LIBRARY_PATH").contains(it) }
109+
.filterKeys { !setOf("DYLD_FRAMEWORK_PATH", "DYLD_LIBRARY_PATH", "DYLD_INSERT_LIBRARIES").contains(it) }
109110
.forEach {
110111
put(it.key, it.value)
111112
}

0 commit comments

Comments
 (0)