fastlane-plugin-android_testlab_script_swit 0.1.66 → 0.1.68
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: ab2d06f8f46d0f57fcfb581b5623a83aacc627943aa505763b354db647005241
|
4
|
+
data.tar.gz: d9e45a53bfb9bc86e1526d9334e8a180ed04c5d381ed906b4b57b24119aeb93c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da3155e154b6db9535e693dc2b303edb68450539ee9db4681b92cea71e14033adb43e3ca99ef51b28f9d2d5388d8358db50fe76c8502f85a3e0fc3bfaa1e62a9
|
7
|
+
data.tar.gz: ed46c5bd25377e776f935ea6ffd90edc660f371220ac312d61a432a122d31c49befbda652df8c6d47719da35829ca080bc420844501be188d4dff3153b519af5
|
data/lib/fastlane/plugin/android_testlab_script_swit/actions/android_testlab_script_swit_action.rb
CHANGED
@@ -27,42 +27,42 @@ module Fastlane
|
|
27
27
|
UI.message(params[:gcloud_components_channel])
|
28
28
|
|
29
29
|
# Run Firebase Test Lab
|
30
|
-
Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
|
31
|
-
"--app #{params[:app_apk]} "\
|
32
|
-
"#{"--test #{params[:app_test_apk]} " unless params[:app_test_apk].nil?}"\
|
33
|
-
"#{"--use-orchestrator " if params[:type] == "instrumentation" && params[:use_orchestrator]}"\
|
34
|
-
"#{params[:devices].map { |d| "--device model=#{d[:model]},version=#{d[:version]},locale=#{d[:locale]},orientation=#{d[:orientation]} " }.join}"\
|
35
|
-
"--timeout #{params[:timeout]} "\
|
36
|
-
"--results-bucket #{results_bucket} "\
|
37
|
-
"--results-dir #{results_dir} "\
|
38
|
-
"#{params[:extra_options]} "\
|
39
|
-
"#{robo_script_option}"\
|
40
|
-
"--format=json 1>#{Helper.if_need_dir(params[:console_log_file_name])}"
|
41
|
-
)
|
42
|
-
|
43
|
-
json = JSON.parse(File.read(params[:console_log_file_name]))
|
44
|
-
UI.message("Test status: #{json}")
|
30
|
+
# Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
|
31
|
+
# "--app #{params[:app_apk]} "\
|
32
|
+
# "#{"--test #{params[:app_test_apk]} " unless params[:app_test_apk].nil?}"\
|
33
|
+
# "#{"--use-orchestrator " if params[:type] == "instrumentation" && params[:use_orchestrator]}"\
|
34
|
+
# "#{params[:devices].map { |d| "--device model=#{d[:model]},version=#{d[:version]},locale=#{d[:locale]},orientation=#{d[:orientation]} " }.join}"\
|
35
|
+
# "--timeout #{params[:timeout]} "\
|
36
|
+
# "--results-bucket #{results_bucket} "\
|
37
|
+
# "--results-dir #{results_dir} "\
|
38
|
+
# "#{params[:extra_options]} "\
|
39
|
+
# "#{robo_script_option}"\
|
40
|
+
# "--format=json 1>#{Helper.if_need_dir(params[:console_log_file_name])}"
|
41
|
+
# )
|
42
|
+
|
43
|
+
# json = JSON.parse(File.read(params[:console_log_file_name]))
|
44
|
+
# UI.message("Test status: #{json}")
|
45
45
|
|
46
46
|
#
|
47
47
|
payload_string = params[:swit_webhook_payload]
|
48
48
|
|
49
49
|
# 각 JSON 객체에 대해 반복
|
50
|
-
json.each do |item|
|
51
|
-
# 정보 추출하기
|
52
|
-
axis_value = item["axis_value"]
|
53
|
-
outcome = item["outcome"]
|
54
|
-
test_details = item["test_details"]
|
55
|
-
|
56
|
-
# 'axis_value' 분리하기
|
57
|
-
parts = axis_value.split('-')
|
58
|
-
|
59
|
-
# 출력하기
|
60
|
-
UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
|
61
|
-
|
62
|
-
parts.each_with_index do |part, index|
|
63
|
-
UI.message("Part #{index + 1}: #{part}")
|
64
|
-
end
|
65
|
-
end
|
50
|
+
# json.each do |item|
|
51
|
+
# # 정보 추출하기
|
52
|
+
# axis_value = item["axis_value"]
|
53
|
+
# outcome = item["outcome"]
|
54
|
+
# test_details = item["test_details"]
|
55
|
+
#
|
56
|
+
# # 'axis_value' 분리하기
|
57
|
+
# parts = axis_value.split('-')
|
58
|
+
#
|
59
|
+
# # 출력하기
|
60
|
+
# UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
|
61
|
+
#
|
62
|
+
# parts.each_with_index do |part, index|
|
63
|
+
# UI.message("Part #{index + 1}: #{part}")
|
64
|
+
# end
|
65
|
+
# end
|
66
66
|
|
67
67
|
# params[:devices].each_with_index do |device, index|
|
68
68
|
# payload_string = +{,
|
@@ -77,20 +77,20 @@ module Fastlane
|
|
77
77
|
|
78
78
|
|
79
79
|
# Fetch results
|
80
|
-
download_dir = params[:download_dir]
|
81
|
-
if download_dir
|
82
|
-
UI.message("Fetch results from Firebase Test Lab results bucket")
|
83
|
-
json.each do |status|
|
84
|
-
axis = status["axis_value"]
|
85
|
-
Helper.if_need_dir("#{download_dir}/#{axis}")
|
86
|
-
Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
|
87
|
-
Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
|
88
|
-
end
|
89
|
-
end
|
80
|
+
# download_dir = params[:download_dir]
|
81
|
+
# if download_dir
|
82
|
+
# UI.message("Fetch results from Firebase Test Lab results bucket")
|
83
|
+
# json.each do |status|
|
84
|
+
# axis = status["axis_value"]
|
85
|
+
# Helper.if_need_dir("#{download_dir}/#{axis}")
|
86
|
+
# Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
|
87
|
+
# Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
|
88
|
+
# end
|
89
|
+
# end
|
90
90
|
|
91
91
|
|
92
92
|
# Swit Message
|
93
|
-
HTTParty.post(params[:swit_webhook_url], body: { body_text: payload_string }.to_json, headers: { 'Content-Type' => 'application/json' })
|
93
|
+
HTTParty.post(params[:swit_webhook_url], body: { body_text: JSON.parse(payload_string) }.to_json, headers: { 'Content-Type' => 'application/json' })
|
94
94
|
|
95
95
|
UI.message("Finish Action")
|
96
96
|
end
|