fastlane-plugin-android_testlab_script_swit 0.1.89 → 0.1.90
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffd38591b44817a97feff1ab5dd88b97ace94fd856325487429103004b9309eb
|
4
|
+
data.tar.gz: 256583798b43f0a30e756d9cfd6acb3b473d03c7f6b9bc4b994a16e5250d0dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba546f3c0bdb4a35ee019bf169158f4e066f30bfedbb1f9dd63a6072c306b3de8ea138b957eb1e5226e7c7b3a757aa159cf53c3fa18956b874948469699ab389
|
7
|
+
data.tar.gz: 64b0385cbd1182da0539ec72adc73e848544c19f68108696eda918d8f9d96b4112cc814305ca88effc9a0e51e9569fb7c7ad3750f662634304bf0d09359363c0
|
data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb
CHANGED
@@ -10,24 +10,26 @@ module Fastlane
|
|
10
10
|
|
11
11
|
# actions run
|
12
12
|
def self.run(params)
|
13
|
+
UI.message("********************************")
|
13
14
|
UI.message("Start Action")
|
15
|
+
UI.message(params[:gcloud_components_channel])
|
16
|
+
|
14
17
|
|
18
|
+
# Result Bucket & Dir
|
15
19
|
results_bucket = params[:firebase_test_lab_results_bucket] || "#{params[:project_id]}_test_results"
|
16
20
|
results_dir = params[:firebase_test_lab_results_dir] || "firebase_test_result_#{DateTime.now.strftime('%Y-%m-%d-%H:%M:%S')}"
|
17
21
|
|
18
|
-
# Set
|
22
|
+
# Set Target Project ID
|
19
23
|
Helper.config(params[:project_id])
|
20
24
|
|
21
25
|
# Activate service account
|
22
26
|
Helper.authenticate(params[:gcloud_key_file])
|
23
27
|
|
24
|
-
# RoboScriptOption
|
28
|
+
# RoboScriptOption
|
25
29
|
robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
|
26
30
|
|
27
|
-
#
|
31
|
+
# Swit PayLoad
|
28
32
|
new_payload = ""
|
29
|
-
|
30
|
-
UI.message(params[:gcloud_components_channel])
|
31
33
|
|
32
34
|
# Run Firebase Test Lab
|
33
35
|
Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
|
@@ -43,12 +45,11 @@ module Fastlane
|
|
43
45
|
"--format=json 1>#{Helper.if_need_dir(params[:console_log_file_name])}"
|
44
46
|
)
|
45
47
|
|
46
|
-
|
47
|
-
|
48
|
-
|
48
|
+
# Firebase Test Lab Result Json
|
49
|
+
resultJson = JSON.parse(File.read(params[:console_log_file_name]))
|
49
50
|
|
50
51
|
# 각 JSON 객체에 대해 반복
|
51
|
-
|
52
|
+
resultJson.each do |item|
|
52
53
|
# 정보 추출하기
|
53
54
|
axis_value = item["axis_value"]
|
54
55
|
outcome = item["outcome"]
|
@@ -61,20 +62,19 @@ module Fastlane
|
|
61
62
|
UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
|
62
63
|
|
63
64
|
params[:devices].each_with_index do |device, index|
|
64
|
-
|
65
|
-
|
66
|
-
new_payload += "{\"type\": \"rt_section\", \"indent\": 1, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Device#{index + 1}\"}]},
|
67
|
-
{\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
|
65
|
+
new_payload += "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Device#{index + 1}\"}]},
|
66
|
+
{\"type\": \"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"model : #{device[:model]}\"}]},
|
68
67
|
{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"OS Version : #{device[:version]}\"}]},
|
69
68
|
{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"locale : #{device[:locale]}\"}]},
|
70
69
|
{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"orientation : #{device[:orientation]}\"}]},
|
71
70
|
{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Result : #{outcome}\"}]}"
|
72
71
|
|
73
72
|
new_payload += "," unless index == params[:devices].length - 1
|
74
|
-
|
75
73
|
end
|
76
74
|
end
|
77
75
|
|
76
|
+
UI.message(new_payload)
|
77
|
+
|
78
78
|
# params[:devices].each_with_index do |device, index|
|
79
79
|
# new_payload += "{\"type\": \"rt_section\", \"indent\": 1, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Device#{index + 1}\"}]},
|
80
80
|
# {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
|
@@ -107,7 +107,9 @@ module Fastlane
|
|
107
107
|
# Swit Message
|
108
108
|
HTTParty.post(params[:swit_webhook_url], body: { body_text: swit_webhook_payload }.to_json, headers: { 'Content-Type' => 'application/json' })
|
109
109
|
|
110
|
+
UI.message("********************************")
|
110
111
|
UI.message("Finish Action")
|
112
|
+
UI.message("********************************")
|
111
113
|
end
|
112
114
|
|
113
115
|
# Short Detils
|