bddfire 1.9.7 → 1.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/Gemfile +1 -2
- data/README.markdown +68 -37
- data/Rakefile +4 -4
- data/bddfire.gemspec +19 -16
- data/bin/bddfire +116 -106
- data/features/step_definitions/all_steps.rb +1 -4
- data/features/support/env.rb +4 -4
- data/lib/bddfire/accesibility/axe.rb +40 -0
- data/lib/bddfire/assertions/assert.rb +2 -2
- data/lib/bddfire/page-objects/HomePage.rb +7 -9
- data/lib/bddfire/require.rb +5 -4
- data/lib/bddfire/version.rb +1 -1
- data/lib/bddfire/web/browser_actions.rb +1 -1
- data/lib/bddfire/web/headless_steps.rb +9 -10
- data/lib/bddfire/web/web_methods.rb +4 -5
- data/lib/bddfire/web/web_steps.rb +3 -3
- data/lib/bddfire.rb +1 -3
- data/pre-defined-steps/accessibility_steps.md +24 -0
- data/pre-defined-steps/capybara_steps.md +1 -1
- data/scaffold/accessibility/features/01_validation.feature +6 -0
- data/scaffold/accessibility/features/02_javascript.feature +6 -0
- data/scaffold/accessibility/features/03_language.feature +9 -0
- data/scaffold/accessibility/features/04_page_titles.feature +7 -0
- data/scaffold/accessibility/features/05_main_landmark.feature +7 -0
- data/scaffold/accessibility/features/06_headings.feature +7 -0
- data/scaffold/accessibility/features/07_minimum_resizable_text.feature +8 -0
- data/scaffold/accessibility/features/08_tabindex.feature +6 -0
- data/scaffold/accessibility/features/09_focusable_controls.feature +9 -0
- data/scaffold/accessibility/features/10_color_contrast.feature +10 -0
- data/scaffold/accessibility/features/11_image.feature +10 -0
- data/scaffold/accessibility/features/12_form.feature +11 -0
- data/scaffold/accessibility/features/13_table.feature +10 -0
- data/scaffold/accessibility/features/general_accessibility_check.feature +9 -0
- data/scaffold/accessibility/features/step_definitions/base.rb +22 -0
- data/scaffold/accessibility/features/step_definitions/form.rb +0 -0
- data/scaffold/accessibility/features/step_definitions/headings.rb +7 -0
- data/scaffold/accessibility/features/step_definitions/image.rb +0 -0
- data/scaffold/accessibility/features/step_definitions/javascript.rb +3 -0
- data/scaffold/accessibility/features/step_definitions/language.rb +0 -0
- data/scaffold/accessibility/features/step_definitions/main_landmark.rb +15 -0
- data/scaffold/accessibility/features/step_definitions/minimum_resizable_text.rb +11 -0
- data/scaffold/accessibility/features/step_definitions/page_title.rb +10 -0
- data/scaffold/accessibility/features/step_definitions/tabindex.rb +3 -0
- data/scaffold/accessibility/features/step_definitions/table.rb +0 -0
- data/scaffold/accessibility/features/step_definitions/validation.rb +4 -0
- data/scaffold/accessibility/features/support/capybara.rb +42 -0
- data/scaffold/config_files/.rubocop.yml +5 -5
- data/scaffold/config_files/Dockerfile +24 -0
- data/scaffold/config_files/Gemfile +9 -5
- data/scaffold/config_files/Rakefile +36 -32
- data/scaffold/config_files/docker.sh +82 -0
- data/scaffold/features/pages/HomePage.rb +10 -10
- data/scaffold/features/support/env.rb +128 -130
- data/scaffold/features/support/hooks.rb +5 -6
- data/scaffold/load/Dockerfile +28 -0
- data/scaffold/load/README.md +31 -0
- data/scaffold/load/conf/application.conf +7 -0
- data/scaffold/load/conf/gatling.conf +157 -0
- data/scaffold/load/conf/logback.xml +22 -0
- data/scaffold/load/conf/recorder.conf +51 -0
- data/scaffold/load/docker-jenkins.sh +77 -0
- data/scaffold/load/gatling_jenkins.sh +28 -0
- data/scaffold/load/gatling_local.sh +29 -0
- data/scaffold/load/user-files/bodies/.keep +0 -0
- data/scaffold/load/user-files/data/search.csv +2 -0
- data/scaffold/load/user-files/simulations/SampleLoadTEST.scala +22 -0
- data/scaffold/rake_tasks/cucumber.rb +2 -3
- data/scaffold/rake_tasks/cuke_sniffer.rb +3 -3
- data/scaffold/rake_tasks/rspec.rb +3 -4
- data/scaffold/rake_tasks/rubocop.rb +4 -5
- data/scaffold/rake_tasks/yard.rb +3 -4
- metadata +142 -55
- data/scaffold/config_files/.ruby-version +0 -1
- data/scaffold/config_files/.travis.yml +0 -16
- data/scaffold/features/pages/Abstract.rb +0 -14
- data/scaffold/features/support/helpers.erb +0 -6
- data/scaffold/features/support/responsive.rb +0 -19
- data/scaffold/lib/project/version.erb +0 -3
- data/scaffold/lib/project.erb +0 -2
- data/scaffold/spec/spec_helper.rb +0 -8
@@ -6,82 +6,86 @@ require 'json'
|
|
6
6
|
require 'yard'
|
7
7
|
require 'fileutils'
|
8
8
|
|
9
|
-
ADB_SERIAL =
|
9
|
+
ADB_SERIAL = 'your_serial_number'.freeze
|
10
10
|
|
11
11
|
task :cleanup do
|
12
|
-
puts
|
13
|
-
FileUtils.rm_rf('reports')
|
14
|
-
File.delete(
|
15
|
-
File.new(
|
16
|
-
Dir.mkdir(
|
12
|
+
puts ' ========Deleting old reports ang logs========='
|
13
|
+
FileUtils.rm_rf('reports')
|
14
|
+
File.delete('cucumber_failures.log') if File.exist?('cucumber_failures.log')
|
15
|
+
File.new('cucumber_failures.log', 'w')
|
16
|
+
Dir.mkdir('reports')
|
17
17
|
end
|
18
18
|
|
19
19
|
task :parallel_run do
|
20
|
-
puts
|
21
|
-
system
|
22
|
-
puts
|
20
|
+
puts '===== Executing Tests in parallel'
|
21
|
+
system 'bundle exec parallel_cucumber features/ -o "-p parallel -p poltergeist -p pretty" -n 10'
|
22
|
+
puts ' ====== Parallel execution finished and cucumber_failure.log created ========='
|
23
23
|
end
|
24
24
|
|
25
25
|
task :rerun do
|
26
|
-
if File.size(
|
27
|
-
puts
|
28
|
-
else
|
29
|
-
puts
|
30
|
-
system
|
31
|
-
end
|
26
|
+
if File.size('cucumber_failures.log') == 0
|
27
|
+
puts '==== No failures. Everything Passed ========='
|
28
|
+
else
|
29
|
+
puts ' =========Re-running Failed Scenarios============='
|
30
|
+
system 'bundle exec cucumber @cucumber_failures.log -f pretty'
|
31
|
+
end
|
32
32
|
end
|
33
33
|
|
34
|
-
task :
|
34
|
+
task parallel_cucumber: [:cleanup, :parallel_run, :rerun]
|
35
35
|
|
36
36
|
# Rake::Task["parallel_cucumber"].invoke
|
37
37
|
|
38
38
|
YARD::Rake::YardocTask.new(:yard) do |t|
|
39
|
-
t.files
|
39
|
+
t.files = ['features/**/*.feature', 'features/**/*.rb']
|
40
40
|
end
|
41
41
|
|
42
42
|
Cucumber::Rake::Task.new(:selenium) do |t|
|
43
|
-
t.cucumber_opts =
|
43
|
+
t.cucumber_opts = 'features -p selenium --format pretty --profile html '
|
44
44
|
end
|
45
45
|
|
46
|
-
|
47
46
|
Cucumber::Rake::Task.new(:poltergeist) do |t|
|
48
|
-
t.cucumber_opts =
|
47
|
+
t.cucumber_opts = 'features -p poltergeist --format pretty --profile html '
|
49
48
|
end
|
50
49
|
|
51
50
|
Cucumber::Rake::Task.new(:chrome) do |t|
|
52
|
-
t.cucumber_opts =
|
51
|
+
t.cucumber_opts = 'features -p chrome --format pretty --profile html '
|
53
52
|
end
|
54
53
|
|
55
54
|
Cucumber::Rake::Task.new(:sauce) do |t|
|
56
|
-
t.cucumber_opts =
|
55
|
+
t.cucumber_opts = 'features -p sauce --format pretty --profile html '
|
57
56
|
end
|
58
57
|
|
59
58
|
Cucumber::Rake::Task.new(:browserstack) do |t|
|
60
|
-
t.cucumber_opts =
|
59
|
+
t.cucumber_opts = 'features -p browserstack --format pretty --profile html '
|
61
60
|
end
|
62
61
|
|
63
62
|
Cucumber::Rake::Task.new(:testingbot) do |t|
|
64
|
-
t.cucumber_opts =
|
63
|
+
t.cucumber_opts = 'features -p testingbot --format pretty --profile html '
|
65
64
|
end
|
66
65
|
|
67
66
|
Cucumber::Rake::Task.new(:appium) do |t|
|
68
|
-
puts
|
69
|
-
puts
|
67
|
+
puts '===== Make sure you have started Appium server in the background====='
|
68
|
+
puts '===== You can start it with rake task start_appium ....====='
|
70
69
|
t.cucumber_opts = "features -p appium_android_web ADB_SERIAL=#{ADB_SERIAL} --format pretty --profile html "
|
71
70
|
end
|
72
71
|
|
73
72
|
task :cuke_sniffer do
|
74
|
-
sh
|
73
|
+
sh 'bundle exec cuke_sniffer --out html reports/cuke_sniffer.html'
|
75
74
|
end
|
76
75
|
|
77
76
|
task :rubocop do
|
78
|
-
sh
|
77
|
+
sh 'bundle exec rubocop features/'
|
79
78
|
end
|
80
79
|
|
81
80
|
task :start_appium do
|
82
|
-
puts
|
83
|
-
sh
|
84
|
-
sh
|
81
|
+
puts '===== Installing Appium with NodeJS====='
|
82
|
+
sh 'npm install'
|
83
|
+
sh ' ./node_modules/.bin/appium > /dev/null 2>&1'
|
84
|
+
end
|
85
|
+
|
86
|
+
task :docker do
|
87
|
+
puts '========Preparing docker environment to run cucumber tests inside docker containers======='
|
88
|
+
sh 'sh docker.sh'
|
85
89
|
end
|
86
90
|
|
87
|
-
task :
|
91
|
+
task police: [:cleanup, :cuke_sniffer]
|
@@ -0,0 +1,82 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
WORKSPACE=$(pwd)
|
4
|
+
CONTAINER_NAME="bddfire-ci"
|
5
|
+
IMAGE_NAME="bddfire-ci"
|
6
|
+
|
7
|
+
|
8
|
+
function stop_container_if_already_running {
|
9
|
+
|
10
|
+
docker stop ${CONTAINER_NAME}
|
11
|
+
docker rm ${CONTAINER_NAME}
|
12
|
+
}
|
13
|
+
|
14
|
+
function check_image_exist {
|
15
|
+
echo -e "List of the available images \n"
|
16
|
+
docker images
|
17
|
+
if docker images | grep -w "bddfire-ci"
|
18
|
+
then
|
19
|
+
echo -e "\n*** Image already exists. We can run container... ***\n"
|
20
|
+
else
|
21
|
+
echo -e "\n ** No Image found, please build image"
|
22
|
+
build_image
|
23
|
+
fi
|
24
|
+
}
|
25
|
+
|
26
|
+
function build_image {
|
27
|
+
|
28
|
+
echo -e "\n*** Building the image ***\n"
|
29
|
+
docker build -t ${IMAGE_NAME} .
|
30
|
+
echo -e "\n*** Finished building the image ***\n"
|
31
|
+
|
32
|
+
}
|
33
|
+
|
34
|
+
function check_container_exist {
|
35
|
+
echo -e "List of the available containers \n"
|
36
|
+
echo docker ps -a
|
37
|
+
echo -e "\n*** Checking if the container exists ***\n"
|
38
|
+
|
39
|
+
if docker ps -a | grep ${CONTAINER_NAME}
|
40
|
+
then
|
41
|
+
echo -e "\n*** Container already exists ***\n"
|
42
|
+
docker start ${CONTAINER_NAME}
|
43
|
+
else
|
44
|
+
echo -e "\n*** Running the container ***\n"
|
45
|
+
run_container_with_volume
|
46
|
+
fi
|
47
|
+
}
|
48
|
+
|
49
|
+
function run_container_with_volume {
|
50
|
+
docker run -it -d -v $WORKSPACE/:/opt/bddfire --name ${CONTAINER_NAME} ${IMAGE_NAME}
|
51
|
+
echo -e "Listing directoy structure of the cucumber project inside container"
|
52
|
+
docker exec ${CONTAINER_NAME} ls /opt/bddfire/
|
53
|
+
}
|
54
|
+
|
55
|
+
function delete_old_reports_screenshots {
|
56
|
+
docker exec ${CONTAINER_NAME} rm -rf /opt/bddfire/reports
|
57
|
+
}
|
58
|
+
|
59
|
+
function run_cucumber_tests {
|
60
|
+
# docker exec ${CONTAINER_NAME} bundle exec rubocop features
|
61
|
+
echo "\n Running Bundler"
|
62
|
+
docker exec ${CONTAINER_NAME} bundle install --path vendor/
|
63
|
+
echo "Now running cucumber tests"
|
64
|
+
docker exec ${CONTAINER_NAME} bundle exec rake poltergeist
|
65
|
+
exit $?
|
66
|
+
}
|
67
|
+
|
68
|
+
function copy_reports_screenshots_to_workspace {
|
69
|
+
echo "\n Copying Test Reports back to Workspace"
|
70
|
+
docker cp ${CONTAINER_NAME}:/opt/bddfire/reports/ $WORKSPACE/reports/
|
71
|
+
}
|
72
|
+
|
73
|
+
function stop_container {
|
74
|
+
docker stop ${CONTAINER_NAME}
|
75
|
+
}
|
76
|
+
|
77
|
+
check_image_exist
|
78
|
+
check_container_exist
|
79
|
+
delete_old_reports_screenshots
|
80
|
+
run_cucumber_tests
|
81
|
+
copy_reports_screenshots_to_workspace
|
82
|
+
stop_container
|
@@ -3,20 +3,20 @@ class HomePage
|
|
3
3
|
attr_accessor :title, :title_text
|
4
4
|
end
|
5
5
|
|
6
|
-
self.title_text =
|
7
|
-
self.title =
|
8
|
-
|
9
|
-
def initialize(
|
6
|
+
self.title_text = 'Your Site '
|
7
|
+
self.title = 'your_css_selector'
|
8
|
+
|
9
|
+
def initialize(_session)
|
10
10
|
@session = Capybara.current_session
|
11
11
|
end
|
12
12
|
|
13
13
|
def visit_home_page
|
14
|
-
@session.visit(
|
14
|
+
@session.visit('your_url')
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
|
20
|
-
@home_page
|
21
|
-
|
22
|
-
|
18
|
+
# You can the use these methods in the step_definitions as
|
19
|
+
# @home_page = HomePage.new(Capybara.current_session)
|
20
|
+
# @home_page.visit_home_page
|
21
|
+
|
22
|
+
#Alternatively you can use Site Prism thingy
|
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'capybara/cucumber'
|
4
|
+
require 'rspec'
|
5
5
|
require 'capybara/poltergeist'
|
6
6
|
require 'selenium-webdriver'
|
7
7
|
require 'rubocop'
|
8
|
+
require 'axe/cucumber/step_definitions'
|
8
9
|
require 'bddfire'
|
9
10
|
|
10
11
|
Capybara.configure do |config|
|
11
|
-
|
12
12
|
config.run_server = false
|
13
13
|
config.default_driver = (ENV['DRIVER'] || 'selenium').to_sym
|
14
14
|
config.javascript_driver = config.default_driver
|
@@ -17,68 +17,66 @@ Capybara.configure do |config|
|
|
17
17
|
end
|
18
18
|
|
19
19
|
Capybara.register_driver :selenium do |app|
|
20
|
-
|
21
20
|
profile = Selenium::WebDriver::Firefox::Profile.new
|
22
|
-
Capybara::Selenium::Driver.new(app, :
|
21
|
+
Capybara::Selenium::Driver.new(app, profile: profile)
|
23
22
|
end
|
24
23
|
|
25
24
|
Capybara.register_driver :poltergeist do |app|
|
25
|
+
options = {
|
26
|
+
js_errors: true,
|
27
|
+
timeout: 120,
|
28
|
+
debug: false,
|
29
|
+
phantomjs_options: ['--load-images=no', '--disk-cache=false'],
|
30
|
+
inspector: true
|
26
31
|
|
27
|
-
|
28
|
-
:js_errors => true,
|
29
|
-
:timeout => 120,
|
30
|
-
:debug => false,
|
31
|
-
:phantomjs_options => ['--load-images=no', '--disk-cache=false'],
|
32
|
-
:inspector => true,
|
33
|
-
|
34
|
-
}
|
32
|
+
}
|
35
33
|
|
36
|
-
|
34
|
+
Capybara::Poltergeist::Driver.new(app, options)
|
37
35
|
end
|
38
36
|
|
39
37
|
Capybara.register_driver :chrome do |app|
|
40
|
-
Capybara::Selenium::Driver.new(app, :
|
38
|
+
Capybara::Selenium::Driver.new(app, browser: :chrome)
|
41
39
|
end
|
42
40
|
|
43
41
|
Capybara.register_driver :browserstack do |app|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
42
|
+
stackToUse = ENV['BS_STACK'] || 'osx_firefox'
|
43
|
+
json = JSON.load(open(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'browsers.json'))))
|
44
|
+
config = json[stackToUse]
|
45
|
+
unless config
|
46
|
+
puts "invalid BS_STACK specified. Was '#{stackToUse}'"
|
47
|
+
return
|
48
|
+
end
|
49
|
+
|
50
|
+
# Add default config
|
51
|
+
config['name'] = "#{config['os']} #{config['os_version']} - #{Time.now.strftime '%Y-%m-%d %H:%M'}"
|
52
|
+
config['acceptSslCert'] = false
|
53
|
+
config['browserstack.debug'] = true
|
51
54
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
Capybara::Selenium::Driver.new(app,
|
58
|
-
:browser => :remote,
|
59
|
-
:desired_capabilities => config,
|
60
|
-
:url => "http://USERNAME:API_KEY@hub.browserstack.com/wd/hub"
|
61
|
-
)
|
55
|
+
Capybara::Selenium::Driver.new(app,
|
56
|
+
browser: :remote,
|
57
|
+
desired_capabilities: config,
|
58
|
+
url: 'http://USERNAME:API_KEY@hub.browserstack.com/wd/hub'
|
59
|
+
)
|
62
60
|
end
|
63
61
|
|
64
62
|
Capybara.register_driver :testingbot do |app|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
63
|
+
stackToUse = ENV['TB_STACK'] || 'osx_firefox'
|
64
|
+
json = JSON.load(open(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'browsers.json'))))
|
65
|
+
config = json[stackToUse]
|
66
|
+
unless config
|
67
|
+
puts "invalid TB_STACK specified. Was '#{stackToUse}'"
|
68
|
+
return
|
69
|
+
end
|
70
|
+
|
71
|
+
# Add default config
|
72
|
+
config['name'] = "#{config['os']} #{config['os_version']} - #{Time.now.strftime '%Y-%m-%d %H:%M'}"
|
73
|
+
config['acceptSslCert'] = false
|
72
74
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
:browser => :remote,
|
79
|
-
:desired_capabilities => config,
|
80
|
-
:url => "http://KEY:SECRET@hub.testingbot.com/wd/hub"
|
81
|
-
)
|
75
|
+
Capybara::Selenium::Driver.new(app,
|
76
|
+
browser: :remote,
|
77
|
+
desired_capabilities: config,
|
78
|
+
url: 'http://KEY:SECRET@hub.testingbot.com/wd/hub'
|
79
|
+
)
|
82
80
|
end
|
83
81
|
|
84
82
|
Capybara.register_driver :sauce do |app|
|
@@ -87,95 +85,95 @@ Capybara.register_driver :sauce do |app|
|
|
87
85
|
version = ENV['SAUCE_VERSION'] || '3.6'
|
88
86
|
platform = ENV['SAUCE_PLATFORM'] || 'WINDOWS'
|
89
87
|
duration = 7200
|
90
|
-
capabilities = {:browserName => browser, :version => version, :platform => platform, :name => job_name,
|
88
|
+
capabilities = { :browserName => browser, :version => version, :platform => platform, :name => job_name, 'max-duration' => duration }
|
91
89
|
puts "Running #{job_name} on SauceLabs with #{browser} #{version} on #{platform}"
|
92
90
|
Capybara::Selenium::Driver.new(app,
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
browser: :remote,
|
92
|
+
desired_capabilities: capabilities,
|
93
|
+
url: 'http://SAUCE_USERNAME:SAUCE_API_KEY@ondemand.saucelabs.com:80/wd/hub')
|
96
94
|
end
|
97
95
|
|
98
96
|
Capybara.register_driver :appium_android_web do |app|
|
99
|
-
|
100
|
-
Capybara::Selenium::Driver.new(app,
|
101
|
-
:
|
102
|
-
:
|
103
|
-
:
|
97
|
+
capabilities = { platformName: 'Android', deviceName: 'android', browserName: 'Chrome', uuid: ENV['ADB_SERIAL'] }
|
98
|
+
Capybara::Selenium::Driver.new(app,
|
99
|
+
browser: :remote,
|
100
|
+
desired_capabilities: capabilities,
|
101
|
+
url: 'http://0.0.0.0:4723/wd/hub')
|
104
102
|
end
|
105
103
|
|
106
104
|
Capybara.register_driver :appium do |app|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
105
|
+
capabilities = {
|
106
|
+
automationName: 'Appium', # Appium (default) or Selendroid
|
107
|
+
app: '/path/to/app', # /abs/path/to/my.apk or http://myapp.com/app.ipa
|
108
|
+
platformName: 'Android', # iOS, Android, or FirefoxOS
|
109
|
+
platformVersion: ' ', # 7.1, 4.4
|
110
|
+
deviceName: 'Android', # iPhone Simulator, iPad Simulator, iPhone Retina 4-inch, Android Emulator, Galaxy S4, etc…. On iOS, this should be one of the valid devices returned by instruments with instruments -s devices. On Android this capability is currently ignored.
|
111
|
+
browserName: 'Chrome', # ‘Safari’ for iOS and ‘Chrome’, ‘Chromium’, or ‘Browser’ for Android
|
112
|
+
newCommandTimeout: '60', # 60
|
113
|
+
autoLaunch: 'true', # true, false
|
114
|
+
language: ' ', # fr
|
115
|
+
locale: ' ', # fr_CA
|
116
|
+
orientation: ' ',
|
117
|
+
autoWebview: 'false', # true, false
|
118
|
+
noReset: 'false', # true, false
|
119
|
+
fullReset: 'false', # true, false
|
120
|
+
uuid: ENV['ADB_SERIAL'],
|
123
121
|
# Android Only Capabilities
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
#iOS Only
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
Capybara::Selenium::Driver.new(app,
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
122
|
+
appActivity: ' ',
|
123
|
+
appPackage: ' ',
|
124
|
+
appWaitActivity: ' ',
|
125
|
+
appWaitPackage: ' ',
|
126
|
+
deviceReadyTimeout: ' ',
|
127
|
+
androidCoverage: ' ',
|
128
|
+
enablePerformanceLogging: ' ',
|
129
|
+
androidDeviceReadyTimeout: ' ',
|
130
|
+
androidDeviceSocket: ' ',
|
131
|
+
avd: ' ',
|
132
|
+
avdLaunchTimeout: ' ',
|
133
|
+
avdReadyTimeout: ' ',
|
134
|
+
avdArgs: ' ',
|
135
|
+
useKeystore: ' ',
|
136
|
+
keystorePath: ' ',
|
137
|
+
keystorePassword: ' ',
|
138
|
+
keyAlias: ' ',
|
139
|
+
keyPassword: ' ',
|
140
|
+
chromedriverExecutable: ' ',
|
141
|
+
autoWebviewTimeout: ' ',
|
142
|
+
intentAction: ' ',
|
143
|
+
intentCategory: ' ',
|
144
|
+
intentFlags: ' ',
|
145
|
+
optionalIntentArguments: ' ',
|
146
|
+
stopAppOnReset: ' ',
|
147
|
+
unicodeKeyboard: ' ',
|
148
|
+
resetKeyboard: ' ',
|
149
|
+
noSign: ' ',
|
150
|
+
ignoreUnimportantViews: ' ',
|
151
|
+
# iOS Only
|
152
|
+
calendarFormat: ' ',
|
153
|
+
bundleId: ' ',
|
154
|
+
udid: ' ',
|
155
|
+
launchTimeout: ' ',
|
156
|
+
locationServicesEnabled: ' ',
|
157
|
+
locationServicesAuthorized: ' ',
|
158
|
+
autoAcceptAlerts: ' ',
|
159
|
+
autoDismissAlerts: ' ',
|
160
|
+
nativeInstrumentsLib: ' ',
|
161
|
+
nativeWebTap: ' ',
|
162
|
+
safariInitialUrl: ' ',
|
163
|
+
safariAllowPopups: ' ',
|
164
|
+
safariIgnoreFraudWarning: ' ',
|
165
|
+
safariOpenLinksInBackground: ' ',
|
166
|
+
keepKeyChains: ' ',
|
167
|
+
localizableStringsDir: ' ',
|
168
|
+
processArguments: ' ',
|
169
|
+
interKeyDelay: ' ',
|
170
|
+
showIOSLog: ' ',
|
171
|
+
sendKeyStrategy: ' ',
|
172
|
+
screenshotWaitTimeout: ' ',
|
173
|
+
waitForAppScript: ' '
|
174
|
+
}
|
175
|
+
Capybara::Selenium::Driver.new(app,
|
176
|
+
browser: :remote,
|
177
|
+
desired_capabilities: capabilities,
|
178
|
+
url: 'http://0.0.0.0:4723/wd/hub')
|
181
179
|
end
|
@@ -7,12 +7,11 @@ After do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
Before('@wip, @ci') do
|
10
|
-
# This will only run before scenarios tagged
|
11
|
-
# with @wip OR @ci.
|
10
|
+
# This will only run before scenarios tagged
|
11
|
+
# with @wip OR @ci.
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
14
|
AfterStep('@wip', '@ci') do
|
16
|
-
# This will only run after steps within scenarios tagged
|
17
|
-
# with @wip AND @ci.
|
18
|
-
end
|
15
|
+
# This will only run after steps within scenarios tagged
|
16
|
+
# with @wip AND @ci.
|
17
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
FROM java:8-jdk
|
2
|
+
|
3
|
+
# working directory for gatling
|
4
|
+
WORKDIR /opt
|
5
|
+
|
6
|
+
# Gating version
|
7
|
+
ENV GATLING_VERSION 2.1.7
|
8
|
+
|
9
|
+
# create directory for gatling install
|
10
|
+
RUN mkdir -p gatling
|
11
|
+
|
12
|
+
# install gatling
|
13
|
+
RUN mkdir -p /tmp/downloads && \
|
14
|
+
curl -sf -o /tmp/downloads/gatling-$GATLING_VERSION.zip \
|
15
|
+
-L https://repo1.maven.org/maven2/io/gatling/highcharts/gatling-charts-highcharts-bundle/$GATLING_VERSION/gatling-charts-highcharts-bundle-$GATLING_VERSION-bundle.zip && \
|
16
|
+
mkdir -p /tmp/archive && cd /tmp/archive && \
|
17
|
+
unzip /tmp/downloads/gatling-$GATLING_VERSION.zip && \
|
18
|
+
mv /tmp/archive/gatling-charts-highcharts-bundle-$GATLING_VERSION/* /opt/gatling/
|
19
|
+
|
20
|
+
# change context to gatling directory
|
21
|
+
WORKDIR /opt/gatling
|
22
|
+
|
23
|
+
# set directories below to be mountable from host
|
24
|
+
VOLUME ["/opt/gatling/conf","/opt/gatling/results","/opt/gatling/user-files"]
|
25
|
+
|
26
|
+
# set environment variables
|
27
|
+
ENV PATH /opt/gatling/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
28
|
+
ENV GATLING_HOME /opt/gatling
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# Radio Gatling setup CI and Docker
|
2
|
+
|
3
|
+
This is repo running load test with gattling and generate reports. It does following things
|
4
|
+
|
5
|
+
* Get Gatling Setup into your WORKSPACE or local directory
|
6
|
+
|
7
|
+
* Take your config and simulations(scenario class) and runs load tests against it
|
8
|
+
|
9
|
+
* Generate report in HTML. Default gatling
|
10
|
+
|
11
|
+
* We can run it locally or on CI
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
# Usage
|
16
|
+
|
17
|
+
* Download this Change directory to 'load'
|
18
|
+
|
19
|
+
* Record your load test simulations and put your class in the 'user-files/simulations'
|
20
|
+
|
21
|
+
* Running it locally
|
22
|
+
|
23
|
+
sh gatling_local.sh
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
At the end you will see link to HTML report. Open it into browser and enjoy !!
|
28
|
+
|
29
|
+
# Docker
|
30
|
+
|
31
|
+
Not Tested and Not recommended
|