fastlane-plugin-android_testlab_script_swit 0.1.922 → 0.1.924

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: c8689345dcc4037748cd7334d9e0b07b0ffc41293aa49784602cd9480c74de99
4
- data.tar.gz: 75a699dd91c2c3fb254b13e730c476c4cab8b109f4380c886c726bdaabdb8550
3
+ metadata.gz: 87ecac21fa5112b7050a926fb270c163957891f415798d9e622104cbd0469d36
4
+ data.tar.gz: a6ea48bee91c09d00545f9c2ea3ee8b2bc68826c330ea0a0b6b2566c9d9d6f97
5
5
  SHA512:
6
- metadata.gz: 3adf57cd752618c345c53ce202a22bb3e98aaaba3c864213692442ca4a64e93027dc7f3f8a0172b7de05298bb00ec2bd0e3dab37558a47a9b76073d954d52b90
7
- data.tar.gz: f5e5365781b571c1f839b394b398c4a5e98cca581e619034e07a19f13380998fc320e0b79b814f08aac09f8a50aeb2c76838e58bdd956360056f631d1c4e1891
6
+ metadata.gz: 6612b2355aa6650c3b4a55096462fac2c6d0f55c99e97b65ffded6c9dd05654495e63d5b337ca835359cb4e4105b4ac65376edbd9c36c3a7b9bdb15450f7a04a
7
+ data.tar.gz: 303c49cac3747f52591fe67606d9888a4e03359aeef8f5273cf6e31903be78ca2a38c58da18d7e451712cbd73e50265efe8c697469624d76a8bdd56833c0e1cd
@@ -15,7 +15,7 @@ module Fastlane
15
15
  duration_sec_total = (end_time - start_time).round(1)
16
16
  duration_min = (duration_sec_total / 60).round(1)
17
17
  duration_sec = duration_sec_total % 60
18
- return "#{duration_min}분 소요시간 자동화"
18
+ return "#{duration_min}분 테스트"
19
19
  end
20
20
 
21
21
  # actions run
@@ -24,6 +24,7 @@ module Fastlane
24
24
  UI.message("Start Action")
25
25
  UI.message("********************************")
26
26
 
27
+ # TestLab 작업 및 작업 소요시간 측정
27
28
  duration = measure_time do
28
29
 
29
30
  # Result Bucket & Dir
@@ -69,37 +70,35 @@ module Fastlane
69
70
 
70
71
  # Swit Result PayLoad
71
72
  swit_device_payload = ""
72
-
73
+
73
74
  # Swit Send PayLoad - 테스트 시간 추가
74
75
  swit_webhook_payload = params[:swit_webhook_payload][0..-5] + ','
75
- swit_webhook_payload += "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"테스트 시간 : #{duration}\"}]},"
76
-
76
+ swit_webhook_payload += "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"테스트 시간 : #{duration}\",\"styles\":{\"bold\":true}}]},"
77
+
77
78
  # Firebase Test Lab Result Json
78
79
  resultJson = JSON.parse(File.read(params[:console_log_file_name]))
79
80
 
80
81
  swit_device_payload = resultJson.map.with_index do |item, device_index|
81
- axis_value_parts = item["axis_value"].split('-')
82
- outcome = item["outcome"]
83
-
84
- model = axis_value_parts[0]
85
- version = axis_value_parts[1]
86
- locale = axis_value_parts[2]
87
- orientation = axis_value_parts[3]
88
-
89
- parts_payload = axis_value_parts.map do |part|
90
- "{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Part : #{part}\"}]}"
91
- end.join(',')
82
+ axis_value_parts = item["axis_value"].split('-')
83
+ outcome = item["outcome"]
84
+
85
+ model = axis_value_parts[0]
86
+ version = axis_value_parts[1]
87
+ locale = axis_value_parts[2]
88
+ orientation = axis_value_parts[3]
89
+
90
+ parts_payload = axis_value_parts.map do |part|
91
+ "{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Part : #{part}\"}]}"
92
+ end.join(',')
92
93
 
93
- device_payload = "{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"Device#{device_index + 1}\"}]},{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\", \"content\": \"model: #{model}\"},{\"type\":\"rt_text\", \"content\": \"version: #{version}\"},{\"type\":\"rt_text\", \"content\": \"locale: #{locale}\"},{\"type":" rt_text\", \"content": \"orientation: #{orientation}\", {\"type":" rt_text", " content": "Outcome: \\\"#{outcome}\\\"" }]}"
94
+ device_payload = "[{\"type\":\"rt_section\",\"indent\":1,\"elements\":[{\"type\":\"rt_text\",\"content\":\"#{model}\"}]},{\"type\":\"rt_section\",\"indent\":2,\"elements\":[{\"type\":\"rt_text\", \"content\": \"OS: #{version} / Locale: #{locale} / Orientation: #{orientation}\"},{\"type\":\"rich_text\",\"elements\":[{\"type\":\"rt_section\",\"elements\":[{\"type\":\"rt_text\",\"content\":\"결과 : \"},{\"type\":\"rt_emoji\",\"name\":\":tada:\"},{\"type\":\"rt_text\",\"content\":\" #{outcome} \"},{\"type\":\"rt_emoji\",\"name\":\":tada:\"}]}]}]}"
95
+
94
96
  end.join(',')
95
97
 
96
98
  swit_device_payload.chomp!(',')
97
99
 
98
100
  # Swit PayLoad 병합
99
101
  swit_webhook_payload += swit_device_payload + ']}]}'
100
-
101
- # 마지막 체크
102
- UI.message(swit_webhook_payload)
103
102
 
104
103
  # Swit WebHook
105
104
  HTTParty.post(params[:swit_webhook_url], body: { body_text: swit_webhook_payload }.to_json, headers: { 'Content-Type' => 'application/json' })
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.922"
3
+ VERSION = "0.1.924"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.922
4
+ version: 0.1.924
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler