xcmonkey 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be0e0b66cbc58704452a6defce61d6bd9f7ba88f7489796f4b7cc6a4f4489a11
4
- data.tar.gz: 8551a6fd090f89cf20c2cd2e81bc8edc4856b9eb5516a50227db772cb0f013eb
3
+ metadata.gz: 4120e453b4d4dd2de48025fdaa6f9574fc4d2f26291f0978d75ce0d80bb077cf
4
+ data.tar.gz: ec6a5c2523b295e4b7dbbfda8a6daca0994a668ce35f9155a60ccbb804b58099
5
5
  SHA512:
6
- metadata.gz: 5f3e1fe8bb0bccfd056c9f7087c32c2cd06adee0d0dca6a7b7ba6b8e038130e8d0f991c1e3bcb8d4b7c6d1c9ad63a5ae1fa718e979baaa8ff8f41ba98ae03b56
7
- data.tar.gz: 1aabd404928c4cbc3e9d7a3fbe0c9f88ca155c25f745eb7e708cca7330a340740908343af231bc9fd9e5759d380f31816a920a53c40a6be6dbfa1916b50363db
6
+ metadata.gz: d776c2255920be8f49cb71186e98c4bef54ecbf71f8bf49873811b066b53d087e64349fce289e7ce335781813bd0182b866042e9193ef94e2c9f24b695d256df
7
+ data.tar.gz: 14273049c8e7ef2b58fa23fe526e4cefefa6e0fd0e09a998f0311c6ede270d84faeae1073d02cee2c75447cb726f5bafda5daab4e0edff18d168ddb2e0ca1899
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [1.3.1](https://github.com/alteral/xcmonkey/releases/tag/1.3.1)
6
+
7
+ _February 08, 2023_
8
+
9
+ ### ✅ Added
10
+
11
+ - Terminate app after test
12
+
5
13
  ## [1.3.0](https://github.com/alteral/xcmonkey/releases/tag/1.3.0)
6
14
 
7
15
  _January 29, 2023_
data/Gemfile CHANGED
@@ -11,10 +11,10 @@ gem 'fastlane'
11
11
  gem 'rake'
12
12
  gem 'rspec'
13
13
  gem 'rspec_junit_formatter'
14
- gem 'rubocop', '1.44.0'
14
+ gem 'rubocop', '1.44.1'
15
15
  gem 'rubocop-performance'
16
16
  gem 'rubocop-rake', '0.6.0'
17
17
  gem 'rubocop-require_tools'
18
- gem 'rubocop-rspec', '2.15.0'
18
+ gem 'rubocop-rspec', '2.18.1'
19
19
  gem 'simplecov'
20
20
  gem 'solargraph'
data/README.md CHANGED
@@ -113,24 +113,26 @@ The table below lists all options you can include on the `xcmonkey test` command
113
113
  | | `--exclude-taps` | Exclude taps from gestures list | `false` |
114
114
  | | `--exclude-swipes` | Exclude swipes from gestures list | `false` |
115
115
  | | `--exclude-presses` | Exclude presses from gestures list | `false` |
116
- | | `--disable-simulator-keyboard` | Should simulator keyboard be disable? | `false` |
117
- | **Debugging** | `--ignore-crashes` | Should app crashes be ignored? | `false` |
116
+ | | `--disable-simulator-keyboard` | Disable simulator keyboard | `false` |
117
+ | **Debugging** | `--ignore-crashes` | Ignore app crashes | `false` |
118
118
  | | `--throttle <milliseconds>` | Fixed delay between events | `0` |
119
119
 
120
120
  ## [fastlane](https://github.com/fastlane/fastlane) integration
121
121
 
122
- To run *xcmonkey* from *fastlane*, add the following code to your `Fastfile`:
122
+ To get started with *xcmonkey fastlane plugin*, add it to your project by running:
123
+
124
+ ```bash
125
+ fastlane add_plugin xcmonkey
126
+ ```
127
+
128
+ ### Usage
123
129
 
124
130
  ```ruby
125
- require 'xcmonkey'
126
-
127
- lane :test do
128
- Xcmonkey.new(
129
- event_count: 100,
130
- bundle_id: 'com.apple.Maps',
131
- udid: '413EA256-CFFB-4312-94A6-12592BEE4CBA'
132
- ).run
133
- end
131
+ bundle_id = 'com.apple.Maps'
132
+ device = 'iPhone 14 (16.2)'
133
+ sim = FastlaneCore::Simulator.all.detect { |d| device == "#{d.name} (#{d.os_version})") }
134
+
135
+ xcmonkey(udid: sim.udid, bundle_id: bundle_id)
134
136
  ```
135
137
 
136
138
  ## Code of Conduct
data/bin/xcmonkey CHANGED
@@ -23,8 +23,8 @@ class Xcmonkey
23
23
  c.option('--exclude-taps', 'Exclude taps from gestures list. Defaults to `false`')
24
24
  c.option('--exclude-swipes', 'Exclude swipes from gestures list. Defaults to `false`')
25
25
  c.option('--exclude-presses', 'Exclude presses from gestures list. Defaults to `false`')
26
- c.option('--ignore-crashes', 'Should app crashes be ignored? Defaults to `false`')
27
- c.option('--disable-simulator-keyboard', 'Should simulator keyboard be disable? Defaults to `false`')
26
+ c.option('--ignore-crashes', 'Ignore app crashes. Defaults to `false`')
27
+ c.option('--disable-simulator-keyboard', 'Disable simulator keyboard. Defaults to `false`')
28
28
  c.action do |_, options|
29
29
  params = {
30
30
  udid: options.udid,
data/fastlane/Fastfile CHANGED
@@ -10,7 +10,7 @@ lane :release do
10
10
  api_token: ENV.fetch("GITHUB_TOKEN", nil),
11
11
  name: version,
12
12
  tag_name: version,
13
- description: "See [CHANGELOG.md](https://github.com/alteral/xcmonkey/blob/main/CHANGELOG.md##{version.delete('.')}})",
13
+ description: "See [CHANGELOG.md](https://github.com/alteral/xcmonkey/blob/main/CHANGELOG.md##{version.delete('.')})",
14
14
  commitish: git_branch,
15
15
  upload_assets: [gem_path]
16
16
  )
@@ -56,6 +56,7 @@ class Driver
56
56
  checkup(counter)
57
57
  end
58
58
  save_session
59
+ terminate_app(bundle_id)
59
60
  end
60
61
 
61
62
  def repeat_monkey_test
@@ -77,6 +78,7 @@ class Driver
77
78
  end
78
79
  checkup(counter)
79
80
  end
81
+ terminate_app(bundle_id)
80
82
  end
81
83
 
82
84
  def checkup(counter)
@@ -1,3 +1,3 @@
1
1
  class Xcmonkey
2
- VERSION = '1.3.0'
2
+ VERSION = '1.3.1'
3
3
  end
data/spec/driver_spec.rb CHANGED
@@ -291,11 +291,6 @@ describe Driver do
291
291
  expect(driver.detect_app_in_background).to be(true)
292
292
  end
293
293
 
294
- it 'verifies that foregroung state can be determined' do
295
- driver.monkey_test_precondition
296
- expect(driver.detect_app_in_background).to be(false)
297
- end
298
-
299
294
  it 'verifies that xcmonkey behaves as expected on real devices' do
300
295
  udid = '1234-5678'
301
296
  driver = described_class.new(udid: udid, bundle_id: bundle_id)
@@ -317,11 +312,13 @@ describe Driver do
317
312
 
318
313
  it 'verifies that running apps are tracked on second entry with throttle' do
319
314
  driver = described_class.new(udid: udid, bundle_id: bundle_id, session_path: Dir.pwd, throttle: 1)
315
+ driver.launch_app(target_bundle_id: bundle_id)
320
316
  expect(driver).to receive(:track_running_apps)
321
317
  driver.checkup(1)
322
318
  end
323
319
 
324
320
  it 'verifies that running apps are not tracked on second entry without throttle' do
321
+ driver.launch_app(target_bundle_id: bundle_id)
325
322
  expect(driver).not_to receive(:track_running_apps)
326
323
  driver.checkup(1)
327
324
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcmonkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - alteral
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-29 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize