bucky-core 0.9.23 → 0.10.1
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/.dockerignore +2 -1
- data/Gemfile.lock +6 -6
- data/example/README.md +1 -1
- data/example/bucky-management/README.md +1 -1
- data/example/bucky-management/services/bucky_example/pc/scenarios/e2e/search_and_assert.yml +1 -1
- data/example/hands-on/services/bucky_hands_on/pc/scenarios/e2e/search_and_assert.yml +1 -1
- data/lib/bucky/core/exception/bucky_exception.rb +7 -4
- data/lib/bucky/core/test_core/test_class_generator.rb +2 -2
- data/lib/bucky/test_equipment/pageobject/base_pageobject.rb +0 -2
- data/lib/bucky/test_equipment/test_case/e2e_test_case.rb +4 -4
- data/lib/bucky/test_equipment/user_operation/user_operator.rb +5 -5
- data/lib/bucky/test_equipment/verifications/service_verifications.rb +4 -6
- data/lib/bucky/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 254fcca4cc4661ca3a1e2f458bba3435c170cbc4
|
4
|
+
data.tar.gz: 91eb0463910555b1dee2ec93f932e4557782c560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 073f81e07d824613ef9aedf9440ef2498b51452c21b41a1d8e75b26f1ec46bf74bc1d702eed40b67e1f7e97a46697158c925d0596ac713f0ba2337b140203fa8
|
7
|
+
data.tar.gz: 763a2d342173396d824142b41fe37821a6e2d797de38fea437480c83afa68dcc089e903653c455a5cab571348a7b0175f7fe6bbf70ab1b585bb9341ff0af9b93
|
data/.dockerignore
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.23)
|
5
5
|
addressable (~> 2.5)
|
6
6
|
color_echo (~> 3.1)
|
7
7
|
json (~> 2.1)
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
json (2.1.0)
|
35
35
|
method_source (0.9.0)
|
36
36
|
mini_portile2 (2.4.0)
|
37
|
-
nokogiri (1.10.
|
37
|
+
nokogiri (1.10.8)
|
38
38
|
mini_portile2 (~> 2.4.0)
|
39
39
|
parallel (1.12.1)
|
40
40
|
parser (2.6.3.0)
|
@@ -49,7 +49,7 @@ GEM
|
|
49
49
|
pry-stack_explorer (0.4.9.2)
|
50
50
|
binding_of_caller (>= 0.7)
|
51
51
|
pry (>= 0.9.11)
|
52
|
-
public_suffix (4.0.
|
52
|
+
public_suffix (4.0.3)
|
53
53
|
rainbow (3.0.0)
|
54
54
|
rake (12.3.0)
|
55
55
|
rspec (3.7.0)
|
@@ -76,8 +76,8 @@ GEM
|
|
76
76
|
unicode-display_width (>= 1.4.0, < 1.6)
|
77
77
|
ruby-mysql (2.9.14)
|
78
78
|
ruby-progressbar (1.10.0)
|
79
|
-
rubyzip (2.
|
80
|
-
selenium-webdriver (3.142.
|
79
|
+
rubyzip (2.2.0)
|
80
|
+
selenium-webdriver (3.142.7)
|
81
81
|
childprocess (>= 0.5, < 4.0)
|
82
82
|
rubyzip (>= 1.2.2)
|
83
83
|
sequel (4.49.0)
|
@@ -90,7 +90,7 @@ GEM
|
|
90
90
|
hirb
|
91
91
|
simplecov
|
92
92
|
simplecov-html (0.10.2)
|
93
|
-
test-unit (3.3.
|
93
|
+
test-unit (3.3.5)
|
94
94
|
power_assert
|
95
95
|
unicode-display_width (1.5.0)
|
96
96
|
|
data/example/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
## You can check the example code in each directory
|
2
2
|
* [hands-on](https://github.com/lifull-dev/bucky-core/blob/master/example/hands-on)
|
3
|
-
* [
|
3
|
+
* [bucky-management](https://github.com/lifull-dev/bucky-core/blob/master/example/bucky-management)
|
@@ -19,7 +19,7 @@ cd {test project name}
|
|
19
19
|
|
20
20
|
## 2. Sets connect information to DB
|
21
21
|
- Use default value as following if you didn't change anything in Bucky-management's docker-compose.yml
|
22
|
-
- Database name is according to what you set in RAILS_ENV when startup
|
22
|
+
- Database name is according to what you set in RAILS_ENV when startup Bucky-management
|
23
23
|
```
|
24
24
|
## config/test_db_config.yml ##
|
25
25
|
|
@@ -10,7 +10,7 @@ cases:
|
|
10
10
|
# You should create test case name as {test suite name + _ + number}
|
11
11
|
- case_name: search_and_assert_1
|
12
12
|
func: transition
|
13
|
-
desc: Should able to search bucky-core in github, and move to bucky-core page.
|
13
|
+
desc: Should be able to search bucky-core in github, and move to bucky-core page.
|
14
14
|
# Procedures to do in this case
|
15
15
|
procs:
|
16
16
|
- proc: Open github top page
|
@@ -10,7 +10,7 @@ cases:
|
|
10
10
|
# You should create test case name as {test suite name + _ + number}
|
11
11
|
- case_name: search_and_assert_1
|
12
12
|
func: transition
|
13
|
-
desc: Should able to search bucky-core in github, and move to bucky-core page.
|
13
|
+
desc: Should be able to search bucky-core in github, and move to bucky-core page.
|
14
14
|
# Procedures to do in this case
|
15
15
|
procs:
|
16
16
|
- proc: Open github top page
|
@@ -11,7 +11,8 @@ module Bucky
|
|
11
11
|
class << self
|
12
12
|
# Error handling on bucky framework
|
13
13
|
# @param [Object] err exception object
|
14
|
-
|
14
|
+
# @param [String] proc_name
|
15
|
+
def handle(err, _proc_name)
|
15
16
|
Bucky::Utils::BuckyLogger.write(Bucky::Utils::Config.instance[:bucky_error], err)
|
16
17
|
end
|
17
18
|
end
|
@@ -19,7 +20,7 @@ module Bucky
|
|
19
20
|
|
20
21
|
class DbConnectorException < Bucky::Core::Exception::BuckyException
|
21
22
|
class << self
|
22
|
-
def handle(err)
|
23
|
+
def handle(err, proc_name = nil)
|
23
24
|
super
|
24
25
|
raise err
|
25
26
|
end
|
@@ -28,9 +29,11 @@ module Bucky
|
|
28
29
|
|
29
30
|
class WebdriverException < Bucky::Core::Exception::BuckyException
|
30
31
|
class << self
|
31
|
-
def handle(err)
|
32
|
+
def handle(err, proc_name = nil)
|
32
33
|
super
|
33
|
-
raise err
|
34
|
+
raise err if proc_name.nil?
|
35
|
+
|
36
|
+
raise(err.class, "#{err.message}\nFail in proc: ##{proc_name}")
|
34
37
|
end
|
35
38
|
end
|
36
39
|
end
|
@@ -15,9 +15,9 @@ module Bucky
|
|
15
15
|
|
16
16
|
def add_test_procedure(procedures)
|
17
17
|
procedures.each.with_index(1) do |procedure, index|
|
18
|
-
puts " #{index}
|
18
|
+
puts procedure[:proc].insert(0, " #{index}:") if procedure.key?(:proc)
|
19
19
|
method = procedure[:exec].key?(:operate) ? :operate : :verify
|
20
|
-
send(method, procedure
|
20
|
+
send(method, procedure)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -37,15 +37,15 @@ module Bucky
|
|
37
37
|
end
|
38
38
|
|
39
39
|
# Call mothod of verification
|
40
|
-
# @param [Hash] verify_args e.g.) {verify: "assert_title", expect: "page title"}
|
40
|
+
# @param [Hash] verify_args e.g.) {:proc=>"proc discretion", :exec=>{verify: "assert_title", expect: "page title"}}
|
41
41
|
def verify(**verify_args)
|
42
|
-
@service_verifications.send(verify_args[:verify], verify_args)
|
42
|
+
@service_verifications.send(verify_args[:exec][:verify], verify_args)
|
43
43
|
end
|
44
44
|
|
45
45
|
# Call method of user operation
|
46
|
-
# @param [Hash] op_args e.g.){page: '
|
46
|
+
# @param [Hash] op_args e.g.){:proc=>"proc discretion", :exec=>{page: 'top_page', part: 'fizz_button', operation: 'click'}}
|
47
47
|
def operate(**op_args)
|
48
|
-
@user_operator.send(op_args[:operate], method_name, op_args)
|
48
|
+
@user_operator.send(op_args[:exec][:operate], method_name, op_args)
|
49
49
|
end
|
50
50
|
|
51
51
|
def setup
|
@@ -22,19 +22,19 @@ module Bucky
|
|
22
22
|
def method_missing(operation, test_case_name, **args)
|
23
23
|
@operation = operation
|
24
24
|
@test_case_name = test_case_name
|
25
|
-
Bucky::Utils::BuckyLogger.write(test_case_name, args)
|
25
|
+
Bucky::Utils::BuckyLogger.write(test_case_name, args[:exec])
|
26
26
|
|
27
27
|
# Call method of UserOperationHelper
|
28
|
-
return @operation_helper.send(@operation, args) if @operation_helper.methods.include?(@operation)
|
28
|
+
return @operation_helper.send(@operation, args[:exec]) if @operation_helper.methods.include?(@operation)
|
29
29
|
|
30
30
|
# Call method of page object
|
31
31
|
# e.g) {page: 'top', operation: 'input_freeword', word: 'testing word'}
|
32
|
-
return page_method(args) if args.key?(:page) && !args.key?(:part)
|
32
|
+
return page_method(args[:exec]) if args[:exec].key?(:page) && !args[:exec].key?(:part)
|
33
33
|
|
34
34
|
# Call method of part
|
35
|
-
part_mothod(args) if args.key?(:part)
|
35
|
+
part_mothod(args[:exec]) if args[:exec].key?(:part)
|
36
36
|
rescue StandardError => e
|
37
|
-
Bucky::Core::Exception::WebdriverException.handle(e)
|
37
|
+
Bucky::Core::Exception::WebdriverException.handle(e, args[:proc].strip)
|
38
38
|
end
|
39
39
|
|
40
40
|
private
|
@@ -26,14 +26,12 @@ module Bucky
|
|
26
26
|
def method_missing(verification, **args)
|
27
27
|
if e2e_verification.respond_to? verification
|
28
28
|
puts " #{verification} is defined in E2eVerificationClass."
|
29
|
-
e2e_verification.send(verification, args)
|
30
|
-
elsif args.key?(:page)
|
31
|
-
send(args[:page]).send(verification, args)
|
29
|
+
e2e_verification.send(verification, args[:exec])
|
30
|
+
elsif args[:exec].key?(:page)
|
31
|
+
send(args[:exec][:page]).send(verification, args[:exec])
|
32
32
|
else
|
33
|
-
raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args}"
|
33
|
+
raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args[:exec]}"
|
34
34
|
end
|
35
|
-
rescue StandardError => e
|
36
|
-
raise e
|
37
35
|
end
|
38
36
|
|
39
37
|
private
|
data/lib/bucky/version.rb
CHANGED
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.
|
4
|
+
version: 0.10.1
|
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:
|
16
|
+
date: 2020-02-20 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: awesome_print
|