bucky-core 0.10.16 → 0.10.19

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: 01f33d8a200782110df17e6672dac5b3d4247cf09d47a1ec0d3f4f34f6809a54
4
- data.tar.gz: 0c41a86649f139a8b72da489df200ac68a65c47455c167aa2d4a67aef5db1db9
3
+ metadata.gz: 71ab5650bf91e8f1fe19a0a37e82f3413f7bf936efbdcb590d10625ee1279d75
4
+ data.tar.gz: 2192597051b29173480fb23af9f076c8935c8f86aec31e9902e3fdaa9d4f3b22
5
5
  SHA512:
6
- metadata.gz: 21b1aa8910044b5ecbcb9df1ab07511028aade992c8dcba8e251144f9c14ae14a12647f9ca6f5460cd22a93f97524c9b1bf7a98793bec21f356f154add6ee4b6
7
- data.tar.gz: c45995bd0ee8f0a9db197be54fd6f9f879ceff1a09eaea0207ce29bc5f331aafed8e9b3c47c6c43e5462e339f4a7889c78e06951a23691ce83b7fa1dc8552548
6
+ metadata.gz: 7cb4c4ce1dabca756159d99c8c04cf9c950374e5fd56df271198cd57ca3d34d7e1a9f87b3e97bfa5f5d52036decc18b09b9dd6718fcc4f82a5dc47fd3829c7ea
7
+ data.tar.gz: c63ab8c48f42dbf5c4b02c6e5ca30b0d107c728bb4a0c51e975b09c0e6dd422b6238f27ffadeaa4169e8b03a866a35d159b3ba16deda96ac6d127e7ed915fcfd
data/.circleci/config.yml CHANGED
@@ -27,7 +27,7 @@ jobs:
27
27
  command: docker load -q -i ~/caches/images.tar
28
28
  - run:
29
29
  name: docker up
30
- command: docker-compose -f docker-compose.system-test.yml up --no-build -d
30
+ command: docker-compose -f docker-compose.system-test.yml up -d
31
31
  - run:
32
32
  name: execute system testing
33
33
  command: 'circleci tests glob system_testing/testing_code/*.bats | xargs -n 1 -I {} docker exec bucky-core bats "/bucky-core/"{} | circleci tests split'
data/.rubocop.yml CHANGED
@@ -13,7 +13,7 @@ AllCops:
13
13
  AbcSize:
14
14
  Enabled: false
15
15
 
16
- # Allow method prefix start with "set_" and "get_"
16
+ # Allow method prefix start with 'set_' and 'get_'
17
17
  AccessorMethodName:
18
18
  Enabled: false
19
19
 
@@ -46,7 +46,7 @@ FrozenStringLiteralComment:
46
46
  GlobalVars:
47
47
  AllowedVariables: [$bucky_home_dir, $debug, $job_id, $round]
48
48
 
49
- # Not allow using "->" for multi-line lambdas.
49
+ # Not allow using '->' for multi-line lambdas.
50
50
  Lambda:
51
51
  Enabled: false
52
52
 
@@ -61,7 +61,7 @@ MethodLength:
61
61
  Enabled: false
62
62
 
63
63
  ModuleLength:
64
- Max: 130
64
+ Max: 140
65
65
  Exclude:
66
66
  - 'spec/**/*.rb'
67
67
 
@@ -77,4 +77,4 @@ ClassLength:
77
77
 
78
78
  Lint/UselessAccessModifier:
79
79
  Exclude:
80
- - 'example/**/*'
80
+ - 'example/**/*'
data/README.md CHANGED
@@ -98,6 +98,7 @@ ENV_FOO=foo bucky run -t e2e -d
98
98
  -r, --re_test_count RE_TEST_COUNT # How many round you run tests
99
99
  -l, --label LABEL_NAME
100
100
  -m, --link_check_max_times MAX_TIMES # Works only with which category is linkstatus
101
+ -o, --out JSON_OUTPUT_FILE_PATH # Output summary report by json
101
102
  ```
102
103
 
103
104
  ### Rerun test
@@ -212,6 +213,7 @@ test_category: linkstatus
212
213
  exclude_urls:
213
214
  - https://example.com/fuga/?hoge=1 # PERFECT MATCHING
214
215
  - https://example.com/fuga/* # PARTIAL MATCHING
216
+ - /https://example.com/.*\.html/ # REGULAR EXPRESSION MATCHING
215
217
  cases:
216
218
  - case_name: test_code_1 # Suite filename + number
217
219
  desc: status check for top page
data/exe/bucky CHANGED
@@ -89,7 +89,9 @@ end
89
89
  opts.on('-m', '--link_check_max_times') do |v|
90
90
  test_cond[:link_check_max_times] = v.to_i
91
91
  end
92
-
92
+ opts.on('-o', '--out JSON_OUTPUT_FILE_PATH') do |v|
93
+ test_cond[:out] = v
94
+ end
93
95
  lint_cond = {}
94
96
  opts.on('-C', '--category CATEGORY_NAME') do |v|
95
97
  lint_cond[:lint_category] = v
@@ -124,42 +126,33 @@ def bucky_home?
124
126
  File.exist?('.bucky_home')
125
127
  end
126
128
 
127
- current_dir = Dir.pwd
128
- gem_script_dir = __dir__
129
-
130
- if ARGV == RUN_COMMAND
131
- error_and_exit('Not bucky project dirctory here.') unless bucky_home?
132
-
133
- $bucky_home_dir = Dir.pwd
129
+ def setup_test_cond(test_cond)
134
130
  # Default conditions setting conditions setting
135
131
  test_cond[:test_category] ||= 'e2e'
136
132
  test_cond[:re_test_count] = test_cond[:re_test_count] ? test_cond[:re_test_count].to_i : 1
137
133
  test_cond[:link_check_max_times] ||= 3
138
134
  # Change to array e.g.--suite_id 1,2,3 -> :suite_id=>[1,2,3]
139
- test_cond.each { |k, v| test_cond[k] = v.split(',') if v.instance_of?(String) }
140
- require_relative '../lib/bucky/core/test_core/test_manager'
141
- Bucky::Core::TestCore::TestManager.new(test_cond).run
142
- Bucky::Core::TestCore::ExitHandler.instance.bucky_exit
135
+ %i[suite_name case label xlabel device].each do |k|
136
+ test_cond[k] = test_cond[k].split(',') unless test_cond[k].nil?
137
+ end
138
+ test_cond
139
+ end
143
140
 
144
- elsif ARGV == RERUN_COMMAND
141
+ current_dir = Dir.pwd
142
+ gem_script_dir = __dir__
143
+
144
+ if ARGV[0].end_with? 'run'
145
+ error_and_exit('Not bucky project dirctory here.') unless bucky_home?
145
146
  $bucky_home_dir = Dir.pwd
146
- # Default conditions setting conditions setting
147
- test_cond[:test_category] ||= 'e2e'
148
- test_cond[:link_check_max_times] ||= 3
149
- test_cond[:re_test_count] = test_cond[:re_test_count] ? test_cond[:re_test_count].to_i : 1
150
- # Change to array e.g.--suite_id 1,2,3 -> :suite_id=>[1,2,3]
151
- test_cond.each { |k, v| test_cond[k] = v.split(',') if v.instance_of?(String) }
152
147
  require_relative '../lib/bucky/core/test_core/test_manager'
153
- Bucky::Core::TestCore::TestManager.new(test_cond).rerun
148
+ Bucky::Core::TestCore::TestManager.new(setup_test_cond(test_cond)).send(ARGV[0])
154
149
  Bucky::Core::TestCore::ExitHandler.instance.bucky_exit
155
-
156
150
  elsif ARGV == LINT_COMMAND
157
151
  $bucky_home_dir = Dir.pwd
158
152
  # Default conditions setting
159
153
  lint_cond[:lint_category] ||= 'config'
160
154
  require_relative '../lib/bucky/tools/lint'
161
155
  Bucky::Tools::Lint.check(lint_cond[:lint_category])
162
-
163
156
  elsif ARGV[0..0] == NEW_COMMAND
164
157
  error_and_exit('No test app name.') if ARGV.length < 2
165
158
 
@@ -34,9 +34,8 @@ module Bucky
34
34
  testcodes = []
35
35
  service = (test_cond[:service] || ['*']).first
36
36
  device = (test_cond[:device] || ['*']).first
37
- category = (test_cond[:test_category] || ['*']).first
38
37
 
39
- Dir.glob("#{$bucky_home_dir}/services/#{service}/#{device}/scenarios/#{category}/*.yml").each do |testcode_file|
38
+ Dir.glob("#{$bucky_home_dir}/services/#{service}/#{device}/scenarios/#{test_cond[:test_category]}/*.yml").each do |testcode_file|
40
39
  testcodes << load_testcode_in_file(testcode_file, test_cond)
41
40
  end
42
41
  # Delete nil element
@@ -46,7 +46,7 @@ module Bucky
46
46
  end
47
47
 
48
48
  # Genrate test class by test suite and test case data
49
- def generate_test_class(data, link_status_url_log = {})
49
+ def generate_test_class(data: [], linkstatus_url_log: {}, w_pipe: {})
50
50
  test_cond = @test_cond
51
51
  # Common proccessing
52
52
  # e.g.) TestSampleAppPcE2e1, TestSampleAppPcHttpstatus1
@@ -63,6 +63,7 @@ module Bucky
63
63
  match_obj = /\Atest_(.+)\(.+::(Test.+)\)\z/.match(original_name)
64
64
  "#{match_obj[1]}(#{match_obj[2]})"
65
65
  end
66
+ define_method(:w_pipe, proc { w_pipe })
66
67
 
67
68
  # Class structure is different for each test category
68
69
  case data[:test_category]
@@ -74,8 +75,8 @@ module Bucky
74
75
  define_method(method_name) do
75
76
  puts "\n#{simple_test_class_name(name)}"
76
77
  t_case[:urls].each do |url|
77
- link_status_check_args = { url: url, device: data[:suite][:device], exclude_urls: data[:suite][:exclude_urls], link_check_max_times: test_cond[:link_check_max_times], url_log: link_status_url_log }
78
- link_status_check(link_status_check_args)
78
+ linkstatus_check_args = { url: url, device: data[:suite][:device], exclude_urls: data[:suite][:exclude_urls], link_check_max_times: test_cond[:link_check_max_times], url_log: linkstatus_url_log }
79
+ linkstatus_check(linkstatus_check_args)
79
80
  end
80
81
  end
81
82
  )
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'parallel'
3
+ require 'json'
4
4
  require_relative '../test_core/test_case_loader'
5
5
  require_relative '../../utils/config'
6
6
  require_relative './test_class_generator'
@@ -26,6 +26,8 @@ module Bucky
26
26
  # If child process dead, available workers increase
27
27
  Signal.trap('CLD') { available_workers += 1 }
28
28
 
29
+ r_pipe, w_pipe = IO.pipe
30
+
29
31
  data_set.each do |data|
30
32
  # Wait until worker is available and handle exit code from previous process
31
33
  unless available_workers.positive?
@@ -34,28 +36,51 @@ module Bucky
34
36
  end
35
37
  # Workers decrease when start working
36
38
  available_workers -= 1
37
- fork { block.call(data) }
39
+ fork { block.call(data, w_pipe) }
38
40
  end
39
41
  # Handle all exit code in waitall
40
42
  Process.waitall.each do |child|
41
43
  Bucky::Core::TestCore::ExitHandler.instance.raise unless child[1].exitstatus.zero?
42
44
  end
45
+
46
+ w_pipe.close
47
+ results_set = collect_results_set(r_pipe)
48
+ r_pipe.close
49
+
50
+ results_set
43
51
  end
44
52
 
45
53
  def parallel_distribute_into_workers(data_set, max_processes, &block)
46
54
  # Group the data by remainder of index
47
55
  data_set_grouped = data_set.group_by.with_index { |_elem, index| index % max_processes }
56
+ r_pipe, w_pipe = IO.pipe
48
57
  # Use 'values' method to get only hash's key into an array
49
58
  data_set_grouped.values.each do |data_for_pre_worker|
50
59
  # Number of child process is equal to max_processes (or equal to data_set length when data_set length is less than max_processes)
51
60
  fork do
52
- data_for_pre_worker.each { |data| block.call(data) }
61
+ data_for_pre_worker.each { |data| block.call(data, w_pipe) }
53
62
  end
54
63
  end
55
64
  # Handle all exit code in waitall
56
65
  Process.waitall.each do |child|
57
66
  Bucky::Core::TestCore::ExitHandler.instance.raise unless child[1].exitstatus.zero?
58
67
  end
68
+
69
+ w_pipe.close
70
+ results_set = collect_results_set(r_pipe)
71
+ r_pipe.close
72
+
73
+ results_set
74
+ end
75
+
76
+ def collect_results_set(r_pipe)
77
+ results_set = {}
78
+ r_pipe.each_line do |line|
79
+ r = JSON.parse(line)
80
+ results_set[r['test_class_name']] = r
81
+ end
82
+
83
+ results_set
59
84
  end
60
85
  end
61
86
 
@@ -69,6 +94,20 @@ module Bucky
69
94
  @tdo = Bucky::Core::Database::TestDataOperator.new
70
95
  @start_time = Time.now
71
96
  $job_id = @tdo.save_job_record_and_get_job_id(@start_time, @test_cond[:command_and_option])
97
+ @json_report = {
98
+ summary: {
99
+ cases_count: 0,
100
+ success_count: 0,
101
+ failure_count: 0,
102
+ job_id: $job_id,
103
+ test_category: test_cond[:test_category],
104
+ device: test_cond[:device],
105
+ labels: test_cond[:label],
106
+ exclude_labels: test_cond[:xlabel],
107
+ rerun_job_id: test_cond[:job],
108
+ round_count: 0
109
+ }
110
+ }
72
111
  end
73
112
 
74
113
  def run
@@ -102,25 +141,42 @@ module Bucky
102
141
  e2e_parallel_num = Bucky::Utils::Config.instance[:e2e_parallel_num]
103
142
  linkstatus_parallel_num = Bucky::Utils::Config.instance[:linkstatus_parallel_num]
104
143
  tcg = Bucky::Core::TestCore::TestClassGenerator.new(@test_cond)
105
- case @test_cond[:test_category][0]
106
- when 'e2e' then parallel_new_worker_each(test_suite_data, e2e_parallel_num) { |data| tcg.generate_test_class(data) }
144
+ case @test_cond[:test_category]
145
+ when 'e2e' then results_set = parallel_new_worker_each(test_suite_data, e2e_parallel_num) { |data, w_pipe| tcg.generate_test_class(data: data, w_pipe: w_pipe) }
107
146
  when 'linkstatus' then
108
- link_status_url_log = {}
109
- parallel_distribute_into_workers(test_suite_data, linkstatus_parallel_num) { |data| tcg.generate_test_class(data, link_status_url_log) }
147
+ linkstatus_url_log = {}
148
+ results_set = parallel_distribute_into_workers(test_suite_data, linkstatus_parallel_num) { |data, w_pipe| tcg.generate_test_class(data: data, linkstatus_url_log: linkstatus_url_log, w_pipe: w_pipe) }
110
149
  end
150
+
151
+ results_set
111
152
  end
112
153
 
113
154
  def execute_test
155
+ results_set = {}
114
156
  @re_test_count.times do |i|
115
157
  Bucky::Core::TestCore::ExitHandler.instance.reset
116
158
  $round = i + 1
159
+ @json_report[:summary][:round_count] = $round
117
160
  test_suite_data = load_test_suites
118
- do_test_suites(test_suite_data)
161
+ results_set = do_test_suites(test_suite_data)
119
162
  @test_cond[:re_test_cond] = @tdo.get_ng_test_cases_at_last_execution(
120
163
  is_error: 1, job_id: $job_id, round: $round
121
164
  )
122
165
  break if @test_cond[:re_test_cond].empty?
123
166
  end
167
+
168
+ return unless @test_cond[:out]
169
+
170
+ results_set.each do |_class_name, res|
171
+ @json_report[:summary][:cases_count] += res['cases_count']
172
+ @json_report[:summary][:success_count] += res['success_count']
173
+ @json_report[:summary][:failure_count] += res['failure_count']
174
+ end
175
+
176
+ File.open(@test_cond[:out], 'w') do |f|
177
+ f.puts(@json_report.to_json)
178
+ puts "\nSave report : #{@test_cond[:out]}\n"
179
+ end
124
180
  end
125
181
  end
126
182
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'test/unit'
4
+ require 'json'
4
5
  require_relative '../../core/test_core/test_result'
5
6
 
6
7
  module Bucky
@@ -25,6 +26,12 @@ module Bucky
25
26
  def run(result)
26
27
  super
27
28
  @@this_result.result = result unless $debug
29
+ w_pipe.puts({
30
+ test_class_name: self.class.name,
31
+ cases_count: result.run_count,
32
+ success_count: result.pass_count,
33
+ failure_count: result.run_count - result.pass_count
34
+ }.to_json)
28
35
  end
29
36
 
30
37
  def setup
@@ -62,7 +62,7 @@ module Bucky
62
62
  end
63
63
  end
64
64
 
65
- def link_status_check(args)
65
+ def linkstatus_check(args)
66
66
  url = args[:url]
67
67
  device = args[:device]
68
68
  exclude_urls = args[:exclude_urls]
@@ -133,9 +133,12 @@ module Bucky
133
133
 
134
134
  # Exclude url if it has "*" in the last of it
135
135
  exclude_urls.each do |ex_url|
136
- next unless ex_url.end_with?('*')
137
-
138
- excluded_links.delete_if { |l| l.start_with?(ex_url.delete('*')) }
136
+ if ex_url.end_with?('*')
137
+ excluded_links.delete_if { |l| l.start_with?(ex_url.delete('*')) }
138
+ elsif ex_url.start_with?('/') && ex_url.end_with?('/')
139
+ ex_url.delete_prefix!('/').delete_suffix!('/')
140
+ excluded_links.delete_if { |l| l.match(/#{ex_url}/) }
141
+ end
139
142
  end
140
143
 
141
144
  excluded_links
data/lib/bucky/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bucky
4
4
  module Version
5
- VERSION = '0.10.16'
5
+ VERSION = '0.10.19'
6
6
  end
7
7
  end
@@ -0,0 +1,12 @@
1
+ desc: pc linkstatus test suites
2
+ device: pc
3
+ service: service_a
4
+ priority: high
5
+ test_category: linkstatus
6
+ exclude_urls:
7
+ - http://bucky.net/test*
8
+ cases:
9
+ - case_name: pc_link_exclude_asterisk_1
10
+ desc: pc linkstatus test 1
11
+ urls:
12
+ - http://bucky.net
@@ -0,0 +1,12 @@
1
+ desc: pc linkstatus test suites
2
+ device: pc
3
+ service: service_a
4
+ priority: high
5
+ test_category: linkstatus
6
+ exclude_urls:
7
+ - http://bucky.net/test_page.html
8
+ cases:
9
+ - case_name: pc_link_exclude_normal_1
10
+ desc: pc linkstatus test 1
11
+ urls:
12
+ - http://bucky.net
@@ -0,0 +1,12 @@
1
+ desc: pc linkstatus test suites
2
+ device: pc
3
+ service: service_a
4
+ priority: high
5
+ test_category: linkstatus
6
+ exclude_urls:
7
+ - /http://bucky.net/.*_page.*/
8
+ cases:
9
+ - case_name: pc_link_exclude_regex_1
10
+ desc: pc linkstatus test 1
11
+ urls:
12
+ - http://bucky.net
@@ -11,9 +11,13 @@ docker-compose -f docker-compose.system-test.yml down
11
11
  ```
12
12
 
13
13
  # Test case specification
14
+
14
15
  ※ Only Japanese now.
16
+
15
17
  ※ テストケースNo.はbatsのケース説明部分に記載し、対応づけを行う
16
18
 
19
+ ## E2Eテスト実行機能
20
+
17
21
  | テスト条件 | テスト観点 | テストケース<br/>No. | テストケース | テスト手順 | 期待結果 |
18
22
  |:--|:--|--:|:--|:--|:--|
19
23
  | E2Eテスト実行機能 | Operateが正常に実行できるか<br/>・シナリオコードに実装されたOperateが実行できること<br/>・clickして遷移できること ※1種類のOperateができればOK<br/>ページタイトルで遷移したことを確認する | 1 | goを実行し正常に実行されること | 1. bucky run -t e2e -d -D pc -c pc_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>3. assert_titleメソッド実行 | goメソッドを実行後にページ遷移されていること<br/>(assert_titleメソッドの結果がOKであることを出力される文字列で判断) |
@@ -25,20 +29,33 @@ docker-compose -f docker-compose.system-test.yml down
25
29
  | | setup/teardown_eachが正常に動作するか | 7 | setup_eachでgoを実行し正常に実行されること | 1. bucky run -t e2e -d -D pc -c setup_each_pc_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. setup内でgoメソッド実行 (http://bucky.net)<br/>3. testcase内でassert_titleメソッド実行 | goメソッドを実行後にページ遷移されていること<br/>(assert_titleメソッドの結果がOKであることを出力される文字列で判断) |
26
30
  | | | 8 | teardown_eachでgoを実行し正常に実行されること | 1. bucky run -t e2e -d -D pc -c teardown_each_pc_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. teardown内でgoメソッド実行 (http://bucky.net)<br/>3. testcase内でassert_titleメソッド実行 | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「0 failures, 0 errors」 と表示されること |
27
31
  | | | 9 | setup_each/teardownを実行するケースを複数ケース続けて実行して正常に動作すること | 1. bucky run -t e2e -d -D pc -c setup_teardown_each_pc_e2e_1,setup_teardown_each_pc_e2e_2 <br/>- 以下シナリオファイル内の処理 -<br/>2. setup内でgoメソッド実行 (http://bucky.net)<br/>3. assert_titleメソッド実行<br/>4. testcase内でteardown内でgoメソッド実行 (http://bucky.net)<br/>5. setup内でgoメソッド実行 (http://bucky.net)<br/>6. testcase内でassert_titleメソッド実行<br/>7. teardown内でgoメソッド実行 (http://bucky.net) | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「0 failures, 0 errors」 と表示されること |
28
- | LinkStatusテスト実行機能 | 起点URLの検証が正しく実施できるか | 10 | linkstatusを実行し、起点URLが検証されること | 1. bucky run -t linkstatus -d -D pc -c pc_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行 | 出力に http://bucky.net が含まれること |
29
- | | ページ内のリンクの検証が正しく実施できるか | 11 | linkstatusを実行し、起点ページ内のリンクが検証されること | 1. bucky run -t linkstatus -d -D pc -c pc_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html に対してLinkチェック実行 | 出力に http://bucky.net/test_page.htmlが含まれること |
30
- | | 各デバイス(PC/SP)のUAで正常に実行できるか | 12 | デバイスPCでlinkstatusを実行し、正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html に対してLinkチェック実行 | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errorsと表示されること |
31
- | | | 13 | linkstatusNGテストを実行し、正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_2<br/>2. http://bucky-error.net に対してhttpリクエストチェック実行 | 終了後のステータスが1であること |
32
- | | | 14 | デバイスSPでlinkstatusを実行し、正常に動作すること | 1. bucky run -t linkstatus -d -D sp -c sp_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html チェック実行 | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
33
- | テスト用のプロジェクト作成機能 | 下記の構造のディレクトリ、ファイルが生成されること<br/>(./template/new 以下の内容)<br/>.<br/>├── config<br/>│ ├── bucky_config.yml<br/>│ ├── e2e_config.yml<br/>│ ├── for_spec<br/>│ └── test.yml<br/>│ ├── linkstatus_config.yml<br/>│ └── test_db_config.yml<br/>├── services<br/>│ └── README.md<br/>└── system<br/>├── evidences<br/>│ ├── README.md<br/>│ └── screen_shots<br/>│ └── README.md<br/>└── logs<br/>└── README.md | 15 | newコマンド実行後に期待通りのファイル、ディレクトリが作成されていること | 1. bucky new test_project | 対象ディレクトリとファイルが存在していること |
34
- | ページオブジェクト・パーツファイル作成機能 | 指定のサービス名、デバイスのディレクトリ以下に指定のページ名で.rbファイルと.ymlファイルが生成されること | 16 | make serviceコマンド実行後に期待通りのファイルが作成されていること | 1. (事前条件) bucky new test_project<br/>2. bucky make service test_service | 対象ディレクトリとファイルが存在していること |
35
- | | | 17 | make pageコマンド実行後に期待通りのファイルが作成されていること | 1. (事前条件) bucky new test_project<br/>2. (事前条件) bucky make service test_service<br/>3. bucky make page test_page | 対象ディレクトリとファイルが存在していること |
36
- | 未定義コマンド実行時の動き | 出力されるメッセージに Invalid command error. が含まれるか<br/>終了ステータスが 0 以外になるか | 18 | 未定義コマンド実行後にエラー終了すること | 1. bucky hoge fuga | 終了後のステータスが0以外であること |
37
- | whenを使用しての実行時の動き | 出力されるメッセージに click が含まれるか<br/>例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「0 failures, 0 errors」 と表示されること | 19 | 条件指定をしたテスト実行で不具合なくprocが実行されること | 1. STAGE=development bucky run -d -D -pc -c pc_e2e_4<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. whenを使ったclickメソッド実行 | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「0 failures, 0 errors」 と表示されること |
38
- | | 出力されるメッセージに click が含まれないこと(終了後のステータスが0であること) | 20 | 条件指定をしないテスト実行で該当のprocが実行されないこと | 1. bucky run -d -D -pc -c pc_e2e_4<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. whenを使ったclickメソッドは実行されない | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「click」 が表示されないこと |
39
- | | | 21 | 違う条件を指定したテスト実行で該当のprocが実行されないこと | 1. STAGE=staging bucky run -d -D -pc -c pc_e2e_4<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. whenを使ったclickメソッドは実行されない | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「click」 が表示されないこと |
40
- | 複数パーツ取得・選択機能 | Partファイルで複数取得、番号指定でエレメントが取得できること | 22 | CSSセレクタで指定したエレメントの2つ目の要素をクリックできること | 1. bucky run -t e2e -d -D pc -c pc_e2e_5<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. assert_textメソッド実行 | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
41
- | PageObjectでのWebElement取得 | PageObjectファイルからパーツ(WebElement)が取得できること | 23 | PageObjectファイルからパーツ名でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_6<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. PageObjectメソッド click_single_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
42
- | | | 24 | PageObjectファイルからパーツ名[数字]でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_7<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. PageObjectメソッド click_multiple_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
43
- | VerificationでのWebElement取得 | Verificationファイルからパーツ(WebElement)が取得できること | 25 | Verificationファイルからパーツ名でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_8<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. Verificationメソッド click_single_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
44
- | | | 26 | Verificationファイルからパーツ名[数字]でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_9<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. Verificationメソッド click_multiple_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
32
+ | whenを使用しての実行時の動き | 出力されるメッセージに click が含まれるか<br/>例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「0 failures, 0 errors」 と表示されること | 10 | 条件指定をしたテスト実行で不具合なくprocが実行されること | 1. STAGE=development bucky run -d -D -pc -c pc_e2e_4<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. whenを使ったclickメソッド実行 | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「0 failures, 0 errors」 と表示されること |
33
+ | | 出力されるメッセージに click が含まれないこと(終了後のステータスが0であること) | 11 | 条件指定をしないテスト実行で該当のprocが実行されないこと | 1. bucky run -d -D -pc -c pc_e2e_4<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. whenを使ったclickメソッドは実行されない | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「click」 が表示されないこと |
34
+ | | | 12 | 違う条件を指定したテスト実行で該当のprocが実行されないこと | 1. STAGE=staging bucky run -d -D -pc -c pc_e2e_4<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. whenを使ったclickメソッドは実行されない | 例外が発生していないこと(終了後のステータスが0であること)<br/>→ 「clickが表示されないこと |
35
+ | 複数パーツ取得・選択機能 | Partファイルで複数取得、番号指定でエレメントが取得できること | 13 | CSSセレクタで指定したエレメントの2つ目の要素をクリックできること | 1. bucky run -t e2e -d -D pc -c pc_e2e_5<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. assert_textメソッド実行 | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
36
+ | PageObjectでのWebElement取得 | PageObjectファイルからパーツ(WebElement)が取得できること | 14 | PageObjectファイルからパーツ名でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_6<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. PageObjectメソッド click_single_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
37
+ | | | 15 | PageObjectファイルからパーツ名[数字]でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_7<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. PageObjectメソッド click_multiple_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
38
+ | VerificationでのWebElement取得 | Verificationファイルからパーツ(WebElement)が取得できること | 16 | Verificationファイルからパーツ名でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_8<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. Verificationメソッド click_single_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
39
+ | | | 17 | Verificationファイルからパーツ名[数字]でWebElementが取得できること | 1. bucky run -t e2e -d -D pc -c pc_e2e_9<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. Verificationメソッド click_multiple_element | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
40
+
41
+ ## Linkstatusテスト実行機能
42
+
43
+ | テスト条件 | テスト観点 | テストケース<br/>No. | テストケース | テスト手順 | 期待結果 |
44
+ |:--|:--|--:|:--|:--|:--|
45
+ | LinkStatusテスト実行機能 | 起点URLの検証が正しく実施できるか | 1 | linkstatusを実行し、起点URLが検証されること | 1. bucky run -t linkstatus -d -D pc -c pc_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行 | 出力に http://bucky.net が含まれること |
46
+ | | ページ内のリンクの検証が正しく実施できるか | 2 | linkstatusを実行し、起点ページ内のリンクが検証されること | 1. bucky run -t linkstatus -d -D pc -c pc_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html に対してLinkチェック実行 | 出力に http://bucky.net/test_page.htmlが含まれること |
47
+ | | 各デバイス(PC/SP)のUAで正常に実行できるか | 3 | デバイスPCでlinkstatusを実行し、正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html に対してLinkチェック実行 | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
48
+ | | | 4 | linkstatusNGテストを実行し、正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_2<br/>2. http://bucky-error.net に対してhttpリクエストチェック実行 | 終了後のステータスが1であること |
49
+ | | | 5 | デバイスSPでlinkstatusを実行し、正常に動作すること | 1. bucky run -t linkstatus -d -D sp -c sp_link_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html チェック実行 | 終了後のステータスが0であること<br/>→ 「0 failures, 0 errors」 と表示されること |
50
+ | | | 6 | 通常のURL除外機能が正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_exclude_normal_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html チェック実行 | 終了後のステータスが0であること<br/>→ 出力に http://bucky.net/test_page.htmlが含まれないこと |
51
+ | | | 7 | アスタリスクを含むURL除外機能が正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_exclude_asterisk_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html チェック実行 | 終了後のステータスが0であること<br/>→ 出力に http://bucky.net/test_page.htmlが含まれないこと |
52
+ | | | 8 | 正規表現によるURL除外機能が正常に動作すること | 1. bucky run -t linkstatus -d -D pc -c pc_link_exclude_regex_1<br/>2. http://bucky.net に対してhttpリクエストチェック実行<br/>3. http://bucky.net/test_page.html チェック実行 | 終了後のステータスが0であること<br/>→ 出力に http://bucky.net/test_page.htmlが含まれないこと |
53
+
54
+ ## Buckyコマンド実行機能
55
+
56
+ | テスト条件 | テスト観点 | テストケース<br/>No. | テストケース | テスト手順 | 期待結果 |
57
+ |:--|:--|--:|:--|:--|:--|
58
+ | テスト用のプロジェクト作成機能 | 下記の構造のディレクトリ、ファイルが生成されること<br/>(./template/new 以下の内容)<br/>.<br/>├── config<br/>│ ├── bucky_config.yml<br/>│ ├── e2e_config.yml<br/>│ ├── for_spec<br/>│ │ └── test.yml<br/>│ ├── linkstatus_config.yml<br/>│ └── test_db_config.yml<br/>├── services<br/>│ └── README.md<br/>└── system<br/>├── evidences<br/>│ ├── README.md<br/>│ └── screen_shots<br/>│ └── README.md<br/>└── logs<br/>└── README.md | 1 | newコマンド実行後に期待通りのファイル、ディレクトリが作成されていること | 1. bucky new test_project | 対象ディレクトリとファイルが存在していること |
59
+ | ページオブジェクト・パーツファイル作成機能 | 指定のサービス名、デバイスのディレクトリ以下に指定のページ名で.rbファイルと.ymlファイルが生成されること | 2 | make serviceコマンド実行後に期待通りのファイルが作成されていること | 1. (事前条件) bucky new test_project<br/>2. bucky make service test_service | 対象ディレクトリとファイルが存在していること |
60
+ | | | 3 | make pageコマンド実行後に期待通りのファイルが作成されていること | 1. (事前条件) bucky new test_project<br/>2. (事前条件) bucky make service test_service<br/>3. bucky make page test_page | 対象ディレクトリとファイルが存在していること |
61
+ | 未定義コマンド実行時の動き | 出力されるメッセージに Invalid command error. が含まれるか<br/>終了ステータスが 0 以外になるか | 4 | 未定義コマンド実行後にエラー終了すること | 1. bucky hoge fuga | 終了後のステータスが0以外であること |
@@ -13,19 +13,19 @@ teardown() {
13
13
  rm -rf /tmp/$BUCKY_PROJECT_NAME
14
14
  }
15
15
 
16
- @test "#15 After executing 'new' command, expected files and directories are created" {
16
+ @test "[command] #1 After executing 'new' command, expected files and directories are created" {
17
17
  run diff /bucky-core/template/new/ /tmp/$BUCKY_PROJECT_NAME
18
18
  [ $status -eq 0 ]
19
19
  }
20
20
 
21
- @test "#16 After executing 'make service' command, expected directory is created" {
21
+ @test "[command] #2 After executing 'make service' command, expected directory is created" {
22
22
  cd /tmp/$BUCKY_PROJECT_NAME
23
23
  bucky make service $TEST_SERVICE
24
24
  run ls /tmp/$BUCKY_PROJECT_NAME/services/$TEST_SERVICE
25
25
  [ $status -eq 0 ]
26
26
  }
27
27
 
28
- @test "#17 After executing 'make page' command, expected page and parts file are created" {
28
+ @test "[command] #3 After executing 'make page' command, expected page and parts file are created" {
29
29
  cd /tmp/$BUCKY_PROJECT_NAME
30
30
  bucky make service $TEST_SERVICE
31
31
  bucky make page test_page --service $TEST_SERVICE --device pc
@@ -35,7 +35,7 @@ teardown() {
35
35
  [ $status -eq 0 ]
36
36
  }
37
37
 
38
- @test "#18 After executing undefined command, show error message and exit" {
38
+ @test "[command] #4 After executing undefined command, show error message and exit" {
39
39
  cd /tmp/$BUCKY_PROJECT_NAME
40
40
  run bucky hoge fuga
41
41
  [ $(expr "$output" : ".*Invalid command error.*") -ne 0 ]
@@ -4,99 +4,99 @@ setup() {
4
4
  cd /bucky-core/system_testing/test_bucky_project
5
5
  }
6
6
 
7
- @test "#01 After executing e2e operate go, results have no failures nor errors" {
7
+ @test "[e2e] #01 After executing e2e operate go, results have no failures nor errors" {
8
8
  run bucky run -t e2e -d -D pc -c pc_e2e_1
9
9
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
10
10
  }
11
11
 
12
- @test "#02 After executing e2e verify assert_title, results contain verify words, no failures/errors and exit code is 0" {
12
+ @test "[e2e] #02 After executing e2e verify assert_title, results contain verify words, no failures/errors and exit code is 0" {
13
13
  run bucky run -t e2e -d -D pc -c pc_e2e_1
14
14
  [ $status -eq 0 ]
15
15
  [ $(expr "$output" : ".*:verify.*assert_title.*") -ne 0 ]
16
16
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
17
17
  }
18
18
 
19
- @test "#03 After executing e2e verify assert_title, results contain verify words and 1 failure and exit code is 1" {
19
+ @test "[e2e] #03 After executing e2e verify assert_title, results contain verify words and 1 failure and exit code is 1" {
20
20
  run bucky run -t e2e -d -D pc -c pc_e2e_2
21
21
  [ $status -eq 1 ]
22
22
  [ $(expr "$output" : ".*:verify.*assert_title.*") -ne 0 ]
23
23
  [ $(expr "$output" : ".*1 failures.*") -ne 0 ]
24
24
  }
25
25
 
26
- @test "#04 After executing e2e on pc , results contain 'Linux' and no failures/errors." {
26
+ @test "[e2e] #04 After executing e2e on pc , results contain 'Linux' and no failures/errors." {
27
27
  run bucky run -t e2e -d -D pc -c pc_e2e_3
28
28
  [ $(expr "$output" : ".*Linux.*") -ne 0 ]
29
29
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
30
30
  }
31
31
 
32
- @test "#05 After executing e2e on sp , results contain 'iPhone' and no failures/errors." {
32
+ @test "[e2e] #05 After executing e2e on sp , results contain 'iPhone' and no failures/errors." {
33
33
  run bucky run -t e2e -d -D sp -c sp_e2e_1
34
34
  [ $(expr "$output" : ".*iPhone.*") -ne 0 ]
35
35
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
36
36
  }
37
37
 
38
- @test "#06 After executing e2e on tablet , results contain 'iPad' and no failures/errors." {
38
+ @test "[e2e] #06 After executing e2e on tablet , results contain 'iPad' and no failures/errors." {
39
39
  run bucky run -t e2e -d -D tablet -c tablet_e2e_1
40
40
  [ $(expr "$output" : ".*iPad.*") -ne 0 ]
41
41
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
42
42
  }
43
43
 
44
- @test "#07 After executing e2e operate go with setup each, results have no failures nor errors" {
44
+ @test "[e2e] #07 After executing e2e operate go with setup each, results have no failures nor errors" {
45
45
  run bucky run -d -c setup_each_pc_e2e_1
46
46
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
47
47
  }
48
48
 
49
- @test "#08 After executing e2e operate go with teardown each, results have no failures nor errors" {
49
+ @test "[e2e] #08 After executing e2e operate go with teardown each, results have no failures nor errors" {
50
50
  run bucky run -d -c teardown_each_pc_e2e_1
51
51
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
52
52
  }
53
53
 
54
- @test "#09 When setup and teardown is added, multiple test cases execute normally, results have no failures nor errors" {
54
+ @test "[e2e] #09 When setup and teardown is added, multiple test cases execute normally, results have no failures nor errors" {
55
55
  run bucky run -d -s setup_teardown_each_pc_e2e
56
56
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
57
57
  }
58
58
 
59
- @test "#19 When 'when condition' is added, results have no failures nor errors" {
59
+ @test "[e2e] #10 When 'when condition' is added, results have no failures nor errors" {
60
60
  export STAGE=development
61
61
  run bucky run -t e2e -d -D pc -c pc_e2e_4
62
62
  [ $(expr "$output" : ".*click.*") -ne 0 ]
63
63
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
64
64
  }
65
65
 
66
- @test "#20 When 'when condition' is not added, results have no click procedure" {
66
+ @test "[e2e] #11 When 'when condition' is not added, results have no click procedure" {
67
67
  run bucky run -t e2e -d -D pc -c pc_e2e_4
68
68
  [ $(expr "$output" : ".*click.*") -eq 0 ]
69
69
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
70
70
  }
71
71
 
72
- @test "#21 When 'different when condition' is added, results have no click procedure" {
72
+ @test "[e2e] #12 When 'different when condition' is added, results have no click procedure" {
73
73
  export STAGE=staging
74
74
  run bucky run -t e2e -d -D pc -c pc_e2e_4
75
75
  [ $(expr "$output" : ".*click.*") -eq 0 ]
76
76
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
77
77
  }
78
78
 
79
- @test "#22 When click second element from scenario, results have no failures nor errors" {
79
+ @test "[e2e] #13 When click second element from scenario, results have no failures nor errors" {
80
80
  run bucky run -t e2e -d -D pc -c pc_e2e_5
81
81
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
82
82
  }
83
83
 
84
- @test "#23 When click element from PageObject file, results have no failures nor errors" {
84
+ @test "[e2e] #14 When click element from PageObject file, results have no failures nor errors" {
85
85
  run bucky run -t e2e -d -D pc -c pc_e2e_6
86
86
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
87
87
  }
88
88
 
89
- @test "#24 When click second element from PageObject file, results have no failures nor errors" {
89
+ @test "[e2e] #15 When click second element from PageObject file, results have no failures nor errors" {
90
90
  run bucky run -t e2e -d -D pc -c pc_e2e_7
91
91
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
92
92
  }
93
93
 
94
- @test "#25 When click element from Verification file, results have no failures nor errors" {
94
+ @test "[e2e] #16 When click element from Verification file, results have no failures nor errors" {
95
95
  run bucky run -t e2e -d -D pc -c pc_e2e_8
96
96
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
97
97
  }
98
98
 
99
- @test "#26 When click second element from Verification file, results have no failures nor errors" {
99
+ @test "[e2e] #17 When click second element from Verification file, results have no failures nor errors" {
100
100
  run bucky run -t e2e -d -D pc -c pc_e2e_9
101
101
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
102
102
  }
@@ -4,25 +4,44 @@ setup() {
4
4
  cd /bucky-core/system_testing/test_bucky_project
5
5
  }
6
6
 
7
- @test "#10,#12 After executing linkstatus on pc , results contain target base url, no failures/errors and exit code is 0." {
7
+ @test "[linkstatus] #1, #3 After executing linkstatus on pc, results contain target base url, no failures/errors and exit code is 0." {
8
8
  run bucky run -t linkstatus -d -D pc -c pc_link_1
9
9
  [ $status -eq 0 ]
10
10
  [ $(expr "$output" : ".*http://bucky\.net.*") -ne 0 ]
11
11
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
12
12
  }
13
13
 
14
- @test "#11 After executing linkstatus on pc , results contain target link url and no failures/errors." {
14
+ @test "[linkstatus] #2 After executing linkstatus on pc, results contain target link url and no failures/errors." {
15
15
  run bucky run -t linkstatus -d -D pc -c pc_link_1
16
16
  [ $(expr "$output" : ".*http://bucky\.net/test_page.html.*") -ne 0 ]
17
17
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
18
18
  }
19
19
 
20
- @test "#13 After executing linkstatus failed test, exit code is 1" {
20
+ @test "[linkstatus] #4 After executing linkstatus failed test, exit code is 1" {
21
21
  run bucky run -t linkstatus -d -D pc -c pc_link_2
22
22
  [ $status -eq 1 ]
23
23
  }
24
24
 
25
- @test "#14 After executing linkstatus on sp , results have no failures nor errors" {
25
+ @test "[linkstatus] #5 After executing linkstatus on sp, results have no failures nor errors" {
26
26
  run bucky run -t linkstatus -d -D sp -c sp_link_1
27
27
  [ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
28
- }
28
+ }
29
+
30
+ @test "[linkstatus] #6 After executing linkstatus with excluding by normal, results not contain target link url and no failures/errors." {
31
+ run bucky run -t linkstatus -d -D pc -c pc_link_exclude_normal_1
32
+ [ $status -eq 0 ]
33
+ [ $(expr "$output" : ".*http://bucky\.net/test_page.html.*") -eq 0 ]
34
+ }
35
+
36
+ @test "[linkstatus] #7 After executing linkstatus with excluding by asterisk, results not contain target link url and no failures/errors." {
37
+ run bucky run -t linkstatus -d -D pc -c pc_link_exclude_asterisk_1
38
+ [ $status -eq 0 ]
39
+ [ $(expr "$output" : ".*http://bucky\.net/test_page.html.*") -eq 0 ]
40
+ }
41
+
42
+ @test "[linkstatus] #8 After executing linkstatus with excluding by regex, results not contain target link url and no failures/errors." {
43
+ run bucky run -t linkstatus -d -D pc -c pc_link_exclude_regex_1
44
+ [ $status -eq 0 ]
45
+ [ $(expr "$output" : ".*http://bucky\.net/test_page.html.*") -eq 0 ]
46
+ }
47
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bucky-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.16
4
+ version: 0.10.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaotoKishino
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2022-05-16 00:00:00.000000000 Z
16
+ date: 2022-05-23 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: awesome_print
@@ -426,6 +426,9 @@ files:
426
426
  - system_testing/test_bucky_project/services/service_a/pc/scenarios/e2e/setup_teardown_each_pc_e2e.yml
427
427
  - system_testing/test_bucky_project/services/service_a/pc/scenarios/e2e/teardown_each_pc_e2e.yml
428
428
  - system_testing/test_bucky_project/services/service_a/pc/scenarios/linkstatus/pc_link.yml
429
+ - system_testing/test_bucky_project/services/service_a/pc/scenarios/linkstatus/pc_link_exclude_asterisk.yml
430
+ - system_testing/test_bucky_project/services/service_a/pc/scenarios/linkstatus/pc_link_exclude_normal.yml
431
+ - system_testing/test_bucky_project/services/service_a/pc/scenarios/linkstatus/pc_link_exclude_regex.yml
429
432
  - system_testing/test_bucky_project/services/service_a/pc/verifications/index.rb
430
433
  - system_testing/test_bucky_project/services/service_a/sp/pageobject/index.rb
431
434
  - system_testing/test_bucky_project/services/service_a/sp/parts/index.yml