bucky-core 0.10.25 → 0.10.27
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/.circleci/config.yml +8 -5
- data/.rubocop.yml +17 -16
- data/.rubocop_todo.yml +3 -3
- data/Dockerfile +2 -2
- data/Dockerfile.dev +2 -2
- data/Dockerfile.system-test +7 -8
- data/Gemfile.lock +71 -56
- data/bucky-core.gemspec +7 -7
- data/docker-compose.dev-with-bm.yml +3 -2
- data/docker-compose.system-test.yml +11 -4
- data/lib/bucky/core/database/db_connector.rb +6 -1
- data/lib/bucky/core/test_core/test_class_generator.rb +4 -4
- data/lib/bucky/test_equipment/selenium_handler/webdriver_handler.rb +25 -18
- data/lib/bucky/test_equipment/test_case/e2e_test_case.rb +3 -3
- data/lib/bucky/test_equipment/user_operation/user_operation_helper.rb +11 -11
- data/lib/bucky/test_equipment/verifications/service_verifications.rb +3 -3
- data/lib/bucky/utils/config.rb +2 -2
- data/lib/bucky/utils/yaml_load.rb +5 -1
- data/lib/bucky/version.rb +1 -1
- data/system_testing/test_bucky_project/services/service_a/pc/scenarios/e2e/pc_e2e.yml +2 -1
- data/system_testing/testing_code/e2e.bats +1 -1
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee7df04195079058c1436ce50e2f56dc33fd09522511675bf707a19b6a09650a
|
4
|
+
data.tar.gz: 6e7af3108faf5d630364ca7f57b3b583a9b0ca5646d1401f89407ab93c18715f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fe3596f14007729b9925ff626836c56d43f9461a1aefebc7ea4b744a4df154685cc6fb8e8e2a862db8f62a01c44b307fbfe65fcc36cf16a056751a04c4f424fb
|
7
|
+
data.tar.gz: 886d1ef5db5874d82317712420dd7351ca81e5a6add75f73102dc06632d076e319bcd39aae27e770fb91f963459a7fc9d17ccc9aa784da0f5e9fd5db86d7487d
|
data/.circleci/config.yml
CHANGED
@@ -37,7 +37,7 @@ jobs:
|
|
37
37
|
unit_test:
|
38
38
|
working_directory: ~/bucky-core
|
39
39
|
docker:
|
40
|
-
- image:
|
40
|
+
- image: cimg/ruby:3.2.0
|
41
41
|
environment:
|
42
42
|
CC_TEST_REPORTER_ID: fd7bd9d517bdf8953c4d4803ca4ad7539d12d5c760048b8daf80cbc7d54fb262
|
43
43
|
steps:
|
@@ -62,7 +62,7 @@ jobs:
|
|
62
62
|
./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?
|
63
63
|
static_code_analysis:
|
64
64
|
docker:
|
65
|
-
- image:
|
65
|
+
- image: cimg/ruby:3.2.0
|
66
66
|
steps:
|
67
67
|
- checkout
|
68
68
|
- type: cache-restore
|
@@ -72,12 +72,15 @@ jobs:
|
|
72
72
|
key: syntax-check-{{ checksum "Gemfile.lock" }}
|
73
73
|
paths:
|
74
74
|
- vendor/bundle
|
75
|
-
- run:
|
75
|
+
- run:
|
76
|
+
name: Run RuboCop on changed files
|
77
|
+
command: |
|
78
|
+
git diff --name-only origin/master...HEAD -- '*.rb' | xargs -r bundle exec rubocop -f html --out report.html
|
76
79
|
- store_artifacts:
|
77
80
|
path: report.html
|
78
81
|
publish_to_rubygems:
|
79
82
|
docker:
|
80
|
-
- image:
|
83
|
+
- image: cimg/ruby:3.2.0
|
81
84
|
steps:
|
82
85
|
- add_ssh_keys:
|
83
86
|
finerprints:
|
@@ -132,4 +135,4 @@ workflows:
|
|
132
135
|
branches:
|
133
136
|
ignore: /.*/
|
134
137
|
requires:
|
135
|
-
- publish_to_rubygems
|
138
|
+
- publish_to_rubygems
|
data/.rubocop.yml
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
inherit_from: .rubocop_todo.yml
|
2
2
|
|
3
3
|
AllCops:
|
4
|
+
NewCops: disable
|
4
5
|
Exclude:
|
5
6
|
- 'lib/bucky/test_equipment/user_operation/user_operation_helper.rb'
|
6
7
|
- 'spec/fixtures/**/*'
|
@@ -8,16 +9,16 @@ AllCops:
|
|
8
9
|
- 'template/**/*'
|
9
10
|
- 'tmp/**/*'
|
10
11
|
- 'vendor/**/*'
|
11
|
-
TargetRubyVersion: 2
|
12
|
+
TargetRubyVersion: 3.2
|
12
13
|
|
13
|
-
AbcSize:
|
14
|
+
Metrics/AbcSize:
|
14
15
|
Enabled: false
|
15
16
|
|
16
17
|
# Allow method prefix start with 'set_' and 'get_'
|
17
|
-
AccessorMethodName:
|
18
|
+
Naming/AccessorMethodName:
|
18
19
|
Enabled: false
|
19
20
|
|
20
|
-
BlockLength:
|
21
|
+
Metrics/BlockLength:
|
21
22
|
Exclude:
|
22
23
|
- 'Rakefile'
|
23
24
|
- '**/*.rake'
|
@@ -26,53 +27,53 @@ BlockLength:
|
|
26
27
|
- 'lib/bucky/core/database/test_data_operator.rb'
|
27
28
|
- 'lib/bucky/core/test_core/test_class_generator.rb'
|
28
29
|
|
29
|
-
ClassVars:
|
30
|
+
Style/ClassVars:
|
30
31
|
Exclude:
|
31
32
|
- 'lib/bucky/test_equipment/selenium_handler/webdriver_handler.rb'
|
32
33
|
- 'lib/bucky/test_equipment/test_case/abst_test_case.rb'
|
33
34
|
- 'lib/bucky/utils/config.rb'
|
34
35
|
- 'lib/bucky/tools/lint.rb'
|
35
36
|
|
36
|
-
CyclomaticComplexity:
|
37
|
+
Metrics/CyclomaticComplexity:
|
37
38
|
Enabled: false
|
38
39
|
|
39
40
|
# Allow missing top-level documentation comment of class
|
40
|
-
Documentation:
|
41
|
+
Style/Documentation:
|
41
42
|
Enabled: false
|
42
43
|
|
43
|
-
FrozenStringLiteralComment:
|
44
|
+
Style/FrozenStringLiteralComment:
|
44
45
|
EnforcedStyle: always
|
45
46
|
|
46
|
-
GlobalVars:
|
47
|
+
Style/GlobalVars:
|
47
48
|
AllowedVariables: [$bucky_home_dir, $debug, $job_id, $round]
|
48
49
|
|
49
50
|
# Not allow using '->' for multi-line lambdas.
|
50
|
-
Lambda:
|
51
|
+
Style/Lambda:
|
51
52
|
Enabled: false
|
52
53
|
|
53
|
-
LineLength:
|
54
|
+
Layout/LineLength:
|
54
55
|
Enabled: false
|
55
56
|
|
56
57
|
Lint/AmbiguousBlockAssociation:
|
57
58
|
Exclude:
|
58
59
|
- 'spec/**/*.rb'
|
59
60
|
|
60
|
-
MethodLength:
|
61
|
+
Metrics/MethodLength:
|
61
62
|
Enabled: false
|
62
63
|
|
63
|
-
ModuleLength:
|
64
|
+
Metrics/ModuleLength:
|
64
65
|
Max: 140
|
65
66
|
Exclude:
|
66
67
|
- 'spec/**/*.rb'
|
67
68
|
|
68
|
-
PerceivedComplexity:
|
69
|
+
Metrics/PerceivedComplexity:
|
69
70
|
Enabled: false
|
70
71
|
|
71
|
-
UselessAssignment:
|
72
|
+
Lint/UselessAssignment:
|
72
73
|
Exclude:
|
73
74
|
- 'lib/bucky/core/test_core/test_result.rb'
|
74
75
|
|
75
|
-
ClassLength:
|
76
|
+
Metrics/ClassLength:
|
76
77
|
Max: 110
|
77
78
|
|
78
79
|
Lint/UselessAccessModifier:
|
data/.rubocop_todo.yml
CHANGED
@@ -29,7 +29,7 @@ Style/AccessModifierDeclarations:
|
|
29
29
|
- 'lib/bucky/utils/bucky_logger.rb'
|
30
30
|
|
31
31
|
# Offense count: 2
|
32
|
-
|
32
|
+
Lint/MissingSuper:
|
33
33
|
Exclude:
|
34
34
|
- 'lib/bucky/test_equipment/user_operation/user_operator.rb'
|
35
35
|
- 'lib/bucky/test_equipment/verifications/service_verifications.rb'
|
@@ -43,9 +43,9 @@ Style/MissingRespondToMissing:
|
|
43
43
|
# Offense count: 229
|
44
44
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
45
45
|
# URISchemes: http, https
|
46
|
-
|
46
|
+
Layout/LineLength:
|
47
47
|
Max: 225
|
48
48
|
|
49
49
|
Style/ExpandPathArguments:
|
50
50
|
Exclude:
|
51
|
-
- 'bucky-core.gemspec' # for lifull gem
|
51
|
+
- 'bucky-core.gemspec' # for lifull gem
|
data/Dockerfile
CHANGED
data/Dockerfile.dev
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
FROM ruby:2
|
1
|
+
FROM ruby:3.2-alpine
|
2
2
|
ENV LANG ja_JP.UTF-8
|
3
3
|
ENV PAGER busybox less
|
4
4
|
|
@@ -27,7 +27,7 @@ ENV PATH /bucky-core/exe/:$PATH
|
|
27
27
|
WORKDIR $BC_DIR
|
28
28
|
COPY . $BC_DIR
|
29
29
|
RUN \
|
30
|
-
gem install bundler -v
|
30
|
+
gem install bundler -v 2.5.18 && \
|
31
31
|
echo 'gem: --no-document' >> ~/.gemrc && \
|
32
32
|
cp ~/.gemrc /etc/gemrc && \
|
33
33
|
chmod uog+r /etc/gemrc && \
|
data/Dockerfile.system-test
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
FROM ruby:2
|
1
|
+
FROM ruby:3.2-alpine
|
2
2
|
ENV LANG ja_JP.UTF-8
|
3
3
|
ENV PAGER busybox less
|
4
4
|
|
5
5
|
RUN apk update && \
|
6
6
|
apk upgrade && \
|
7
|
-
apk add --update\
|
7
|
+
apk add --update \
|
8
8
|
bash \
|
9
9
|
build-base \
|
10
10
|
curl-dev \
|
@@ -24,18 +24,17 @@ RUN apk update && \
|
|
24
24
|
curl \
|
25
25
|
parallel
|
26
26
|
|
27
|
-
RUN git clone https://github.com/bats-core/bats-core.git /tmp/bats-core \
|
28
|
-
|
29
|
-
|
30
|
-
|
27
|
+
RUN git clone https://github.com/bats-core/bats-core.git /tmp/bats-core && \
|
28
|
+
cd /tmp/bats-core && \
|
29
|
+
./install.sh /usr/local && \
|
30
|
+
rm -rf /tmp/bats-core
|
31
31
|
|
32
32
|
ENV BC_DIR /bucky-core/
|
33
33
|
ENV PATH /bucky-core/exe/:$PATH
|
34
34
|
WORKDIR $BC_DIR
|
35
35
|
COPY . $BC_DIR
|
36
36
|
|
37
|
-
RUN \
|
38
|
-
gem install bundler -v 1.17.3 && \
|
37
|
+
RUN gem install bundler -v 2.5.18 && \
|
39
38
|
echo 'gem: --no-document' >> ~/.gemrc && \
|
40
39
|
cp ~/.gemrc /etc/gemrc && \
|
41
40
|
chmod uog+r /etc/gemrc && \
|
data/Gemfile.lock
CHANGED
@@ -1,88 +1,102 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bucky-core (0.10.
|
4
|
+
bucky-core (0.10.25)
|
5
5
|
addressable (~> 2.5)
|
6
6
|
color_echo (~> 3.1)
|
7
7
|
json (~> 2.3.0)
|
8
8
|
nokogiri (~> 1.11.1)
|
9
9
|
parallel (~> 1.11)
|
10
10
|
ruby-mysql (~> 2.9)
|
11
|
-
selenium-webdriver (
|
12
|
-
sequel (
|
11
|
+
selenium-webdriver (= 4.24)
|
12
|
+
sequel (= 5.84)
|
13
13
|
test-unit (~> 3.2)
|
14
14
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
addressable (2.7
|
19
|
-
public_suffix (>= 2.0.2, <
|
18
|
+
addressable (2.8.7)
|
19
|
+
public_suffix (>= 2.0.2, < 7.0)
|
20
20
|
ansi (1.5.0)
|
21
|
-
ast (2.4.
|
22
|
-
awesome_print (1.
|
23
|
-
|
24
|
-
|
21
|
+
ast (2.4.2)
|
22
|
+
awesome_print (1.9.2)
|
23
|
+
base64 (0.2.0)
|
24
|
+
bigdecimal (3.1.8)
|
25
|
+
binding_of_caller (1.0.1)
|
26
|
+
debug_inspector (>= 1.2.0)
|
25
27
|
byebug (11.1.3)
|
26
|
-
childprocess (3.0.0)
|
27
28
|
coderay (1.1.3)
|
28
29
|
color_echo (3.1.1)
|
29
|
-
debug_inspector (1.
|
30
|
-
diff-lcs (1.
|
30
|
+
debug_inspector (1.2.0)
|
31
|
+
diff-lcs (1.5.1)
|
31
32
|
docile (1.1.5)
|
32
33
|
hirb (0.7.3)
|
33
|
-
jaro_winkler (1.5.4)
|
34
34
|
json (2.3.1)
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
language_server-protocol (3.17.0.3)
|
36
|
+
logger (1.6.1)
|
37
|
+
method_source (1.1.0)
|
38
|
+
mini_portile2 (2.5.3)
|
39
|
+
nokogiri (1.11.7)
|
38
40
|
mini_portile2 (~> 2.5.0)
|
39
41
|
racc (~> 1.4)
|
40
|
-
parallel (1.
|
41
|
-
parser (3.
|
42
|
+
parallel (1.26.3)
|
43
|
+
parser (3.3.5.0)
|
42
44
|
ast (~> 2.4.1)
|
43
|
-
|
44
|
-
|
45
|
+
racc
|
46
|
+
power_assert (2.0.3)
|
47
|
+
pry (0.14.2)
|
45
48
|
coderay (~> 1.1)
|
46
49
|
method_source (~> 1.0)
|
47
|
-
pry-byebug (3.
|
50
|
+
pry-byebug (3.10.1)
|
48
51
|
byebug (~> 11.0)
|
49
|
-
pry (
|
50
|
-
pry-stack_explorer (0.
|
51
|
-
binding_of_caller (~> 0
|
52
|
+
pry (>= 0.13, < 0.15)
|
53
|
+
pry-stack_explorer (0.6.1)
|
54
|
+
binding_of_caller (~> 1.0)
|
52
55
|
pry (~> 0.13)
|
53
|
-
public_suffix (
|
54
|
-
racc (1.
|
55
|
-
rainbow (3.
|
56
|
-
rake (13.
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
rspec-
|
61
|
-
|
62
|
-
rspec-
|
63
|
-
rspec-
|
56
|
+
public_suffix (6.0.1)
|
57
|
+
racc (1.8.1)
|
58
|
+
rainbow (3.1.1)
|
59
|
+
rake (13.2.1)
|
60
|
+
regexp_parser (2.9.2)
|
61
|
+
rexml (3.3.7)
|
62
|
+
rspec (3.13.0)
|
63
|
+
rspec-core (~> 3.13.0)
|
64
|
+
rspec-expectations (~> 3.13.0)
|
65
|
+
rspec-mocks (~> 3.13.0)
|
66
|
+
rspec-core (3.13.1)
|
67
|
+
rspec-support (~> 3.13.0)
|
68
|
+
rspec-expectations (3.13.3)
|
64
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
65
|
-
rspec-support (~> 3.
|
66
|
-
rspec-mocks (3.
|
70
|
+
rspec-support (~> 3.13.0)
|
71
|
+
rspec-mocks (3.13.1)
|
67
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
68
|
-
rspec-support (~> 3.
|
69
|
-
rspec-support (3.
|
70
|
-
rspec_junit_formatter (0.
|
73
|
+
rspec-support (~> 3.13.0)
|
74
|
+
rspec-support (3.13.1)
|
75
|
+
rspec_junit_formatter (0.6.0)
|
71
76
|
rspec-core (>= 2, < 4, != 2.12.0)
|
72
|
-
rubocop (
|
73
|
-
|
77
|
+
rubocop (1.66.1)
|
78
|
+
json (~> 2.3)
|
79
|
+
language_server-protocol (>= 3.17.0)
|
74
80
|
parallel (~> 1.10)
|
75
|
-
parser (>=
|
81
|
+
parser (>= 3.3.0.2)
|
76
82
|
rainbow (>= 2.2.2, < 4.0)
|
83
|
+
regexp_parser (>= 2.4, < 3.0)
|
84
|
+
rubocop-ast (>= 1.32.2, < 2.0)
|
77
85
|
ruby-progressbar (~> 1.7)
|
78
|
-
unicode-display_width (>=
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
87
|
+
rubocop-ast (1.32.3)
|
88
|
+
parser (>= 3.3.1.0)
|
89
|
+
ruby-mysql (2.11.1)
|
90
|
+
ruby-progressbar (1.13.0)
|
91
|
+
rubyzip (2.3.2)
|
92
|
+
selenium-webdriver (4.24.0)
|
93
|
+
base64 (~> 0.2)
|
94
|
+
logger (~> 1.4)
|
95
|
+
rexml (~> 3.2, >= 3.2.5)
|
96
|
+
rubyzip (>= 1.2.2, < 3.0)
|
97
|
+
websocket (~> 1.0)
|
98
|
+
sequel (5.84.0)
|
99
|
+
bigdecimal
|
86
100
|
simplecov (0.15.1)
|
87
101
|
docile (~> 1.1.0)
|
88
102
|
json (>= 1.8, < 3)
|
@@ -92,9 +106,10 @@ GEM
|
|
92
106
|
hirb
|
93
107
|
simplecov
|
94
108
|
simplecov-html (0.10.2)
|
95
|
-
test-unit (3.
|
109
|
+
test-unit (3.6.2)
|
96
110
|
power_assert
|
97
|
-
unicode-display_width (
|
111
|
+
unicode-display_width (2.6.0)
|
112
|
+
websocket (1.2.11)
|
98
113
|
|
99
114
|
PLATFORMS
|
100
115
|
ruby
|
@@ -102,7 +117,7 @@ PLATFORMS
|
|
102
117
|
DEPENDENCIES
|
103
118
|
awesome_print (~> 1.8)
|
104
119
|
bucky-core!
|
105
|
-
bundler (
|
120
|
+
bundler (= 2.5.18)
|
106
121
|
hirb (~> 0.7)
|
107
122
|
pry (~> 0.10)
|
108
123
|
pry-byebug (~> 3.4)
|
@@ -110,9 +125,9 @@ DEPENDENCIES
|
|
110
125
|
rake (~> 13)
|
111
126
|
rspec (~> 3.6)
|
112
127
|
rspec_junit_formatter (~> 0.3)
|
113
|
-
rubocop (
|
128
|
+
rubocop (= 1.66.1)
|
114
129
|
simplecov (~> 0.15.1)
|
115
130
|
simplecov-console (~> 0.4.2)
|
116
131
|
|
117
132
|
BUNDLED WITH
|
118
|
-
|
133
|
+
2.5.18
|
data/bucky-core.gemspec
CHANGED
@@ -20,15 +20,15 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.homepage = 'https://github.com/lifull-dev/bucky-core'
|
21
21
|
spec.license = 'Apache License 2.0'
|
22
22
|
|
23
|
-
spec.files = `git ls-files -z`.split("\x0").reject
|
23
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
24
24
|
f.match(%r{^(test|spec|features)/})
|
25
|
-
|
25
|
+
end
|
26
26
|
spec.bindir = 'exe'
|
27
27
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
30
|
spec.add_development_dependency 'awesome_print', '~> 1.8'
|
31
|
-
spec.add_development_dependency 'bundler', '
|
31
|
+
spec.add_development_dependency 'bundler', '2.5.18'
|
32
32
|
spec.add_development_dependency 'hirb', '~> 0.7'
|
33
33
|
spec.add_development_dependency 'pry', '~> 0.10'
|
34
34
|
spec.add_development_dependency 'pry-byebug', '~> 3.4'
|
@@ -36,17 +36,17 @@ Gem::Specification.new do |spec|
|
|
36
36
|
spec.add_development_dependency 'rake', '~> 13'
|
37
37
|
spec.add_development_dependency 'rspec', '~> 3.6'
|
38
38
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.3'
|
39
|
-
spec.add_development_dependency 'rubocop', '
|
39
|
+
spec.add_development_dependency 'rubocop', '1.66.1'
|
40
40
|
spec.add_development_dependency 'simplecov', '~> 0.15.1'
|
41
41
|
spec.add_development_dependency 'simplecov-console', '~> 0.4.2'
|
42
42
|
|
43
43
|
spec.add_runtime_dependency 'addressable', '~> 2.5'
|
44
44
|
spec.add_runtime_dependency 'color_echo', '~> 3.1'
|
45
45
|
spec.add_runtime_dependency 'json', '~> 2.3.0'
|
46
|
-
spec.add_runtime_dependency 'nokogiri', '
|
46
|
+
spec.add_runtime_dependency 'nokogiri', '1.18.2'
|
47
47
|
spec.add_runtime_dependency 'parallel', '~> 1.11'
|
48
48
|
spec.add_runtime_dependency 'ruby-mysql', '~> 2.9'
|
49
|
-
spec.add_runtime_dependency 'selenium-webdriver', '
|
50
|
-
spec.add_runtime_dependency 'sequel', '
|
49
|
+
spec.add_runtime_dependency 'selenium-webdriver', '4.24'
|
50
|
+
spec.add_runtime_dependency 'sequel', '5.84'
|
51
51
|
spec.add_runtime_dependency 'test-unit', '~> 3.2'
|
52
52
|
end
|
@@ -1,4 +1,3 @@
|
|
1
|
-
version: '3'
|
2
1
|
services:
|
3
2
|
bucky-core:
|
4
3
|
build:
|
@@ -17,12 +16,14 @@ services:
|
|
17
16
|
networks:
|
18
17
|
- bucky-management_default
|
19
18
|
chrome:
|
20
|
-
image: selenium/standalone-
|
19
|
+
image: selenium/standalone-chromium:128.0
|
21
20
|
container_name: chrome
|
22
21
|
ports:
|
23
22
|
- '4444:4444'
|
24
23
|
- '5901:5900'
|
25
24
|
shm_size: 1G
|
25
|
+
networks:
|
26
|
+
- bucky-management_default
|
26
27
|
networks:
|
27
28
|
bucky-management_default:
|
28
29
|
external: true
|
@@ -9,11 +9,18 @@ services:
|
|
9
9
|
- .:/bucky-core
|
10
10
|
tty: true
|
11
11
|
depends_on:
|
12
|
-
|
13
|
-
|
12
|
+
chrome:
|
13
|
+
condition: service_healthy
|
14
|
+
web:
|
15
|
+
condition: service_started
|
14
16
|
chrome:
|
15
17
|
container_name: bucky-chrome
|
16
|
-
image: selenium/standalone-
|
18
|
+
image: selenium/standalone-chromium:128.0
|
19
|
+
healthcheck:
|
20
|
+
test: ["CMD-SHELL", "curl -f http://localhost:4444 || exit 1"]
|
21
|
+
interval: 3s
|
22
|
+
timeout: 5s
|
23
|
+
retries: 2
|
17
24
|
ports:
|
18
25
|
- '4444:4444'
|
19
26
|
# For local debug
|
@@ -21,4 +28,4 @@ services:
|
|
21
28
|
web:
|
22
29
|
container_name: bucky.net
|
23
30
|
build:
|
24
|
-
context: docker/nginx
|
31
|
+
context: docker/nginx
|
@@ -9,6 +9,7 @@ module Bucky
|
|
9
9
|
module Database
|
10
10
|
class DbConnector
|
11
11
|
attr_reader :con
|
12
|
+
|
12
13
|
def initialize
|
13
14
|
@test_db_config = Bucky::Utils::Config.instance[:test_db]
|
14
15
|
end
|
@@ -16,7 +17,11 @@ module Bucky
|
|
16
17
|
# Connect to database
|
17
18
|
# @param [String] db_name database name
|
18
19
|
def connect(db_name = 'bucky_test')
|
19
|
-
@con =
|
20
|
+
@con = if $debug
|
21
|
+
@test_db_config[db_name.to_sym]
|
22
|
+
else
|
23
|
+
Sequel.connect(@test_db_config[db_name.to_sym], encoding: 'utf8')
|
24
|
+
end
|
20
25
|
end
|
21
26
|
|
22
27
|
# Disconnect to database
|
@@ -18,7 +18,7 @@ module Bucky
|
|
18
18
|
procedure[:proc] ||= ''.dup
|
19
19
|
puts " #{step_number}:#{procedure[:proc]}"
|
20
20
|
method = procedure[:exec].key?(:operate) ? :operate : :verify
|
21
|
-
send(method, exec: procedure[:exec], step_number
|
21
|
+
send(method, exec: procedure[:exec], step_number:, proc_name: procedure[:proc])
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -67,7 +67,7 @@ module Bucky
|
|
67
67
|
|
68
68
|
# Class structure is different for each test category
|
69
69
|
case data[:test_category]
|
70
|
-
when 'linkstatus'
|
70
|
+
when 'linkstatus'
|
71
71
|
data[:suite][:cases].each_with_index do |t_case, i|
|
72
72
|
method_name = make_test_method_name(data, t_case, i)
|
73
73
|
description(
|
@@ -75,14 +75,14 @@ module Bucky
|
|
75
75
|
define_method(method_name) do
|
76
76
|
puts "\n#{simple_test_class_name(name)}"
|
77
77
|
t_case[:urls].each do |url|
|
78
|
-
linkstatus_check_args = { url
|
78
|
+
linkstatus_check_args = { 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
79
|
linkstatus_check(linkstatus_check_args)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
)
|
83
83
|
end
|
84
84
|
|
85
|
-
when 'e2e'
|
85
|
+
when 'e2e'
|
86
86
|
if data[:suite][:setup_each]
|
87
87
|
def setup
|
88
88
|
super
|
@@ -14,8 +14,10 @@ module Bucky
|
|
14
14
|
def create_webdriver(device_type)
|
15
15
|
@@config = Bucky::Utils::Config.instance
|
16
16
|
driver_args = create_driver_args(device_type)
|
17
|
-
|
18
|
-
|
17
|
+
# Correctly create an options object
|
18
|
+
options = generate_desire_caps(device_type)
|
19
|
+
driver = Selenium::WebDriver.for :remote, url: driver_args[:url], options:, http_client: driver_args[:http_client]
|
20
|
+
driver.manage.window.resize_to(1920, 1080)
|
19
21
|
driver.manage.timeouts.implicit_wait = @@config[:find_element_timeout]
|
20
22
|
driver
|
21
23
|
rescue StandardError => e
|
@@ -27,21 +29,26 @@ module Bucky
|
|
27
29
|
|
28
30
|
# @param [String] device_type e.g.) sp, pc, tablet
|
29
31
|
# @return [Hash] driver_args
|
30
|
-
def create_driver_args(
|
31
|
-
|
32
|
-
|
32
|
+
def create_driver_args(_device_type)
|
33
|
+
{
|
34
|
+
url: format('http://%<ip>s:%<port>s/wd/hub', ip: @@config[:selenium_ip], port: @@config[:selenium_port]),
|
35
|
+
http_client: create_http_client
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
def create_http_client
|
33
40
|
client = Selenium::WebDriver::Remote::Http::Default.new
|
34
41
|
client.open_timeout = @@config[:driver_open_timeout]
|
35
42
|
client.read_timeout = @@config[:driver_read_timeout]
|
36
|
-
|
37
|
-
driver_args
|
43
|
+
client
|
38
44
|
end
|
39
45
|
|
46
|
+
# Generate the desired capabilities
|
40
47
|
# @param [String] device_type e.g.) sp, pc, tablet
|
41
|
-
# @return [
|
48
|
+
# @return [Selenium::WebDriver::Options]
|
42
49
|
def generate_desire_caps(device_type)
|
43
50
|
case @@config[:browser]
|
44
|
-
when :chrome
|
51
|
+
when :chrome
|
45
52
|
set_chrome_option(device_type)
|
46
53
|
else
|
47
54
|
raise 'Currently only supports chrome. Sorry.'
|
@@ -49,17 +56,17 @@ module Bucky
|
|
49
56
|
end
|
50
57
|
|
51
58
|
def set_chrome_option(device_type)
|
52
|
-
|
53
|
-
|
59
|
+
options = Selenium::WebDriver::Options.chrome
|
60
|
+
if %w[sp tablet].include?(device_type)
|
54
61
|
device_type = "#{device_type}_device_name".to_sym
|
55
|
-
|
56
|
-
chrome_options['goog:chromeOptions']['mobileEmulation'] = mobile_emulation
|
62
|
+
options.add_emulation(device_name: @@config[:device_name_on_chrome][@@config[device_type]])
|
57
63
|
end
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
64
|
+
options.add_argument("--user-agent=#{@@config[:user_agent]}") if @@config[:user_agent]
|
65
|
+
options.add_argument('--headless') if @@config[:headless]
|
66
|
+
@@config[:chromedriver_flags]&.each do |flag|
|
67
|
+
options.add_argument(flag)
|
68
|
+
end
|
69
|
+
options
|
63
70
|
end
|
64
71
|
end
|
65
72
|
end
|
@@ -30,7 +30,7 @@ module Bucky
|
|
30
30
|
def t_equip_setup
|
31
31
|
@driver = create_webdriver(suite_data[:device])
|
32
32
|
@pages = Bucky::TestEquipment::PageObject::Pages.new(suite_data[:service], suite_data[:device], @driver)
|
33
|
-
service_verifications_args = { service: suite_data[:service], device: suite_data[:device], driver: @driver, pages: @pages, method_name:
|
33
|
+
service_verifications_args = { service: suite_data[:service], device: suite_data[:device], driver: @driver, pages: @pages, method_name: }
|
34
34
|
@service_verifications = Bucky::TestEquipment::Verifications::ServiceVerifications.new(service_verifications_args)
|
35
35
|
user_operator_args = { app: suite_data[:service], device: suite_data[:device], driver: @driver, pages: @pages }
|
36
36
|
@user_operator = Bucky::TestEquipment::UserOperation::UserOperator.new(user_operator_args)
|
@@ -39,13 +39,13 @@ module Bucky
|
|
39
39
|
# Call mothod of verification
|
40
40
|
# @param [Hash] verify_args e.g.) {:exec=>{verify: "assert_title", expect: "page title"}, :step_number=> 1, :proc_name=> "test proc"}
|
41
41
|
def verify(**verify_args)
|
42
|
-
@service_verifications.send(verify_args[:exec][: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
46
|
# @param [Hash] op_args e.g.) {:exec=>{:operate=>"click", :page=>"top_page", :part=>"fizz_button"}, :step_number=> 1, :proc_name=> "test proc"}
|
47
47
|
def operate(**op_args)
|
48
|
-
@user_operator.send(op_args[:exec][: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
|
@@ -27,7 +27,7 @@ module Bucky
|
|
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
|
+
wait_until_helper((args || {}).fetch(:timeout, 5), 0.1, Selenium::WebDriver::Error::StaleElementReferenceError) { @pages.get_part(args).send_keys(args[:word]).nil? }
|
31
31
|
end
|
32
32
|
|
33
33
|
# Clear textbox
|
@@ -38,7 +38,7 @@ module Bucky
|
|
38
38
|
def click(args)
|
39
39
|
elem = @pages.get_part(args)
|
40
40
|
# when click successfully, return of click is nil.
|
41
|
-
wait_until_helper(5, 0.1, Selenium::WebDriver::Error::WebDriverError) { elem.click.nil? }
|
41
|
+
wait_until_helper((args || {}).fetch(:timeout, 5), 0.1, Selenium::WebDriver::Error::WebDriverError) { elem.click.nil? }
|
42
42
|
end
|
43
43
|
|
44
44
|
def refresh(_)
|
@@ -48,14 +48,14 @@ module Bucky
|
|
48
48
|
def switch_to_next_window(_)
|
49
49
|
window_index = @driver.window_handles.index(@driver.window_handle)
|
50
50
|
windows_number = @driver.window_handles.size
|
51
|
-
|
52
|
-
|
53
|
-
|
51
|
+
return if window_index + 1 == windows_number
|
52
|
+
|
53
|
+
@driver.switch_to.window(@driver.window_handles[window_index + 1])
|
54
54
|
end
|
55
55
|
|
56
56
|
def switch_to_previous_window(_)
|
57
57
|
window_index = @driver.window_handles.index(@driver.window_handle)
|
58
|
-
@driver.switch_to.window(@driver.window_handles[window_index-1])
|
58
|
+
@driver.switch_to.window(@driver.window_handles[window_index - 1])
|
59
59
|
end
|
60
60
|
|
61
61
|
def switch_to_newest_window(_)
|
@@ -68,14 +68,14 @@ module Bucky
|
|
68
68
|
|
69
69
|
def switch_to_the_window(args)
|
70
70
|
# when the window successfully switched, return of switch_to.window is nil.
|
71
|
-
wait_until_helper(5, 0.1, Selenium::WebDriver::Error::NoSuchWindowError) { @driver.switch_to.window(args[:window_name]).nil? }
|
71
|
+
wait_until_helper((args || {}).fetch(:timeout, 5), 0.1, Selenium::WebDriver::Error::NoSuchWindowError) { @driver.switch_to.window(args[:window_name]).nil? }
|
72
72
|
end
|
73
73
|
|
74
74
|
# Close window
|
75
75
|
def close(_)
|
76
76
|
window_index = @driver.window_handles.index(@driver.window_handle)
|
77
77
|
@driver.close
|
78
|
-
@driver.switch_to.window(@driver.window_handles[window_index-1])
|
78
|
+
@driver.switch_to.window(@driver.window_handles[window_index - 1])
|
79
79
|
end
|
80
80
|
|
81
81
|
def stop(_)
|
@@ -84,7 +84,7 @@ module Bucky
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def choose(args)
|
87
|
-
option = wait_until_helper(5, 0.1, Selenium::WebDriver::Error::StaleElementReferenceError) { Selenium::WebDriver::Support::Select.new(@pages.get_part(args)) }
|
87
|
+
option = wait_until_helper((args || {}).fetch(:timeout, 5), 0.1, Selenium::WebDriver::Error::StaleElementReferenceError) { Selenium::WebDriver::Support::Select.new(@pages.get_part(args)) }
|
88
88
|
if args.key?(:text)
|
89
89
|
type = :text
|
90
90
|
selected = args[type].to_s
|
@@ -101,8 +101,8 @@ module Bucky
|
|
101
101
|
end
|
102
102
|
|
103
103
|
# Alert accept
|
104
|
-
def accept_alert(
|
105
|
-
alert = wait_until_helper(5, 0.1, Selenium::WebDriver::Error::
|
104
|
+
def accept_alert(args)
|
105
|
+
alert = wait_until_helper((args || {}).fetch(:timeout, 5), 0.1, Selenium::WebDriver::Error::NoSuchAlertError) { @driver.switch_to.alert }
|
106
106
|
alert.accept
|
107
107
|
end
|
108
108
|
|
@@ -26,9 +26,9 @@ 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[:exec])
|
29
|
+
e2e_verification.send(verification, **args[:exec])
|
30
30
|
elsif args[:exec].key?(:page)
|
31
|
-
send(args[:exec][:page]).send(verification, args[:exec])
|
31
|
+
send(args[:exec][:page]).send(verification, **args[:exec])
|
32
32
|
else
|
33
33
|
raise StandardError, "Undefined verification method or invalid arguments. #{verification},#{args[:exec]}"
|
34
34
|
end
|
@@ -48,7 +48,7 @@ module Bucky
|
|
48
48
|
page_class_name = page_name.split('_').map(&:capitalize).join
|
49
49
|
|
50
50
|
# Get instance of page object
|
51
|
-
page_class = eval(format('Services::%<module_service_name>s::%<device>s::Verifications::%<page_class_name>s', module_service_name
|
51
|
+
page_class = eval(format('Services::%<module_service_name>s::%<device>s::Verifications::%<page_class_name>s', module_service_name:, device: @device.capitalize, page_class_name:))
|
52
52
|
page_instance = page_class.new(@driver, @pages, @test_case_name)
|
53
53
|
|
54
54
|
self.class.class_eval do
|
data/lib/bucky/utils/config.rb
CHANGED
@@ -11,16 +11,16 @@ module Bucky
|
|
11
11
|
@@dir = "#{$bucky_home_dir}/config/**/*yml"
|
12
12
|
|
13
13
|
attr_reader :data
|
14
|
+
|
14
15
|
# @param [String] *.yml or hoge/fuga.yml
|
15
16
|
def initialize
|
16
17
|
@data = {}
|
17
18
|
@resources = []
|
18
19
|
@default_config_dir = File.expand_path('../../../template/new/config', __dir__)
|
19
|
-
|
20
20
|
# Read from a file of shallow hierarchy, then overwrite it if there is same key in deep hierarchy
|
21
21
|
file_sort_hierarchy(@@dir).each do |file|
|
22
22
|
file_name = file.split('/').last
|
23
|
-
default_config_file = @default_config_dir
|
23
|
+
default_config_file = "#{@default_config_dir}/#{file_name}"
|
24
24
|
data = load_yaml(file)
|
25
25
|
next if data.empty?
|
26
26
|
|
@@ -10,7 +10,11 @@ module Bucky
|
|
10
10
|
# @param [File] yaml file
|
11
11
|
# @return [Hash] hashed yaml contents
|
12
12
|
def load_yaml(file)
|
13
|
-
YAML.safe_load(
|
13
|
+
YAML.safe_load(
|
14
|
+
ERB.new(File.read(file)).result,
|
15
|
+
permitted_classes: [Array, Hash, String, Numeric, Symbol, TrueClass, FalseClass],
|
16
|
+
aliases: true
|
17
|
+
)
|
14
18
|
end
|
15
19
|
|
16
20
|
# Sort files to hierarchy
|
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.10.
|
4
|
+
version: 0.10.27
|
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: 2025-02-13 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: awesome_print
|
@@ -33,16 +33,16 @@ dependencies:
|
|
33
33
|
name: bundler
|
34
34
|
requirement: !ruby/object:Gem::Requirement
|
35
35
|
requirements:
|
36
|
-
- -
|
36
|
+
- - '='
|
37
37
|
- !ruby/object:Gem::Version
|
38
|
-
version:
|
38
|
+
version: 2.5.18
|
39
39
|
type: :development
|
40
40
|
prerelease: false
|
41
41
|
version_requirements: !ruby/object:Gem::Requirement
|
42
42
|
requirements:
|
43
|
-
- -
|
43
|
+
- - '='
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 2.5.18
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: hirb
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -145,16 +145,16 @@ dependencies:
|
|
145
145
|
name: rubocop
|
146
146
|
requirement: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
|
-
- -
|
148
|
+
- - '='
|
149
149
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
150
|
+
version: 1.66.1
|
151
151
|
type: :development
|
152
152
|
prerelease: false
|
153
153
|
version_requirements: !ruby/object:Gem::Requirement
|
154
154
|
requirements:
|
155
|
-
- -
|
155
|
+
- - '='
|
156
156
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
157
|
+
version: 1.66.1
|
158
158
|
- !ruby/object:Gem::Dependency
|
159
159
|
name: simplecov
|
160
160
|
requirement: !ruby/object:Gem::Requirement
|
@@ -229,16 +229,16 @@ dependencies:
|
|
229
229
|
name: nokogiri
|
230
230
|
requirement: !ruby/object:Gem::Requirement
|
231
231
|
requirements:
|
232
|
-
- -
|
232
|
+
- - '='
|
233
233
|
- !ruby/object:Gem::Version
|
234
|
-
version: 1.
|
234
|
+
version: 1.18.2
|
235
235
|
type: :runtime
|
236
236
|
prerelease: false
|
237
237
|
version_requirements: !ruby/object:Gem::Requirement
|
238
238
|
requirements:
|
239
|
-
- -
|
239
|
+
- - '='
|
240
240
|
- !ruby/object:Gem::Version
|
241
|
-
version: 1.
|
241
|
+
version: 1.18.2
|
242
242
|
- !ruby/object:Gem::Dependency
|
243
243
|
name: parallel
|
244
244
|
requirement: !ruby/object:Gem::Requirement
|
@@ -271,30 +271,30 @@ dependencies:
|
|
271
271
|
name: selenium-webdriver
|
272
272
|
requirement: !ruby/object:Gem::Requirement
|
273
273
|
requirements:
|
274
|
-
- -
|
274
|
+
- - '='
|
275
275
|
- !ruby/object:Gem::Version
|
276
|
-
version: '
|
276
|
+
version: '4.24'
|
277
277
|
type: :runtime
|
278
278
|
prerelease: false
|
279
279
|
version_requirements: !ruby/object:Gem::Requirement
|
280
280
|
requirements:
|
281
|
-
- -
|
281
|
+
- - '='
|
282
282
|
- !ruby/object:Gem::Version
|
283
|
-
version: '
|
283
|
+
version: '4.24'
|
284
284
|
- !ruby/object:Gem::Dependency
|
285
285
|
name: sequel
|
286
286
|
requirement: !ruby/object:Gem::Requirement
|
287
287
|
requirements:
|
288
|
-
- -
|
288
|
+
- - '='
|
289
289
|
- !ruby/object:Gem::Version
|
290
|
-
version: '
|
290
|
+
version: '5.84'
|
291
291
|
type: :runtime
|
292
292
|
prerelease: false
|
293
293
|
version_requirements: !ruby/object:Gem::Requirement
|
294
294
|
requirements:
|
295
|
-
- -
|
295
|
+
- - '='
|
296
296
|
- !ruby/object:Gem::Version
|
297
|
-
version: '
|
297
|
+
version: '5.84'
|
298
298
|
- !ruby/object:Gem::Dependency
|
299
299
|
name: test-unit
|
300
300
|
requirement: !ruby/object:Gem::Requirement
|
@@ -479,7 +479,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
479
479
|
- !ruby/object:Gem::Version
|
480
480
|
version: '0'
|
481
481
|
requirements: []
|
482
|
-
rubygems_version: 3.
|
482
|
+
rubygems_version: 3.4.1
|
483
483
|
signing_key:
|
484
484
|
specification_version: 4
|
485
485
|
summary: System testing framework for web application.
|