bddfire 1.9.7 → 1.9.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +5 -13
  2. data/Gemfile +1 -2
  3. data/README.markdown +68 -37
  4. data/Rakefile +4 -4
  5. data/bddfire.gemspec +19 -16
  6. data/bin/bddfire +116 -106
  7. data/features/step_definitions/all_steps.rb +1 -4
  8. data/features/support/env.rb +4 -4
  9. data/lib/bddfire/accesibility/axe.rb +40 -0
  10. data/lib/bddfire/assertions/assert.rb +2 -2
  11. data/lib/bddfire/page-objects/HomePage.rb +7 -9
  12. data/lib/bddfire/require.rb +5 -4
  13. data/lib/bddfire/version.rb +1 -1
  14. data/lib/bddfire/web/browser_actions.rb +1 -1
  15. data/lib/bddfire/web/headless_steps.rb +9 -10
  16. data/lib/bddfire/web/web_methods.rb +4 -5
  17. data/lib/bddfire/web/web_steps.rb +3 -3
  18. data/lib/bddfire.rb +1 -3
  19. data/pre-defined-steps/accessibility_steps.md +24 -0
  20. data/pre-defined-steps/capybara_steps.md +1 -1
  21. data/scaffold/accessibility/features/01_validation.feature +6 -0
  22. data/scaffold/accessibility/features/02_javascript.feature +6 -0
  23. data/scaffold/accessibility/features/03_language.feature +9 -0
  24. data/scaffold/accessibility/features/04_page_titles.feature +7 -0
  25. data/scaffold/accessibility/features/05_main_landmark.feature +7 -0
  26. data/scaffold/accessibility/features/06_headings.feature +7 -0
  27. data/scaffold/accessibility/features/07_minimum_resizable_text.feature +8 -0
  28. data/scaffold/accessibility/features/08_tabindex.feature +6 -0
  29. data/scaffold/accessibility/features/09_focusable_controls.feature +9 -0
  30. data/scaffold/accessibility/features/10_color_contrast.feature +10 -0
  31. data/scaffold/accessibility/features/11_image.feature +10 -0
  32. data/scaffold/accessibility/features/12_form.feature +11 -0
  33. data/scaffold/accessibility/features/13_table.feature +10 -0
  34. data/scaffold/accessibility/features/general_accessibility_check.feature +9 -0
  35. data/scaffold/accessibility/features/step_definitions/base.rb +22 -0
  36. data/scaffold/accessibility/features/step_definitions/form.rb +0 -0
  37. data/scaffold/accessibility/features/step_definitions/headings.rb +7 -0
  38. data/scaffold/accessibility/features/step_definitions/image.rb +0 -0
  39. data/scaffold/accessibility/features/step_definitions/javascript.rb +3 -0
  40. data/scaffold/accessibility/features/step_definitions/language.rb +0 -0
  41. data/scaffold/accessibility/features/step_definitions/main_landmark.rb +15 -0
  42. data/scaffold/accessibility/features/step_definitions/minimum_resizable_text.rb +11 -0
  43. data/scaffold/accessibility/features/step_definitions/page_title.rb +10 -0
  44. data/scaffold/accessibility/features/step_definitions/tabindex.rb +3 -0
  45. data/scaffold/accessibility/features/step_definitions/table.rb +0 -0
  46. data/scaffold/accessibility/features/step_definitions/validation.rb +4 -0
  47. data/scaffold/accessibility/features/support/capybara.rb +42 -0
  48. data/scaffold/config_files/.rubocop.yml +5 -5
  49. data/scaffold/config_files/Dockerfile +24 -0
  50. data/scaffold/config_files/Gemfile +9 -5
  51. data/scaffold/config_files/Rakefile +36 -32
  52. data/scaffold/config_files/docker.sh +82 -0
  53. data/scaffold/features/pages/HomePage.rb +10 -10
  54. data/scaffold/features/support/env.rb +128 -130
  55. data/scaffold/features/support/hooks.rb +5 -6
  56. data/scaffold/load/Dockerfile +28 -0
  57. data/scaffold/load/README.md +31 -0
  58. data/scaffold/load/conf/application.conf +7 -0
  59. data/scaffold/load/conf/gatling.conf +157 -0
  60. data/scaffold/load/conf/logback.xml +22 -0
  61. data/scaffold/load/conf/recorder.conf +51 -0
  62. data/scaffold/load/docker-jenkins.sh +77 -0
  63. data/scaffold/load/gatling_jenkins.sh +28 -0
  64. data/scaffold/load/gatling_local.sh +29 -0
  65. data/scaffold/load/user-files/bodies/.keep +0 -0
  66. data/scaffold/load/user-files/data/search.csv +2 -0
  67. data/scaffold/load/user-files/simulations/SampleLoadTEST.scala +22 -0
  68. data/scaffold/rake_tasks/cucumber.rb +2 -3
  69. data/scaffold/rake_tasks/cuke_sniffer.rb +3 -3
  70. data/scaffold/rake_tasks/rspec.rb +3 -4
  71. data/scaffold/rake_tasks/rubocop.rb +4 -5
  72. data/scaffold/rake_tasks/yard.rb +3 -4
  73. metadata +142 -55
  74. data/scaffold/config_files/.ruby-version +0 -1
  75. data/scaffold/config_files/.travis.yml +0 -16
  76. data/scaffold/features/pages/Abstract.rb +0 -14
  77. data/scaffold/features/support/helpers.erb +0 -6
  78. data/scaffold/features/support/responsive.rb +0 -19
  79. data/scaffold/lib/project/version.erb +0 -3
  80. data/scaffold/lib/project.erb +0 -2
  81. 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 = "your_serial_number"
9
+ ADB_SERIAL = 'your_serial_number'.freeze
10
10
 
11
11
  task :cleanup do
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")
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 "===== 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 ========="
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("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
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 :parallel_cucumber => [ :cleanup, :parallel_run, :rerun ]
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 = ['features/**/*.feature', 'features/**/*.rb']
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 = "features -p selenium --format pretty --profile html "
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 = "features -p poltergeist --format pretty --profile html "
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 = "features -p chrome --format pretty --profile html "
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 = "features -p sauce --format pretty --profile html "
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 = "features -p browserstack --format pretty --profile html "
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 = "features -p testingbot --format pretty --profile html "
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 "===== Make sure you have started Appium server in the background====="
69
- puts "===== You can start it with rake task start_appium ....====="
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 "bundle exec cuke_sniffer --out html reports/cuke_sniffer.html"
73
+ sh 'bundle exec cuke_sniffer --out html reports/cuke_sniffer.html'
75
74
  end
76
75
 
77
76
  task :rubocop do
78
- sh "bundle exec rubocop features/"
77
+ sh 'bundle exec rubocop features/'
79
78
  end
80
79
 
81
80
  task :start_appium do
82
- puts "===== Installing Appium with NodeJS====="
83
- sh "npm install"
84
- sh " ./node_modules/.bin/appium > /dev/null 2>&1"
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 :police => [ :cleanup, :cuke_sniffer]
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 = "Your Site "
7
- self.title = "your_css_selector"
8
-
9
- def initialize(session)
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("your_url")
14
+ @session.visit('your_url')
15
15
  end
16
16
  end
17
17
 
18
- =begin
19
- You can the use these methods in the step_definitions as
20
- @home_page = HomePage.new(Capybara.current_session)
21
- @home_page.visit_home_page
22
- =end
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 "capybara/cucumber"
4
- require "rspec"
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, :profile => profile)
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
- options = {
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
- Capybara::Poltergeist::Driver.new(app, options)
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, :browser => :chrome)
38
+ Capybara::Selenium::Driver.new(app, browser: :chrome)
41
39
  end
42
40
 
43
41
  Capybara.register_driver :browserstack do |app|
44
- stackToUse = ENV['BS_STACK'] || 'osx_firefox'
45
- json = JSON.load(open(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'browsers.json'))))
46
- config = json[stackToUse]
47
- unless config
48
- puts "invalid BS_STACK specified. Was '#{stackToUse}'"
49
- return
50
- end
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
- # Add default config
53
- config['name'] = "#{config['os']} #{config['os_version']} - #{Time.now.strftime '%Y-%m-%d %H:%M'}"
54
- config['acceptSslCert'] = false
55
- config['browserstack.debug'] = true
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
- stackToUse = ENV['TB_STACK'] || 'osx_firefox'
66
- json = JSON.load(open(File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'browsers.json'))))
67
- config = json[stackToUse]
68
- unless config
69
- puts "invalid TB_STACK specified. Was '#{stackToUse}'"
70
- return
71
- end
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
- # Add default config
74
- config['name'] = "#{config['os']} #{config['os_version']} - #{Time.now.strftime '%Y-%m-%d %H:%M'}"
75
- config['acceptSslCert'] = false
76
-
77
- Capybara::Selenium::Driver.new(app,
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, "max-duration" => duration}
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
- :browser => :remote,
94
- :desired_capabilities => capabilities,
95
- :url => "http://SAUCE_USERNAME:SAUCE_API_KEY@ondemand.saucelabs.com:80/wd/hub")
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
- capabilities = {:platformName => 'Android', :deviceName => 'android', :browserName => 'Chrome', :uuid => ENV['ADB_SERIAL']}
100
- Capybara::Selenium::Driver.new(app,
101
- :browser => :remote,
102
- :desired_capabilities => capabilities,
103
- :url => "http://0.0.0.0:4723/wd/hub")
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
- capabilities = {
108
- :automationName => 'Appium', # Appium (default) or Selendroid
109
- :app => '/path/to/app', # /abs/path/to/my.apk or http://myapp.com/app.ipa
110
- :platformName => 'Android', # iOS, Android, or FirefoxOS
111
- :platformVersion => ' ', # 7.1, 4.4
112
- :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.
113
- :browserName => 'Chrome', # ‘Safari’ for iOS and ‘Chrome’, ‘Chromium’, or ‘Browser’ for Android
114
- :newCommandTimeout => '60', # 60
115
- :autoLaunch => 'true', # true, false
116
- :language => ' ', # fr
117
- :locale => ' ', # fr_CA
118
- :orientation => ' ',
119
- :autoWebview => 'false', # true, false
120
- :noReset => 'false', # true, false
121
- :fullReset => 'false', # true, false
122
- :uuid => ENV['ADB_SERIAL'],
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
- :appActivity => ' ',
125
- :appPackage => ' ',
126
- :appWaitActivity => ' ',
127
- :appWaitPackage => ' ',
128
- :deviceReadyTimeout => ' ',
129
- :androidCoverage => ' ',
130
- :enablePerformanceLogging => ' ',
131
- :androidDeviceReadyTimeout => ' ',
132
- :androidDeviceSocket => ' ',
133
- :avd => ' ',
134
- :avdLaunchTimeout => ' ',
135
- :avdReadyTimeout => ' ',
136
- :avdArgs => ' ',
137
- :useKeystore => ' ',
138
- :keystorePath => ' ',
139
- :keystorePassword => ' ',
140
- :keyAlias => ' ',
141
- :keyPassword => ' ',
142
- :chromedriverExecutable => ' ',
143
- :autoWebviewTimeout => ' ',
144
- :intentAction => ' ',
145
- :intentCategory => ' ',
146
- :intentFlags => ' ',
147
- :optionalIntentArguments => ' ',
148
- :stopAppOnReset => ' ',
149
- :unicodeKeyboard => ' ',
150
- :resetKeyboard => ' ',
151
- :noSign => ' ',
152
- :ignoreUnimportantViews => ' ',
153
- #iOS Only
154
- :calendarFormat => ' ',
155
- :bundleId => ' ',
156
- :udid => ' ',
157
- :launchTimeout => ' ',
158
- :locationServicesEnabled => ' ',
159
- :locationServicesAuthorized => ' ',
160
- :autoAcceptAlerts => ' ',
161
- :autoDismissAlerts => ' ',
162
- :nativeInstrumentsLib => ' ',
163
- :nativeWebTap => ' ',
164
- :safariInitialUrl => ' ',
165
- :safariAllowPopups => ' ',
166
- :safariIgnoreFraudWarning => ' ',
167
- :safariOpenLinksInBackground => ' ',
168
- :keepKeyChains => ' ',
169
- :localizableStringsDir => ' ',
170
- :processArguments => ' ',
171
- :interKeyDelay => ' ',
172
- :showIOSLog => ' ',
173
- :sendKeyStrategy => ' ',
174
- :screenshotWaitTimeout => ' ',
175
- :waitForAppScript => ' '
176
- }
177
- Capybara::Selenium::Driver.new(app,
178
- :browser => :remote,
179
- :desired_capabilities => capabilities,
180
- :url => "http://0.0.0.0:4723/wd/hub")
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
@@ -0,0 +1,7 @@
1
+ akka {
2
+ actor {
3
+ default-dispatcher {
4
+ throughput = 20
5
+ }
6
+ }
7
+ }