fastlane-plugin-android_testlab_script_swit 0.1.88 → 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: 8efcd44fe90effdd67b95f22b7568624bbc8eea3aceede3fef4b5d33bd8cdd29
4
- data.tar.gz: e7de18bb1ccb2fba2a2981ae8dbe38c0c0301d52ff4b885b570a93d410bd85bf
3
+ metadata.gz: ffd38591b44817a97feff1ab5dd88b97ace94fd856325487429103004b9309eb
4
+ data.tar.gz: 256583798b43f0a30e756d9cfd6acb3b473d03c7f6b9bc4b994a16e5250d0dcf
5
5
  SHA512:
6
- metadata.gz: 0e20215b9af6941ab44dc895f8bd0aa98909e2edb1c2397b32d22510e43f8f0bbf77202f01532ae102f0f25904ddd00b32d711ec2d53b8f1166d2ef54c209f47
7
- data.tar.gz: 28eb280d4298a5da2c57d331b977364f0df8933929f1f862f5a139ca133bebbe4eab0b1cd5be96f2ff0c88a36051539b7b928d7fb7549af23abdc246615cc9ad
6
+ metadata.gz: ba546f3c0bdb4a35ee019bf169158f4e066f30bfedbb1f9dd63a6072c306b3de8ea138b957eb1e5226e7c7b3a757aa159cf53c3fa18956b874948469699ab389
7
+ data.tar.gz: 64b0385cbd1182da0539ec72adc73e848544c19f68108696eda918d8f9d96b4112cc814305ca88effc9a0e51e9569fb7c7ad3750f662634304bf0d09359363c0
@@ -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 target project
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 Add
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
- json = JSON.parse(File.read(params[:console_log_file_name]))
47
- UI.message("Test status: #{json}")
48
-
48
+ # Firebase Test Lab Result Json
49
+ resultJson = JSON.parse(File.read(params[:console_log_file_name]))
49
50
 
50
51
  # 각 JSON 객체에 대해 반복
51
- json.each do |item|
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
- UI.message("Part #{index + 1}: #{part}")
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
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module AndroidTestlabScriptSwit
3
- VERSION = "0.1.88"
3
+ VERSION = "0.1.90"
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.88
4
+ version: 0.1.90
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이