fastlane-plugin-android_testlab_script_swit 0.1.84 → 0.1.85

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: a89b7d4237ae8e72da0b167285679308dfdc9ce5b2f661ac657a488ee9200e82
4
- data.tar.gz: 2664fd4a4abd4d83893ce2da6c31263de67b4ef537375209ea46fa55a38150b5
3
+ metadata.gz: e1352613dbb39bee54616826260d3b3539331d8a0c2869af61506237cacf8be3
4
+ data.tar.gz: d8bf3cfc2416b40b5fc45cbc1a66b6e8ed58bf49a2b1e617c0925308752141a6
5
5
  SHA512:
6
- metadata.gz: c5852989a0ab0f47cd50ea298b788fed00b9b7ccc38bbe621debf8f271b6c2e315d643477c46adf179d26a2f6023fff94f4dc1b85f08d1a4488404ae113c8c1c
7
- data.tar.gz: 00651a274d3a909a67801cea87c91cbdd8343cd657b9c96d74e402ff29b6dddbe0609f2799968eb4b32a603ff3c22293319f96f2606497a2acf856d1c5d5a8f0
6
+ metadata.gz: fdc04110c9b572ea43925c146095f5fd0d8c4a51b960b513604bc60ead5eee64e5ff7c551ecd8bb372d44152bf2999c36a2b5106e0179ba8ce9b680ea861c72f
7
+ data.tar.gz: b26b408cc9fa0fdb96753d90f31c33250b4e88dee8f2cb2450400cc87d1483828af6c51d14bc9fb28c1f800e52886eadf72ca64b8be1d161041ffaa49872f9fd
@@ -23,94 +23,71 @@ module Fastlane
23
23
 
24
24
  # RoboScriptOption Add
25
25
  robo_script_option = params[:robo_script_path].nil? ? "" : "--robo-script #{params[:robo_script_path]} "
26
+
27
+ #
28
+ new_payload = ""
26
29
 
27
30
  UI.message(params[:gcloud_components_channel])
28
31
 
29
32
  # 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}")
33
+ Helper.run_tests(params[:gcloud_components_channel], "--type #{params[:type]} "\
34
+ "--app #{params[:app_apk]} "\
35
+ "#{"--test #{params[:app_test_apk]} " unless params[:app_test_apk].nil?}"\
36
+ "#{"--use-orchestrator " if params[:type] == "instrumentation" && params[:use_orchestrator]}"\
37
+ "#{params[:devices].map { |d| "--device model=#{d[:model]},version=#{d[:version]},locale=#{d[:locale]},orientation=#{d[:orientation]} " }.join}"\
38
+ "--timeout #{params[:timeout]} "\
39
+ "--results-bucket #{results_bucket} "\
40
+ "--results-dir #{results_dir} "\
41
+ "#{params[:extra_options]} "\
42
+ "#{robo_script_option}"\
43
+ "--format=json 1>#{Helper.if_need_dir(params[:console_log_file_name])}"
44
+ )
45
+
46
+ json = JSON.parse(File.read(params[:console_log_file_name]))
47
+ UI.message("Test status: #{json}")
45
48
 
46
49
 
47
50
  # 각 JSON 객체에 대해 반복
48
- # json.each do |item|
49
- # # 정보 추출하기
50
- # axis_value = item["axis_value"]
51
- # outcome = item["outcome"]
52
- # test_details = item["test_details"]
53
- #
54
- # # 'axis_value' 분리하기
55
- # parts = axis_value.split('-')
56
- #
57
- # # 출력하기
58
- # UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
59
- #
60
- # parts.each_with_index do |part, index|
61
- # UI.message("Part #{index + 1}: #{part}")
62
- # end
63
- # end
64
-
65
- # params[:devices].each_with_index do |device, index|
66
- # payload_string = +{,
67
- # {"type":"rt_section","indent":1,"elements":[{"type":"rt_text","content":"Device#{index + 1}"}]},
68
- # {"type":"rt_section","indent":2,"elements":[{"type":"rt_text","content":"model : #{device[:model]}"}]},
69
- # {"type":"rt_section","indent":2,"elements":[{"type":"rt_text","content":"OS Version : #{device[:version]}"}]},
70
- # {"type":"rt_section","indent":2,"elements":[{"type":"rt_text","content":{"locale : #{device[:locale]}"}}},
71
- # {"type":"rt_section","indent":2,"elements":[{"type\":\"rt_text\",\"content":{"orientation : #{device[:orientation]}"}}},
72
- # {"type":"rt_section","indent":2,"elements":[{"type":"rt_text","content":{"Result : #{outcome}"}}},
73
- # }
74
- # end
75
-
76
- # params[:devices].each_with_index do |device, index|
77
- # new_payload = "[{\"type\": \"rt_section\", \"indent\": 1, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Device#{index + 1}\"}]},
78
- # {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
79
- # {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"OS Version : #{device[:version]}\"}]},
80
- # {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"locale : #{device[:locale]}\"}]},
81
- # {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"orientation : #{device[:orientation]}\"}]},
82
- # {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Result : #{outcome}\"}]}]"
83
- # end
84
-
85
- new_payload = ""
86
-
87
- params[:devices].each_with_index do |device, index|
88
- new_payload += "{\"type\": \"rt_section\", \"indent\": 1, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Device#{index + 1}\"}]},
89
- {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
90
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"OS Version : #{device[:version]}\"}]},
91
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"locale : #{device[:locale]}\"}]},
92
- {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"orientation : #{device[:orientation]}\"}]}"
93
-
94
- new_payload += "," unless index == params[:devices].length - 1
51
+ json.each do |item|
52
+ # 정보 추출하기
53
+ axis_value = item["axis_value"]
54
+ outcome = item["outcome"]
55
+ test_details = item["test_details"]
56
+
57
+ # 'axis_value' 분리하기
58
+ parts = axis_value.split('-')
59
+
60
+ # 출력하기
61
+ UI.message("Outcome: #{outcome}, Test Details: #{test_details}")
62
+
63
+ parts.each_with_index do |part, index|
64
+ UI.message("Part #{index + 1}: #{part}")
65
+ end
66
+
67
+ params[:devices].each_with_index do |device, index|
68
+ new_payload += "{\"type\": \"rt_section\", \"indent\": 1, \"elements\": [{\"type\": \"rt_text\", \"content\": \"Device#{index + 1}\"}]},
69
+ {\"type\": \"rt_section\", \"indent\": 2, \"elements\": [{\"type\": \"rt_text\", \"content\": \"model : #{device[:model]}\"}]},
70
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"OS Version : #{device[:version]}\"}]},
71
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"locale : #{device[:locale]}\"}]},
72
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"orientation : #{device[:orientation]}\"}]},
73
+ {\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Result : #{outcome}\"}]},"
74
+
75
+ new_payload += "," unless index == params[:devices].length - 1
76
+ end
95
77
  end
96
78
 
97
79
  # Fetch results
98
- # download_dir = params[:download_dir]
99
- # if download_dir
100
- # UI.message("Fetch results from Firebase Test Lab results bucket")
101
- # json.each do |status|
102
- # axis = status["axis_value"]
103
- # Helper.if_need_dir("#{download_dir}/#{axis}")
104
- # Helper.copy_from_gcs("#{results_bucket}/#{results_dir}/#{axis}", download_dir)
105
- # Helper.set_public("#{results_bucket}/#{results_dir}/#{axis}")
106
- # end
107
- # end
108
-
109
-
110
- # 원래 하던 행위
111
- # payload_string = params[:swit_webhook_payload]
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
112
90
 
113
-
114
91
  # Remove the closing square bracket from the original payload and add a comma
115
92
  swit_webhook_payload = params[:swit_webhook_payload][0..-5] + ','
116
93
 
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.84"
3
+ VERSION = "0.1.85"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-android_testlab_script_swit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.84
4
+ version: 0.1.85
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이