@@ -39,10 +39,32 @@ gem 'xcmonkey'
3939### To run a stress test
4040
4141``` bash
42- $ xcmonkey test --udid " 413EA256-CFFB-4312-94A6-12592BEE4CBA" --bundle-id " com.apple.Maps" --duration 100
43- 12:44:19.343: Device info: iPhone 14 Pro | 413EA256-CFFB-4312-94A6-12592BEE4CBA | Booted | simulator | iOS 16.2 | x86_64 | /tmp/idb/413EA256-CFFB-4312-94A6-12592BEE4CBA_companion.sock
42+ xcmonkey test --udid " 413EA256-CFFB-4312-94A6-12592BEE4CBA" --bundle-id " com.apple.Maps" --duration 100
43+
44+ 12:44:19.343: Device info: {
45+ " name" : " iPhone 14 Pro" ,
46+ " udid" : " 413EA256-CFFB-4312-94A6-12592BEE4CBA" ,
47+ " state" : " Booted" ,
48+ " type" : " simulator" ,
49+ " os_version" : " iOS 16.2" ,
50+ " architecture" : " x86_64" ,
51+ " path" : " /tmp/idb/413EA256-CFFB-4312-94A6-12592BEE4CBA_companion.sock" ,
52+ " is_local" : true,
53+ " companion" : " /tmp/idb/413EA256-CFFB-4312-94A6-12592BEE4CBA_companion.sock"
54+ }
4455
45- 12:44:22.550: App info: com.apple.Maps | Maps | system | arm64, x86_64 | Running | Not Debuggable | pid=74636
56+ 12:44:22.550: App info: {
57+ " bundle_id" : " com.apple.Maps" ,
58+ " name" : " Maps" ,
59+ " install_type" : " system" ,
60+ " architectures" : [
61+ " x86_64" ,
62+ " arm64"
63+ ],
64+ " process_state" : " Running" ,
65+ " debuggable" : false,
66+ " pid" : " 49186"
67+ }
4668
476912:44:23.203: Tap: {
4870 " x" : 53,
@@ -66,59 +88,29 @@ $ xcmonkey test --udid "413EA256-CFFB-4312-94A6-12592BEE4CBA" --bundle-id "com.a
6688### To repeat the stress test from generated session
6789
6890``` bash
69- $ xcmonkey repeat --session-path " ./xcmonkey-session.json"
70- 12:48:13.333: Device info: iPhone 14 Pro | 413EA256-CFFB-4312-94A6-12592BEE4CBA | Booted | simulator | iOS 16.2 | x86_64 | /tmp/idb/413EA256-CFFB-4312-94A6-12592BEE4CBA_companion.sock
71-
72- 12:48:16.542: App info: com.apple.Maps | Maps | system | arm64, x86_64 | Running | Not Debuggable | pid=73416
73-
74- 12:48:20.195: Tap: {
75- " x" : 53,
76- " y" : 749
77- }
78-
79- 12:48:20.404: Swipe (0.5s): {
80- " x" : 196,
81- " y" : 426
82- } => {
83- " x" : 143,
84- " y" : 447
85- }
86-
87- 12:48:21.155: Press (1.2s): {
88- " x" : 143,
89- " y" : 323
90- }
91+ xcmonkey repeat --session-path " ./xcmonkey-session.json"
9192```
9293
9394### To describe the required point
9495
9596``` bash
96- $ xcmonkey describe -x 20 -y 625 --udid " 413EA256-CFFB-4312-94A6-12592BEE4CBA"
97- 20:05:20.212: Device info: iPhone 14 Pro | 413EA256-CFFB-4312-94A6-12592BEE4CBA | Booted | simulator | iOS 16.2 | x86_64 | /tmp/idb/413EA256-CFFB-4312-94A6-12592BEE4CBA_companion.sock
98-
99- 20:05:21.713: x:20 y:625 point info: {
100- " AXFrame" : " {{19, 624.3}, {86, 130.6}}" ,
101- " AXUniqueId" : " ShortcutsRowCell" ,
102- " frame" : {
103- " y" : 624.3,
104- " x" : 19,
105- " width" : 86,
106- " height" : 130.6
107- },
108- " role_description" : " button" ,
109- " AXLabel" : " Home" ,
110- " content_required" : false,
111- " type" : " Button" ,
112- " title" : null,
113- " help" : null,
114- " custom_actions" : [
97+ xcmonkey describe -x 20 -y 625 --udid " 413EA256-CFFB-4312-94A6-12592BEE4CBA"
98+ ```
11599
116- ],
117- " AXValue" : " Add" ,
118- " enabled" : true,
119- " role" : " AXButton" ,
120- " subrole" : null
121- }
100+ ## [ fastlane] ( https://github.com/fastlane/fastlane ) integration
101+
102+ To run * xcmonkey* from * fastlane* , add the following code to your ` Fastfile ` :
103+
104+ ``` ruby
105+ require ' xcmonkey'
106+
107+ lane :test do
108+ Xcmonkey .new (
109+ udid: ' 413EA256-CFFB-4312-94A6-12592BEE4CBA' ,
110+ bundle_id: ' com.apple.Maps' ,
111+ duration: 100
112+ ).run
113+ end
122114```
123115
124116## Code of Conduct
0 commit comments