bucky-core 0.9.17 → 0.9.18
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 +4 -4
- data/Dockerfile +2 -0
- data/Gemfile.lock +10 -11
- data/example/hands-on/services/bucky_hands_on/pc/scenarios/e2e/{search_and_asseret.yml → search_and_assert.yml} +0 -0
- data/exe/bucky +3 -0
- data/lib/bucky/core/test_core/exit_handler.rb +29 -0
- data/lib/bucky/core/test_core/test_manager.rb +15 -5
- data/lib/bucky/test_equipment/user_operation/user_operation_helper.rb +2 -1
- data/lib/bucky/version.rb +1 -1
- data/system_testing/test_bucky_project/services/service_a/pc/scenarios/linkstatus/pc_link.yml +5 -1
- data/system_testing/test_specification.md +17 -16
- data/system_testing/testing_code/command.bats +4 -4
- data/system_testing/testing_code/e2e.bats +12 -10
- data/system_testing/testing_code/linkstatus.bats +11 -7
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c9a35a6db4e92a6f47ff536e4d29b4cd7e1d7b2
|
4
|
+
data.tar.gz: 11fae9da7bab42bec0860e8fd02fc108e143ab2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99a3bdb82f048e72fd808db82207e74dcbaad1c03cfca5ab038b56a313af970e3b419bd0076551cfd6779a21e97b8cf8af34d6ed440fe18eb91c3faa436d324c
|
7
|
+
data.tar.gz: 43a3a5a2cfcdee8861151091d0833c90eae749938084a9e5cc11c593d62c2e3990427c696415a196ca84bf582a048cdf66bc6c0ee0ecf6278c2297f4f65f7083
|
data/Dockerfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bucky-core (0.9.
|
4
|
+
bucky-core (0.9.17)
|
5
5
|
addressable (~> 2.5)
|
6
6
|
color_echo (~> 3.1)
|
7
7
|
json (~> 2.1)
|
@@ -15,16 +15,15 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
addressable (2.
|
19
|
-
public_suffix (>= 2.0.2, <
|
18
|
+
addressable (2.7.0)
|
19
|
+
public_suffix (>= 2.0.2, < 5.0)
|
20
20
|
ansi (1.5.0)
|
21
21
|
ast (2.4.0)
|
22
22
|
awesome_print (1.8.0)
|
23
23
|
binding_of_caller (0.8.0)
|
24
24
|
debug_inspector (>= 0.0.1)
|
25
25
|
byebug (9.1.0)
|
26
|
-
childprocess (
|
27
|
-
rake (< 13.0)
|
26
|
+
childprocess (3.0.0)
|
28
27
|
coderay (1.1.2)
|
29
28
|
color_echo (3.1.1)
|
30
29
|
debug_inspector (0.0.3)
|
@@ -50,7 +49,7 @@ GEM
|
|
50
49
|
pry-stack_explorer (0.4.9.2)
|
51
50
|
binding_of_caller (>= 0.7)
|
52
51
|
pry (>= 0.9.11)
|
53
|
-
public_suffix (
|
52
|
+
public_suffix (4.0.1)
|
54
53
|
rainbow (3.0.0)
|
55
54
|
rake (12.3.0)
|
56
55
|
rspec (3.7.0)
|
@@ -77,10 +76,10 @@ GEM
|
|
77
76
|
unicode-display_width (>= 1.4.0, < 1.6)
|
78
77
|
ruby-mysql (2.9.14)
|
79
78
|
ruby-progressbar (1.10.0)
|
80
|
-
rubyzip (
|
81
|
-
selenium-webdriver (3.142.
|
82
|
-
childprocess (>= 0.5, <
|
83
|
-
rubyzip (
|
79
|
+
rubyzip (2.0.0)
|
80
|
+
selenium-webdriver (3.142.6)
|
81
|
+
childprocess (>= 0.5, < 4.0)
|
82
|
+
rubyzip (>= 1.2.2)
|
84
83
|
sequel (4.49.0)
|
85
84
|
simplecov (0.15.1)
|
86
85
|
docile (~> 1.1.0)
|
@@ -91,7 +90,7 @@ GEM
|
|
91
90
|
hirb
|
92
91
|
simplecov
|
93
92
|
simplecov-html (0.10.2)
|
94
|
-
test-unit (3.3.
|
93
|
+
test-unit (3.3.4)
|
95
94
|
power_assert
|
96
95
|
unicode-display_width (1.5.0)
|
97
96
|
|
File without changes
|
data/exe/bucky
CHANGED
@@ -6,6 +6,7 @@ require 'optparse'
|
|
6
6
|
require 'color_echo'
|
7
7
|
require 'fileutils'
|
8
8
|
require_relative '../lib/bucky/version'
|
9
|
+
require_relative '../lib/bucky/core/test_core/exit_handler'
|
9
10
|
|
10
11
|
# Color Settings
|
11
12
|
CE.fg(:cyan)
|
@@ -135,6 +136,7 @@ if ARGV == RUN_COMMAND
|
|
135
136
|
test_cond.each { |k, v| test_cond[k] = v.split(',') if v.instance_of?(String) }
|
136
137
|
require_relative '../lib/bucky/core/test_core/test_manager'
|
137
138
|
Bucky::Core::TestCore::TestManager.new(test_cond).run
|
139
|
+
Bucky::Core::TestCore::ExitHandler.instance.bucky_exit
|
138
140
|
|
139
141
|
elsif ARGV == RERUN_COMMAND
|
140
142
|
$bucky_home_dir = Dir.pwd
|
@@ -146,6 +148,7 @@ elsif ARGV == RERUN_COMMAND
|
|
146
148
|
test_cond.each { |k, v| test_cond[k] = v.split(',') if v.instance_of?(String) }
|
147
149
|
require_relative '../lib/bucky/core/test_core/test_manager'
|
148
150
|
Bucky::Core::TestCore::TestManager.new(test_cond).rerun
|
151
|
+
Bucky::Core::TestCore::ExitHandler.instance.bucky_exit
|
149
152
|
|
150
153
|
elsif ARGV == LINT_COMMAND
|
151
154
|
$bucky_home_dir = Dir.pwd
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'singleton'
|
4
|
+
|
5
|
+
module Bucky
|
6
|
+
module Core
|
7
|
+
module TestCore
|
8
|
+
class ExitHandler
|
9
|
+
include Singleton
|
10
|
+
|
11
|
+
def initialize
|
12
|
+
@exit_code = 0
|
13
|
+
end
|
14
|
+
|
15
|
+
def reset
|
16
|
+
@exit_code = 0
|
17
|
+
end
|
18
|
+
|
19
|
+
def raise
|
20
|
+
@exit_code = 1
|
21
|
+
end
|
22
|
+
|
23
|
+
def bucky_exit
|
24
|
+
exit @exit_code
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -4,6 +4,7 @@ require 'parallel'
|
|
4
4
|
require_relative '../test_core/test_case_loader'
|
5
5
|
require_relative '../../utils/config'
|
6
6
|
require_relative './test_class_generator'
|
7
|
+
require_relative '../test_core/exit_handler'
|
7
8
|
|
8
9
|
module Bucky
|
9
10
|
module Core
|
@@ -26,13 +27,19 @@ module Bucky
|
|
26
27
|
Signal.trap('CLD') { available_workers += 1 }
|
27
28
|
|
28
29
|
data_set.each do |data|
|
29
|
-
# Wait until worker is available
|
30
|
-
|
30
|
+
# Wait until worker is available and handle exit code from previous process
|
31
|
+
unless available_workers.positive?
|
32
|
+
Process.wait
|
33
|
+
Bucky::Core::TestCore::ExitHandler.instance.raise unless $CHILD_STATUS.exitstatus.zero?
|
34
|
+
end
|
31
35
|
# Workers decrease when start working
|
32
36
|
available_workers -= 1
|
33
37
|
fork { block.call(data) }
|
34
38
|
end
|
35
|
-
|
39
|
+
# Handle all exit code in waitall
|
40
|
+
Process.waitall.each do |child|
|
41
|
+
Bucky::Core::TestCore::ExitHandler.instance.raise unless child[1].exitstatus.zero?
|
42
|
+
end
|
36
43
|
end
|
37
44
|
|
38
45
|
def parallel_distribute_into_workers(data_set, max_processes, &block)
|
@@ -45,7 +52,10 @@ module Bucky
|
|
45
52
|
data_for_pre_worker.each { |data| block.call(data) }
|
46
53
|
end
|
47
54
|
end
|
48
|
-
|
55
|
+
# Handle all exit code in waitall
|
56
|
+
Process.waitall.each do |child|
|
57
|
+
Bucky::Core::TestCore::ExitHandler.instance.raise unless child[1].exitstatus.zero?
|
58
|
+
end
|
49
59
|
end
|
50
60
|
end
|
51
61
|
|
@@ -92,7 +102,6 @@ module Bucky
|
|
92
102
|
e2e_parallel_num = Bucky::Utils::Config.instance[:e2e_parallel_num]
|
93
103
|
linkstatus_parallel_num = Bucky::Utils::Config.instance[:linkstatus_parallel_num]
|
94
104
|
tcg = Bucky::Core::TestCore::TestClassGenerator.new(@test_cond)
|
95
|
-
|
96
105
|
case @test_cond[:test_category][0]
|
97
106
|
when 'e2e' then parallel_new_worker_each(test_suite_data, e2e_parallel_num) { |data| tcg.generate_test_class(data) }
|
98
107
|
when 'linkstatus' then
|
@@ -103,6 +112,7 @@ module Bucky
|
|
103
112
|
|
104
113
|
def execute_test
|
105
114
|
@re_test_count.times do |i|
|
115
|
+
Bucky::Core::TestCore::ExitHandler.instance.reset
|
106
116
|
$round = i + 1
|
107
117
|
test_suite_data = load_test_suites
|
108
118
|
do_test_suites(test_suite_data)
|
@@ -26,7 +26,8 @@ module Bucky
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def input(args)
|
29
|
-
|
29
|
+
# when input successfully, return of click is nil.
|
30
|
+
wait_until_helper(5, 0.1, Selenium::WebDriver::Error::StaleElementReferenceError) { @pages.get_part(args).send_keys(args[:word]).nil? }
|
30
31
|
end
|
31
32
|
|
32
33
|
# Clear textbox
|
data/lib/bucky/version.rb
CHANGED
@@ -17,9 +17,9 @@ docker-compose -f docker-compose.system-test.yml down
|
|
17
17
|
| テスト条件 | テスト観点 | テストケース<br/>No. | テストケース | テスト手順 | 期待結果 |
|
18
18
|
|:--|:--|--:|:--|:--|:--|
|
19
19
|
| 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であることを出力される文字列で判断) |
|
20
|
-
| | Verifyが正常に実行できるか<br/>・シナリオコードに実装されたVerifyが実行できること<br/>・titleの確認ができること ※1種類のVerifyが確認できればOK | 2 | assert_titleを実行し、正常に動作すること | 1. bucky run -t e2e -d -D pc -c pc_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>3. assert_titleメソッド実行 | assert_titleメソッド実行後にエラーが発生しないこと<br
|
21
|
-
| | | 3 | assert_titleを実行し、期待値と実際値が異なる場合に正常に検証NG時の動作をすること | 1. bucky run -t e2e -d -D pc -c pc_e2e_2<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>3. assert_titleメソッド実行 | assert_titleメソッド実行後に検証NG
|
22
|
-
| | 各デバイスのUAで正常に実行できるか | 4 | デバイスPCで実行し、正常にテストが実行されること | 1. bucky run -t e2e -d -D pc -c pc_e2e_3<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. assert_textメソッド実行 | assert_textでUseragentを表す文字列をチェックした結果OKであることを出力される文字列で判断<br/><br/>
|
20
|
+
| | Verifyが正常に実行できるか<br/>・シナリオコードに実装されたVerifyが実行できること<br/>・titleの確認ができること ※1種類のVerifyが確認できればOK | 2 | assert_titleを実行し、正常に動作すること | 1. bucky run -t e2e -d -D pc -c pc_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>3. assert_titleメソッド実行 | assert_titleメソッド実行後にエラーが発生しないこと<br/>終了後のステータスが0であること |
|
21
|
+
| | | 3 | assert_titleを実行し、期待値と実際値が異なる場合に正常に検証NG時の動作をすること | 1. bucky run -t e2e -d -D pc -c pc_e2e_2<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>3. assert_titleメソッド実行 | assert_titleメソッド実行後に検証NG判定されたことを表す文字列が表示されること<br/>終了後のステータスが1であること |
|
22
|
+
| | 各デバイスのUAで正常に実行できるか | 4 | デバイスPCで実行し、正常にテストが実行されること | 1. bucky run -t e2e -d -D pc -c pc_e2e_3<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. assert_textメソッド実行 | assert_textでUseragentを表す文字列をチェックした結果OKであることを出力される文字列で判断<br/><br/> |
|
23
23
|
| | | 5 | デバイスSPで実行し、正常にテストが実行されること | 1. bucky run -t e2e -d -D sp -c sp_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. assert_textメソッド実行 | assert_textでUseragentを表す文字列をチェックした結果OKであることを出力される文字列で判断<br/><br/>Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1 |
|
24
24
|
| | | 6 | デバイスTabletで実行し、正常にテストが実行されること | 1. bucky run -t e2e -d -D tablet -c tablet_e2e_1<br/>- 以下シナリオファイル内の処理 -<br/>2. goメソッド実行 (http://bucky.net)<br/>2. assert_textメソッド実行 | assert_textでUseragentを表す文字列をチェックした結果OKであることを出力される文字列で判断<br/><br/>Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1 |
|
25
25
|
| | 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であることを出力される文字列で判断) |
|
@@ -28,16 +28,17 @@ docker-compose -f docker-compose.system-test.yml down
|
|
28
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
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
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 |
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
| |
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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」 と表示されること |
|
@@ -13,19 +13,19 @@ teardown() {
|
|
13
13
|
rm -rf /tmp/$BUCKY_PROJECT_NAME
|
14
14
|
}
|
15
15
|
|
16
|
-
@test "#
|
16
|
+
@test "#15 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 "#
|
21
|
+
@test "#16 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 "#
|
28
|
+
@test "#17 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 "#
|
38
|
+
@test "#18 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 ]
|
@@ -9,14 +9,16 @@ setup() {
|
|
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
|
12
|
+
@test "#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
|
+
[ $status -eq 0 ]
|
14
15
|
[ $(expr "$output" : ".*:verify.*assert_title.*") -ne 0 ]
|
15
16
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
16
17
|
}
|
17
18
|
|
18
|
-
@test "#03 After executing e2e verify assert_title, results contain verify words and 1 failure" {
|
19
|
+
@test "#03 After executing e2e verify assert_title, results contain verify words and 1 failure and exit code is 1" {
|
19
20
|
run bucky run -t e2e -d -D pc -c pc_e2e_2
|
21
|
+
[ $status -eq 1 ]
|
20
22
|
[ $(expr "$output" : ".*:verify.*assert_title.*") -ne 0 ]
|
21
23
|
[ $(expr "$output" : ".*1 failures.*") -ne 0 ]
|
22
24
|
}
|
@@ -54,47 +56,47 @@ setup() {
|
|
54
56
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
55
57
|
}
|
56
58
|
|
57
|
-
@test "#
|
59
|
+
@test "#19 When 'when condition' is added, results have no failures nor errors" {
|
58
60
|
export STAGE=development
|
59
61
|
run bucky run -t e2e -d -D pc -c pc_e2e_4
|
60
62
|
[ $(expr "$output" : ".*click.*") -ne 0 ]
|
61
63
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
62
64
|
}
|
63
65
|
|
64
|
-
@test "#
|
66
|
+
@test "#20 When 'when condition' is not added, results have no click procedure" {
|
65
67
|
run bucky run -t e2e -d -D pc -c pc_e2e_4
|
66
68
|
[ $(expr "$output" : ".*click.*") -eq 0 ]
|
67
69
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
68
70
|
}
|
69
71
|
|
70
|
-
@test "#
|
72
|
+
@test "#21 When 'different when condition' is added, results have no click procedure" {
|
71
73
|
export STAGE=staging
|
72
74
|
run bucky run -t e2e -d -D pc -c pc_e2e_4
|
73
75
|
[ $(expr "$output" : ".*click.*") -eq 0 ]
|
74
76
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
75
77
|
}
|
76
78
|
|
77
|
-
@test "#
|
79
|
+
@test "#22 When click second element from scenario, results have no failures nor errors" {
|
78
80
|
run bucky run -t e2e -d -D pc -c pc_e2e_5
|
79
81
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
80
82
|
}
|
81
83
|
|
82
|
-
@test "#
|
84
|
+
@test "#23 When click element from PageObject file, results have no failures nor errors" {
|
83
85
|
run bucky run -t e2e -d -D pc -c pc_e2e_6
|
84
86
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
85
87
|
}
|
86
88
|
|
87
|
-
@test "#
|
89
|
+
@test "#24 When click second element from PageObject file, results have no failures nor errors" {
|
88
90
|
run bucky run -t e2e -d -D pc -c pc_e2e_7
|
89
91
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
90
92
|
}
|
91
93
|
|
92
|
-
@test "#
|
94
|
+
@test "#25 When click element from Verification file, results have no failures nor errors" {
|
93
95
|
run bucky run -t e2e -d -D pc -c pc_e2e_8
|
94
96
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
95
97
|
}
|
96
98
|
|
97
|
-
@test "#
|
99
|
+
@test "#26 When click second element from Verification file, results have no failures nor errors" {
|
98
100
|
run bucky run -t e2e -d -D pc -c pc_e2e_9
|
99
101
|
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
100
102
|
}
|
@@ -4,21 +4,25 @@ setup() {
|
|
4
4
|
cd /bucky-core/system_testing/test_bucky_project
|
5
5
|
}
|
6
6
|
|
7
|
-
|
8
|
-
# No failures and errors
|
9
|
-
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
10
|
-
}
|
11
|
-
|
12
|
-
@test "#10,#12 After executing linkstatus on pc , results contain target base url and no failures/errors." {
|
7
|
+
@test "#10,#12 After executing linkstatus on pc , results contain target base url, no failures/errors and exit code is 0." {
|
13
8
|
run bucky run -t linkstatus -d -D pc -c pc_link_1
|
9
|
+
[ $status -eq 0 ]
|
14
10
|
[ $(expr "$output" : ".*http://bucky\.net.*") -ne 0 ]
|
11
|
+
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
15
12
|
}
|
16
13
|
|
17
14
|
@test "#11 After executing linkstatus on pc , results contain target link url and no failures/errors." {
|
18
15
|
run bucky run -t linkstatus -d -D pc -c pc_link_1
|
19
16
|
[ $(expr "$output" : ".*http://bucky\.net/test_page.html.*") -ne 0 ]
|
17
|
+
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
18
|
+
}
|
19
|
+
|
20
|
+
@test "#13 After executing linkstatus failed test, exit code is 1" {
|
21
|
+
run bucky run -t linkstatus -d -D pc -c pc_link_2
|
22
|
+
[ $status -eq 1 ]
|
20
23
|
}
|
21
24
|
|
22
|
-
@test "#
|
25
|
+
@test "#14 After executing linkstatus on sp , results have no failures nor errors" {
|
23
26
|
run bucky run -t linkstatus -d -D sp -c sp_link_1
|
27
|
+
[ $(expr "$output" : ".*0 failures, 0 errors,.*") -ne 0 ]
|
24
28
|
}
|
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.9.
|
4
|
+
version: 0.9.18
|
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: 2019-
|
16
|
+
date: 2019-10-15 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: awesome_print
|
@@ -360,7 +360,7 @@ files:
|
|
360
360
|
- example/hands-on/services/bucky_hands_on/pc/pageobject/github_top.rb
|
361
361
|
- example/hands-on/services/bucky_hands_on/pc/parts/github_search_list.yml
|
362
362
|
- example/hands-on/services/bucky_hands_on/pc/parts/github_top.yml
|
363
|
-
- example/hands-on/services/bucky_hands_on/pc/scenarios/e2e/
|
363
|
+
- example/hands-on/services/bucky_hands_on/pc/scenarios/e2e/search_and_assert.yml
|
364
364
|
- example/hands-on/services/bucky_hands_on/pc/scenarios/linkstatus/github_top.yml
|
365
365
|
- example/hands-on/system/evidences/README.md
|
366
366
|
- example/hands-on/system/evidences/screen_shots/README.md
|
@@ -371,6 +371,7 @@ files:
|
|
371
371
|
- lib/bucky/core/database/test_data_operator.rb
|
372
372
|
- lib/bucky/core/exception/bucky_exception.rb
|
373
373
|
- lib/bucky/core/report/screen_shot_generator.rb
|
374
|
+
- lib/bucky/core/test_core/exit_handler.rb
|
374
375
|
- lib/bucky/core/test_core/test_case_loader.rb
|
375
376
|
- lib/bucky/core/test_core/test_class_generator.rb
|
376
377
|
- lib/bucky/core/test_core/test_manager.rb
|