fastlane-plugin-firebase_test_lab 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbd4e213b317e9e8d7f0d821ee886d7fbfda3d5db1d249989106386ed97a6946
4
- data.tar.gz: 790bff8ee421469632faa4bcbc7be9fcc2c8f313a00a2ec60e66845f72f3a88b
3
+ metadata.gz: a94d09a3da15a19b9bbef5ab63df267e07b813981be32c76743f7b5c9db68b51
4
+ data.tar.gz: 2b3f3e6d23b125d39fd4a532dbf38e0af34e7b6b03f2797b89ed6472528c26e1
5
5
  SHA512:
6
- metadata.gz: 8eccd6d0dedc8826b8f3f906049cfb51f7fb5c657d684eba7b3790deca284d8f826e42d48b0ce46089e96907dffb148245e5075044823650c0a79a1584081059
7
- data.tar.gz: 8fc304585e5f712912ad77c568ec899f619789189113fb7476014366ad3cf8da0c95ec93a849c306d70b3604267778db8d8ff7b664da3f40dc168ae6999c3d4f
6
+ metadata.gz: 30a62e9d815248e5e5f91d3d557a8b108b2b5137fc03314e35f9447cbfc24d7fcc42a16f10f45651917601ff4e74f1a2d42d8bf3a20ac7971282fd3abac2534f
7
+ data.tar.gz: 5c44f93b44dbc5e326e8ab596e07036c490c614c209fbd06fbb45beffc58f93cd56892c072f1e99cefe3a491b14e83abf9f18e16e5be9acfe0ba6879a4cdb155
data/README.md CHANGED
@@ -1,3 +1,7 @@
1
+ <p align="center">
2
+ <img src="./testlab.png" width="400" />
3
+ </p>
4
+
1
5
  # `Firebase Test Lab` plugin for _fastlane_
2
6
 
3
7
  This project is a [fastlane](https://fastlane.tools) plugin. You can add it to your _fastlane_ project by running
@@ -12,46 +16,51 @@ fastlane add_plugin firebase_test_lab
12
16
 
13
17
  ## About Firebase Test Lab plugin
14
18
 
15
- [Firebase Test Lab](https://firebase.google.com/docs/test-lab/) let you easily test your iOS app (Android support forthcoming) on a variety of real or virtual devices and configurations. This plugin allows you to submit your app to Firebase Test Lab by adding an action into Fastfile.
19
+ [Firebase Test Lab](https://firebase.google.com/docs/test-lab/) let you easily test your iOS app (Android support forthcoming) on a variety of real or virtual devices and configurations. This plugin allows you to submit your app to Firebase Test Lab by adding an action into your `Fastfile`.
16
20
 
17
21
  ## Getting started
18
22
 
19
23
  ### If you are not current user of Firebase
24
+
20
25
  You need to set up Firebase first. These only needs to be done once for an organization.
21
26
 
22
27
  - If you have not used Google Cloud before, you need to [create a new Google Cloud project](https://cloud.google.com/resource-manager/docs/creating-managing-projects#Creating%20a%20Project) first.
23
- - Go to the [Firebase Console](https://console.firebase.google.com/). Add Firebase into your Google Cloud project by clicking on "Add project" and then choose your just-created project..
28
+ - Go to the [Firebase Console](https://console.firebase.google.com/). Add Firebase into your Google Cloud project by clicking on "Add project" and then choose your just-created project.
24
29
 
25
30
  ### Configure Google credentials through service accounts
31
+
26
32
  To authenticate, Google Cloud credentials will need to be set for any machine where _fastlane_ and this plugin runs on.
27
33
 
28
34
  If you are running this plugin on Google Cloud [Compute Engine](https://cloud.google.com/compute), [Kubernetes Engine](https://cloud.google.com/kubernetes-engine) or [App Engine flexible environment](https://cloud.google.com/appengine/docs/flexible/), a default service account is automatically provisioned. You will not need to create a service account. See [this](https://cloud.google.com/compute/docs/access/service-accounts#compute_engine_default_service_account) for more details.
29
35
 
30
- In all other cases, you would need to configure the service account manually. You can follow [this guide](https://cloud.google.com/docs/authentication/getting-started) on how to create a new service account and create a key for it. You will need to set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to the service account key file according to the document.
36
+ In all other cases, you need to configure the service account manually. You can follow [this guide](https://cloud.google.com/docs/authentication/getting-started) on how to create a new service account and create a key for it. You will need to set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable pointing to the service account key file according to the document.
31
37
 
32
- No matter you are a using an automatically provisioned service account or a manually created one, the service account must be configured to have project editor role.
38
+ No matter if you are a using an automatically provisioned service account or a manually created one, the service account must be configured to have the project editor role.
33
39
 
34
40
  ### Enable relevant Google APIs
35
- - You need to enable the following APIs on your [Google Cloud API library](https://console.cloud.google.com/apis/library) (see [this](https://support.google.com/cloud/answer/6158841) for how):
41
+
42
+ - You need to enable the following APIs on your [Google Cloud API library](https://console.cloud.google.com/apis/library) (see [this](https://support.google.com/cloud/answer/6158841) for instructions how):
36
43
  1. Cloud Testing API
37
44
  2. Cloud Tool Results API
38
45
 
39
- ### Find out the devices you want to test on
46
+ ### Find the devices you want to test on
47
+
40
48
  If you have [gcloud tool](https://cloud.google.com/sdk/gcloud/), you can run
41
49
 
42
50
  ```no-highlight
43
51
  gcloud beta firebase test ios models list
44
52
  ```
45
- This will return a list of supported devices and their identifiers.
46
53
 
47
- All available devices can also be seen [here](https://firebase.google.com/docs/test-lab/ios/available-testing-devices).
54
+ to get a list of supported devices and their identifiers.
48
55
 
56
+ Alternatively all available devices can also be seen [here](https://firebase.google.com/docs/test-lab/ios/available-testing-devices).
49
57
 
50
58
  ## Actions
51
59
 
52
60
  ### `firebase_test_lab_ios_xctest`
53
61
 
54
62
  Submit your iOS app to Firebase Test Lab and run XCTest. Refer to [this document](https://firebase.google.com/docs/test-lab/ios/command-line) for more details about Firebase Test Lab specific arguments.
63
+
55
64
  ```ruby
56
65
  scan(
57
66
  scheme: 'YourApp', # XCTest scheme
@@ -76,13 +85,13 @@ firebase_test_lab_ios_xctest(
76
85
 
77
86
  **Available parameters:**
78
87
 
79
- - `app_path` You may provide a different path in the local filesystem (e.g: `/path/to/app-bundle.zip`) or on Google Cloud Storage (`gs://your-bucket/path/to/app-bundle.zip`) that points to an app bundle as specified [here](https://firebase.google.com/docs/test-lab/ios/command-line#build_xctests_for_your_app). If a Google Cloud Storage path is used, the service account must have read access to such file.
80
- - `gcp_project` The Google Cloud project name for Firebase Test Lab to run on.
81
- - `oauth_key_file_path` The path to the Google Cloud service account key. If not set, the default credential will be used.
82
- - `devices` An array of devices for your app to be tested on. Each device is represented as a hash, with ios_model_id, ios_version_id, locale and orientation properties, the first two of which are required. If not set, it will be defaulted to iPhone X on iOS 11.2. This array cannot be empty.
83
- - `async` If set to true, the action will not wait for the test results but exit immediately.
84
- - `timeout_sec` After how long will the test be abandoned by Firebase Test Lab. Duration hould be given in seconds.
85
- - `result_storage` Designate which location on Google Cloud Storage to store the test results. This should be a directory (e.g: `gs://your-bucket/tests/`)
88
+ - `app_path`: You may provide a different path in the local filesystem (e.g: `/path/to/app-bundle.zip`) or on Google Cloud Storage (`gs://your-bucket/path/to/app-bundle.zip`) that points to an app bundle as specified [here](https://firebase.google.com/docs/test-lab/ios/command-line#build_xctests_for_your_app). If a Google Cloud Storage path is used, the service account must have read access to such file.
89
+ - `gcp_project`: The Google Cloud project name for Firebase Test Lab to run on.
90
+ - `oauth_key_file_path`: The path to the Google Cloud service account key. If not set, the Google application default credential will be used.
91
+ - `devices`: An array of devices for your app to be tested on. Each device is represented as a ruby hash, with `ios_model_id`, `ios_version_id`, `locale` and `orientation` properties, the first two of which are required. If not set, it will default to iPhone X on iOS 11.2. This array cannot be empty.
92
+ - `async`: If set to true, the action will not wait for the test results but exit immediately.
93
+ - `timeout_sec`: After how long will the test be abandoned by Firebase Test Lab. Duration should be given in seconds.
94
+ - `result_storage`: Designate which location on Google Cloud Storage to store the test results. This should be a directory (e.g: `gs://your-bucket/tests/`)
86
95
 
87
96
  ## Issues and Feedback
88
97
 
@@ -14,8 +14,12 @@ module Fastlane
14
14
  end
15
15
 
16
16
  conf = Plist.parse_xml(xctestrun_files.first.get_input_stream)
17
- unless conf.size == 1
18
- UI.user_error!("The app bundle may contain only one scheme, #{conf.size} found")
17
+ size = conf.size
18
+ if conf['__xctestrun_metadata__']
19
+ size -= 1
20
+ end
21
+ unless size == 1
22
+ UI.user_error!("The app bundle may contain only one scheme, #{size} found")
19
23
  end
20
24
  _, scheme_conf = conf.first
21
25
  unless scheme_conf["IsUITestBundle"]
@@ -1,6 +1,6 @@
1
1
  module Fastlane
2
2
  module FirebaseTestLab
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  PLUGIN_NAME = "fastlane-plugin-firebase_test_lab"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-firebase_test_lab
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shihua Zheng
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-02 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday