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: e2f4848d0bbfdacaba69ad9c0ee781e4329424a1cc779ee7c6b181c58e2fbb11
4
- data.tar.gz: 24f5351b95bef8bbc442f3904d7971e6f4fb6986a68ba7aed48670b7373cd6c0
3
+ metadata.gz: ffd38591b44817a97feff1ab5dd88b97ace94fd856325487429103004b9309eb
4
+ data.tar.gz: 256583798b43f0a30e756d9cfd6acb3b473d03c7f6b9bc4b994a16e5250d0dcf
5
5
  SHA512:
6
- metadata.gz: d8c889ff05fde2a00d5ad0a90fa73bb9a3f014d99b951fb75d31abbdf575906932b6e7f17c4e2f6d65439352db15d7645b183c2164fa6d9cde8debbd92d20e8a
7
- data.tar.gz: a5b58629c96d450d08cb3833f1525e451c29784e7145f9e7aebf9ed169ca9e903a0983ca6d3aade292115442ea723bf5971b5ae38df6899938bd7b95188e39b8
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.89"
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.89
4
+ version: 0.1.90
5
5
  platform: ruby
6
6
  authors:
7
7
  - 나비이쁜이