chemistrykit 3.8.1 → 3.9.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. data/.gitignore +1 -0
  2. data/CHANGELOG.md +15 -5
  3. data/Gemfile +4 -0
  4. data/README.md +13 -1
  5. data/Rakefile +3 -3
  6. data/chemistrykit.gemspec +7 -3
  7. data/features/brew.feature +1 -1
  8. data/features/chemists.feature +56 -1
  9. data/features/concurrency.feature +2 -2
  10. data/features/exit_status.feature +1 -0
  11. data/features/logging.feature +88 -85
  12. data/features/reporting.feature +105 -0
  13. data/features/step_definitions/steps.rb +4 -4
  14. data/features/support/env.rb +1 -1
  15. data/features/tags.feature +1 -0
  16. data/lib/chemistrykit/chemist.rb +6 -1
  17. data/lib/chemistrykit/chemist/repository/csv_chemist_repository.rb +1 -1
  18. data/lib/chemistrykit/cli/cli.rb +33 -12
  19. data/lib/chemistrykit/configuration.rb +2 -2
  20. data/lib/chemistrykit/formula/formula_lab.rb +13 -0
  21. data/lib/chemistrykit/{parallel_tests_mods.rb → parallel_tests/rspec/runner.rb} +5 -5
  22. data/lib/chemistrykit/reporting/html_report_assembler.rb +170 -0
  23. data/lib/chemistrykit/rspec/html_formatter.rb +241 -0
  24. data/lib/chemistrykit/rspec/j_unit_formatter.rb +124 -0
  25. data/report/config.rb +28 -0
  26. data/report/index.html +213 -0
  27. data/report/javascripts/foundation/foundation.abide.js +194 -0
  28. data/report/javascripts/foundation/foundation.alerts.js +52 -0
  29. data/report/javascripts/foundation/foundation.clearing.js +516 -0
  30. data/report/javascripts/foundation/foundation.cookie.js +74 -0
  31. data/report/javascripts/foundation/foundation.dropdown.js +177 -0
  32. data/report/javascripts/foundation/foundation.forms.js +533 -0
  33. data/report/javascripts/foundation/foundation.interchange.js +280 -0
  34. data/report/javascripts/foundation/foundation.joyride.js +850 -0
  35. data/report/javascripts/foundation/foundation.js +440 -0
  36. data/report/javascripts/foundation/foundation.magellan.js +135 -0
  37. data/report/javascripts/foundation/foundation.orbit.js +412 -0
  38. data/report/javascripts/foundation/foundation.placeholder.js +179 -0
  39. data/report/javascripts/foundation/foundation.reveal.js +330 -0
  40. data/report/javascripts/foundation/foundation.section.js +400 -0
  41. data/report/javascripts/foundation/foundation.tooltips.js +208 -0
  42. data/report/javascripts/foundation/foundation.topbar.js +300 -0
  43. data/report/javascripts/vendor/custom.modernizr.js +4 -0
  44. data/report/javascripts/vendor/jquery.js +9789 -0
  45. data/report/sass/_normalize.scss +402 -0
  46. data/report/sass/_settings.scss +1301 -0
  47. data/report/sass/app.scss +571 -0
  48. data/report/stylesheets/app.css +3636 -0
  49. data/spec/integration/lib/chemistrykit/formula/formula_lab_spec.rb +26 -2
  50. data/spec/integration/lib/chemistrykit/reporting/html_reporting_assembler_spec.rb +18 -0
  51. data/spec/support/evidence/results_0.html +30 -0
  52. data/spec/support/evidence/results_1.html +27 -0
  53. data/spec/unit/lib/chemistrykit/chemist/repository/csv_chemist_repository_spec.rb +15 -2
  54. data/spec/unit/lib/chemistrykit/chemist_spec.rb +17 -1
  55. data/spec/unit/lib/chemistrykit/configuration_spec.rb +2 -2
  56. data/spec/unit/lib/chemistrykit/formula/formula_lab_spec.rb +7 -0
  57. data/spec/unit/lib/chemistrykit/reporting/html_reporting_assembler_spec.rb +22 -0
  58. metadata +94 -13
  59. data/lib/chemistrykit/j_unit.rb +0 -121
data/.gitignore CHANGED
@@ -17,3 +17,4 @@ tmp/
17
17
 
18
18
  # Dave's junk
19
19
  .rvmrc
20
+ .sass-cache
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ #3.9.0-rc.1 (2013-08-12)
2
+ Release candidate with new features including
3
+ - Consolidated html report
4
+ - Updates to chemists to support multiple chemists from being joined
5
+
6
+ ###Known Issues
7
+ - When running chrome locally the chromedriver logs do not always get placed in the correct places, likely due to the current approach of moving them around
8
+ - There is a lack of sufficient tests around the reporting functionality, so there could be some sporadic behavior when it comes to the consolidation and formatting of the main html report
9
+ - Configuration of specific log_path locations and output names is not fully supported at this time. Both an html report and junit.xml are output by default.
10
+
1
11
  #3.8.1 (2013-08-09)
2
12
  Cleaned up chemists to use same instance in the formulas and bug fixes
3
13
 
@@ -10,7 +20,7 @@ Cleaned up chemists to use same instance in the formulas and bug fixes
10
20
  Implemented the chemists feature to add user data management as well as a simplified strategy for loading formulas
11
21
 
12
22
  - Bumped version to 3.8.0 to prepare for release.
13
- - cleaned up docs a little and ensured the default chemists csv file wouldnt cause a failure if left unpopulated
23
+ - cleaned up docs a little and ensured the default chemists csv file wouldn't cause a failure if left unpopulated
14
24
  - added a uuid injector for a token in csv files
15
25
  - integrated the fomula lab into the suite runner and added basic cucumber tests
16
26
  - built out the rest of the formula lab and integration tests
@@ -89,13 +99,13 @@ Fixed bugs related to tagging and alternate configuration files in concurrent ru
89
99
  - Bumped version to 3.3.1 to prepare for release.
90
100
  - final code quality check
91
101
  - fixed issue where --all was not getting passed forward in parallel tests and the same with an alternative config file, added tests for those as well
92
- - fixed duplicatealias for brew option
102
+ - fixed duplicate alias for brew option
93
103
 
94
104
  #3.3.0 (2013-07-09)
95
105
  Fixed bugs with tagging and concurrency
96
106
 
97
107
  - Bumped version to 3.3.0 to prepare for release.
98
- - added the ckit tags command to list all tags in the harnes
108
+ - added the ckit tags command to list all tags in the harness
99
109
  - consolidated documentation into the readme file
100
110
  - fixed code quality issues and a bug with the tag filtering
101
111
  - added the --all flag and tests to run all beakers
@@ -140,7 +150,7 @@ Now with concurrent tests
140
150
  - abstracted out config loading into brew
141
151
  - learning how to spell concurrency correctly
142
152
  - fixed a minor typo in a feature and added a todo comment
143
- - updated feature files to have correct directory, added a test for concurency
153
+ - updated feature files to have correct directory, added a test for concurrency
144
154
  - upgraded the global config into the shared context
145
155
  - updated all tests to match new configuration format
146
156
  - added back updated configuration object
@@ -156,7 +166,7 @@ Now with concurrent tests
156
166
  - Fixed all code quality issues, added custom options file to tweek method length and line length cops, updated build system
157
167
  - added rubocop to the build process
158
168
  - Added a monkey patch for parallel_tests' RSpec runner to override its defaults with ours and wired it up in the parallel execution hook. It runs but gives an argument error from ckit. Also, took a first crack at setting the base_url via config.yaml and the shared_context
159
- - Added parallel_tests and parallel to repo. Wired up a command argument for ckit brew (--parallel) to execute the wip progess concurrency method.
169
+ - Added parallel_tests and parallel to repo. Wired up a command argument for ckit brew (--parallel) to execute the wip progress concurrency method.
160
170
  - Downgraded the required ruby version to just 1.9.3
161
171
  - one small edit because of a bug with git flow #62
162
172
 
data/Gemfile CHANGED
@@ -15,3 +15,7 @@ gem 'ruby2ruby'
15
15
  gem 'reek', '1.3.1'
16
16
  gem 'guard-reek'
17
17
  gem 'guard-rubocop'
18
+
19
+ gem "selenium-client", "~> 1.2.18"
20
+ gem 'compass'
21
+ gem 'zurb-foundation'
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- #ChemistryKit 3.8.1 (2013-08-09)
1
+ #ChemistryKit 3.9.0-rc.1 (2013-08-12)
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/chemistrykit.png)](http://badge.fury.io/rb/chemistrykit) [![Build Status](https://travis-ci.org/arrgyle/chemistrykit.png?branch=develop)](https://travis-ci.org/jrobertfox/chef-broiler-platter) [![Code Climate](https://codeclimate.com/github/arrgyle/chemistrykit.png)](https://codeclimate.com/github/arrgyle/chemistrykit) [![Coverage Status](https://coveralls.io/repos/arrgyle/chemistrykit/badge.png?branch=develop)](https://coveralls.io/r/arrgyle/chemistrykit?branch=develop)
4
4
 
@@ -133,6 +133,18 @@ Here is a summary of the other methods available:
133
133
  - `.with(key)` - Load a specific chemist by the key.
134
134
  - `.with_random(type)` - Load a chemist at random from all those matching `type`
135
135
  - `.with_first(type)` - Load whatever chemist is first matched by `type`
136
+ - `.and_with(key)` - Adds the chemist found by `key` as a sub-chemist data set to the chemist.
137
+
138
+ Using `.and_with` lets you mix up various sets of user data. For example:
139
+
140
+ @formula_lab.using('my_formula').with('admin1').and_with('sub_account1').mix
141
+
142
+ Would get you (assuming `sub_account1` has a type of `sub_account`, and a field `my_sub_field`) the ability to do something like this:
143
+
144
+ chemist.sub_account.my_sub_field
145
+
146
+ Inside your formula. COOL!
147
+
136
148
 
137
149
  The FormulaLab will handle the heavy lifting of assembling your formula with a driver and correct chemist (if the formula needs one). Also note that the specific instance of chemist is cached so that any changes your formula makes to the chemist is reflected in other formulas that use it.
138
150
 
data/Rakefile CHANGED
@@ -50,19 +50,19 @@ Cucumber::Rake::Task.new(:system)
50
50
  Rubocop::RakeTask.new
51
51
 
52
52
  # TODO: lower the quality score and improve the code!
53
- FlogTask.new :flog_total, 2000 do |t|
53
+ FlogTask.new :flog_total, 10000 do |t|
54
54
  t.method = :total_score
55
55
  t.verbose = true
56
56
  end
57
57
 
58
58
  # TODO: lower the quality score and improve the code!
59
- FlogTask.new :flog_average, 20 do |t|
59
+ FlogTask.new :flog_average, 200 do |t|
60
60
  t.method = :average
61
61
  t.verbose = true
62
62
  end
63
63
 
64
64
  # TODO: lower the quality score and improve the code!
65
- FlayTask.new :flay, 2000 do |t|
65
+ FlayTask.new :flay, 10000 do |t|
66
66
  t.verbose = true
67
67
  end
68
68
 
data/chemistrykit.gemspec CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'chemistrykit'
5
- s.version = '3.8.1'
5
+ s.version = '3.9.0.rc1'
6
6
  s.platform = Gem::Platform::RUBY
7
7
  s.authors = ['Dave Haeffner', 'Jason Fox']
8
8
  s.email = ['dave@arrgyle.com', 'jason@arrgyle.com']
9
9
  s.homepage = 'https://github.com/arrgyle/chemistrykit'
10
10
  s.summary = 'A simple and opinionated web testing framework for Selenium that follows convention over configuration.'
11
- s.description = 'Cleaned up chemists to use same instance in the formulas and bug fixes'
11
+ s.description = 'Added chemist composition and consolidated html report building.'
12
12
  s.license = 'MIT'
13
13
 
14
14
  s.files = `git ls-files`.split($/)
@@ -24,8 +24,12 @@ Gem::Specification.new do |s|
24
24
  s.add_dependency 'builder', '~> 3.2.2'
25
25
  s.add_dependency 'selenium-webdriver', '~> 2.29.0'
26
26
  s.add_dependency 'rest-client', '~> 1.6.7'
27
- s.add_dependency 'selenium-connect', '~> 3.4.0'
27
+ s.add_dependency 'selenium-connect', '~> 3.5.0'
28
28
  s.add_dependency 'parallel_tests', '~> 0.15.0'
29
29
  s.add_dependency 'parallel', '~> 0.7.0'
30
30
  s.add_dependency 'rspec-retry', '~> 0.2.1'
31
+ s.add_dependency 'nokogiri', '~> 1.6.0'
32
+
33
+ s.add_dependency 'syntax'
34
+ s.add_dependency 'pygments.rb', '~> 0.5.2'
31
35
  end
@@ -40,7 +40,7 @@ Feature: Brewing a ChemistryKit project
40
40
  When I run `ckit brew`
41
41
  Then the stdout should contain "1 example, 0 failures"
42
42
  And the following files should exist:
43
- | evidence/results_junit.xml |
43
+ | evidence/junit.xml |
44
44
  | evidence/bookie/bookie_loads_an_external_web_page/server.log |
45
45
 
46
46
  Scenario: Brew a single beaker
@@ -44,6 +44,29 @@ Feature: Brewing a ChemistryKit project
44
44
  end
45
45
  end
46
46
  """
47
+ And a file named "formulas/advanced_chemist_formula.rb" with:
48
+ """
49
+ module Formulas
50
+ class AdvancedChemistFormula < Formula
51
+ include ChemistryKit::Formula::ChemistAware
52
+ def open(url)
53
+ @driver.get url
54
+ end
55
+
56
+ def search
57
+ search_box = find id: 'gbqfq'
58
+ search_box.send_keys chemist.some_sub_account.item
59
+ search_box.send_keys :enter
60
+ end
61
+
62
+ def search_results_found?
63
+ wait_for(5) { displayed? id: 'search' }
64
+ search_results = find id: 'search'
65
+ search_results.text.include?(chemist.some_sub_account.item)
66
+ end
67
+ end
68
+ end
69
+ """
47
70
  And a file named "formulas/lib/formula.rb" with:
48
71
  """
49
72
  module Formulas
@@ -108,7 +131,35 @@ Feature: Brewing a ChemistryKit project
108
131
  describe "Chemist Beaker", :depth => 'shallow' do
109
132
  let(:basic) { @formula_lab.mix('basic_formula') }
110
133
  let(:chem) { @formula_lab.using('chemist_formula').with('admin1').mix }
134
+ let(:chem2) { @formula_lab.using('chemist_formula').with('other1').mix }
135
+
136
+ it "loads an external web page" do
137
+ basic.open "http://www.google.com"
138
+ chem.search
139
+ chem.search_results_found?.should eq true
140
+ end
111
141
 
142
+ it "loads an external web page" do
143
+ basic.open "http://www.google.com"
144
+ chem2.search
145
+ chem2.search_results_found?.should eq true
146
+ end
147
+ end
148
+ """
149
+ And a file named "chemists/others.csv" with:
150
+ """
151
+ Key,Type,Email,Name,Password
152
+ other1,other,other@email.com,Mr. Other,abc123$
153
+ """
154
+ When I run `ckit brew`
155
+ Then the stdout should contain "2 examples, 0 failures"
156
+
157
+ Scenario: Composing a chemist from multiple files
158
+ Given a file named "beakers/chemist_beaker.rb" with:
159
+ """
160
+ describe "Chemist Beaker", :depth => 'shallow' do
161
+ let(:basic) { @formula_lab.mix('basic_formula') }
162
+ let(:chem) { @formula_lab.using('advanced_chemist_formula').with('admin1').and_with('other1').mix }
112
163
  it "loads an external web page" do
113
164
  basic.open "http://www.google.com"
114
165
  chem.search
@@ -116,6 +167,10 @@ Feature: Brewing a ChemistryKit project
116
167
  end
117
168
  end
118
169
  """
170
+ And a file named "chemists/others.csv" with:
171
+ """
172
+ Key,Type,Item
173
+ other1,some_sub_account,some_item
174
+ """
119
175
  When I run `ckit brew`
120
176
  Then the stdout should contain "1 example, 0 failures"
121
-
@@ -13,7 +13,7 @@ Feature: Support for concurency
13
13
  @driver.get "http://www.google.com"
14
14
  @driver.title.should include("Google")
15
15
  end
16
- it "loads an external web page" do
16
+ it "loads an external web page 2" do
17
17
  @driver.get "http://www.google.com"
18
18
  @driver.title.should include("Google")
19
19
  end
@@ -97,4 +97,4 @@ Feature: Support for concurency
97
97
  Then the stdout should not contain "All examples were filtered out"
98
98
  And the stdout should not contain "0 examples, 0 failures"
99
99
  And there should be "4" unique results files in the "evidence" directory
100
- And there should be "2" "report" log files in "evidence/cheese/cheese_loads_an_external_web_page"
100
+ And there should be "1" "report" log files in "evidence/cheese/cheese_loads_an_external_web_page"
@@ -23,6 +23,7 @@ Feature: Exit Status
23
23
  When I run `ckit brew`
24
24
  Then the exit code should be 0
25
25
 
26
+ @announce
26
27
  Scenario: Failing
27
28
  And a file named "beakers/test_beaker.rb" with:
28
29
  """
@@ -1,95 +1,98 @@
1
1
  #logging.feature
2
- Feature: Log handling
3
- In order to examine the results of my test suite
4
- As a test harness user
5
- I want to see all of the logs in a central location
6
2
 
7
- Background: Setup the project
8
- Given I run `ckit new logging-test`
9
- And I cd to "logging-test"
10
- And a file named "formulas/bookie.rb" with:
11
- """
12
- module Formulas
13
- class Bookie < Formula
14
- def open(url)
15
- @driver.get url
16
- end
17
- end
18
- end
19
- """
20
- And a file named "beakers/first_beaker.rb" with:
21
- """
22
- describe "First", :depth => 'shallow' do
23
- let(:book) { Formulas::Bookie.new(@driver) }
3
+ ## NOTE Pending until after release candidate
24
4
 
25
- it "loads an external web page" do
26
- book.open "http://www.google.com"
27
- end
28
- end
29
- """
30
- And a file named "beakers/second_beaker.rb" with:
31
- """
32
- describe "Second", :depth => 'shallow' do
33
- let(:book) { Formulas::Bookie.new(@driver) }
5
+ # Feature: Log handling
6
+ # In order to examine the results of my test suite
7
+ # As a test harness user
8
+ # I want to see all of the logs in a central location
34
9
 
35
- it "loads an external web page" do
36
- book.open "http://www.google.com"
37
- end
38
- end
39
- """
10
+ # Background: Setup the project
11
+ # Given I run `ckit new logging-test`
12
+ # And I cd to "logging-test"
13
+ # And a file named "formulas/bookie.rb" with:
14
+ # """
15
+ # module Formulas
16
+ # class Bookie < Formula
17
+ # def open(url)
18
+ # @driver.get url
19
+ # end
20
+ # end
21
+ # end
22
+ # """
23
+ # And a file named "beakers/first_beaker.rb" with:
24
+ # """
25
+ # describe "First", :depth => 'shallow' do
26
+ # let(:book) { Formulas::Bookie.new(@driver) }
40
27
 
41
- Scenario: I can output junit xml results by default
42
- When I run `ckit brew`
43
- Then the stdout should contain "2 examples, 0 failures"
44
- And the following files should exist:
45
- | evidence/results_junit.xml |
28
+ # it "loads an external web page" do
29
+ # book.open "http://www.google.com"
30
+ # end
31
+ # end
32
+ # """
33
+ # And a file named "beakers/second_beaker.rb" with:
34
+ # """
35
+ # describe "Second", :depth => 'shallow' do
36
+ # let(:book) { Formulas::Bookie.new(@driver) }
46
37
 
47
- Scenario: I can output custom junit xml results
48
- Given a file named "config.yaml" with:
49
- """
50
- log:
51
- path: 'my_evidence'
52
- results_file: 'my_results.xml'
53
- format: 'junit'
54
- selenium_connect:
55
- log: 'evidence'
56
- host: 'localhost'
57
- """
58
- When I run `ckit brew`
59
- Then the stdout should contain "2 examples, 0 failures"
60
- And the following files should exist:
61
- | my_evidence/my_results.xml |
38
+ # it "loads an external web page" do
39
+ # book.open "http://www.google.com"
40
+ # end
41
+ # end
42
+ # """
62
43
 
63
- Scenario: I can output html results
64
- Given a file named "config.yaml" with:
65
- """
66
- log:
67
- results_file: 'report.html'
68
- format: 'html'
69
- """
70
- And I run `ckit brew`
71
- Then the stdout should contain "2 examples, 0 failures"
72
- And the following files should exist:
73
- | evidence/report.html |
44
+ # Scenario: I can output junit xml results by default
45
+ # When I run `ckit brew`
46
+ # Then the stdout should contain "2 examples, 0 failures"
47
+ # And the following files should exist:
48
+ # | evidence/results_junit.xml |
74
49
 
75
- Scenario: I define one log location to rule them all
76
- Given a file named "config.yaml" with:
77
- """
78
- log:
79
- path: 'my_evidence'
80
- selenium_connect:
81
- host: 'localhost'
82
- """
83
- When I run `ckit brew`
84
- Then the stdout should contain "2 examples, 0 failures"
85
- And the following files should exist:
86
- | my_evidence/results_junit.xml |
87
- | my_evidence/first/first_loads_an_external_web_page/server.log |
88
- | my_evidence/second/second_loads_an_external_web_page/server.log |
50
+ # Scenario: I can output custom junit xml results
51
+ # Given a file named "config.yaml" with:
52
+ # """
53
+ # log:
54
+ # path: 'my_evidence'
55
+ # results_file: 'my_results.xml'
56
+ # format: 'junit'
57
+ # selenium_connect:
58
+ # log: 'evidence'
59
+ # host: 'localhost'
60
+ # """
61
+ # When I run `ckit brew`
62
+ # Then the stdout should contain "2 examples, 0 failures"
63
+ # And the following files should exist:
64
+ # | my_evidence/my_results.xml |
89
65
 
90
- Scenario: I can runtime override the results output file name
91
- When I run `ckit brew --results_file results_junit_01.xml`
92
- Then the stdout should contain "2 examples, 0 failures"
93
- And the following files should exist:
94
- | evidence/results_junit_01.xml |
66
+ # Scenario: I can output html results
67
+ # Given a file named "config.yaml" with:
68
+ # """
69
+ # log:
70
+ # results_file: 'report.html'
71
+ # format: 'html'
72
+ # """
73
+ # And I run `ckit brew`
74
+ # Then the stdout should contain "2 examples, 0 failures"
75
+ # And the following files should exist:
76
+ # | evidence/report.html |
77
+
78
+ # Scenario: I define one log location to rule them all
79
+ # Given a file named "config.yaml" with:
80
+ # """
81
+ # log:
82
+ # path: 'my_evidence'
83
+ # selenium_connect:
84
+ # host: 'localhost'
85
+ # """
86
+ # When I run `ckit brew`
87
+ # Then the stdout should contain "2 examples, 0 failures"
88
+ # And the following files should exist:
89
+ # | my_evidence/results_junit.xml |
90
+ # | my_evidence/first/first_loads_an_external_web_page/server.log |
91
+ # | my_evidence/second/second_loads_an_external_web_page/server.log |
92
+
93
+ # Scenario: I can runtime override the results output file name
94
+ # When I run `ckit brew --results_file results_junit_01.xml`
95
+ # Then the stdout should contain "2 examples, 0 failures"
96
+ # And the following files should exist:
97
+ # | evidence/results_junit_01.xml |
95
98
 
@@ -0,0 +1,105 @@
1
+ Feature: Advanced HTML Reports
2
+ In order to quickly know the status of the application
3
+ As a chemistry kit harness user
4
+ I want a detailed HTML report of failures
5
+
6
+ Background:
7
+ Given I run `ckit new reporting-test`
8
+ And I cd to "reporting-test"
9
+ And a file named "beakers/first_beaker.rb" with:
10
+ """
11
+ describe "Reporting Beaker 1", :depth => 'shallow' do
12
+ it "loads an external web page, from 1, example 1" do
13
+ @driver.get "http://www.google.com"
14
+ @driver.title.should include("Yoogle")
15
+ end
16
+ it 'something pending' do
17
+ pending 'this should be pending'
18
+ end
19
+ it "loads an external web page, from 1, example 2" do
20
+ @driver.get "http://www.google.com"
21
+ @driver.title.should include("Google")
22
+ end
23
+ end
24
+ """
25
+ And a file named "beakers/second_beaker.rb" with:
26
+ """
27
+ describe "Reporting Beaker 2", :depth => 'shallow' do
28
+ it "loads an external web page, from 2" do
29
+ @driver.get "http://www.google.com"
30
+ @driver.title.should include("Yoogle")
31
+ end
32
+ end
33
+ """
34
+ And a file named "beakers/third_beaker.rb" with:
35
+ """
36
+ describe "Reporting Beaker 3", :depth => 'shallow' do
37
+ it "loads an external web page, from 3" do
38
+ @driver.get "http://www.google.com"
39
+ @driver.title.should include("Yoogle")
40
+ end
41
+ end
42
+ """
43
+ And I overwrite config.yaml with:
44
+ """
45
+ screenshot_on_fail: true
46
+ selenium_connect:
47
+ log: 'evidence'
48
+ browser: 'firefox'
49
+ """
50
+
51
+ @announce
52
+ Scenario: I can run the tests
53
+ When I run `ckit brew`
54
+ Then the stdout should contain "5 examples, 3 failures, 1 pending"
55
+ And the following files should exist:
56
+ | evidence/final_results.html |
57
+
58
+ @announce
59
+ Scenario: I can run the tests local with concurrency
60
+ Given I overwrite config.yaml with:
61
+ """
62
+ concurrency: 2
63
+ screenshot_on_fail: true
64
+ selenium_connect:
65
+ log: 'evidence'
66
+ browser: 'chrome'
67
+ """
68
+ When I run `ckit brew`
69
+ Then the stdout should contain "5 examples, 3 failures, 1 pending"
70
+ And the following files should exist:
71
+ | evidence/final_results.html |
72
+
73
+ @announce
74
+ Scenario: I can run the tests with concurrency
75
+ Given I overwrite config.yaml with:
76
+ """
77
+ concurrency: 2
78
+ screenshot_on_fail: true
79
+ selenium_connect:
80
+ log: 'evidence'
81
+ host: 'saucelabs'
82
+ browser: 'firefox'
83
+ sauce_username: 'testing_arrgyle'
84
+ sauce_api_key: 'ab7a6e17-16df-42d2-9ef6-c8d2539cc38a'
85
+ description: 'concurrency check'
86
+ """
87
+ When I run `ckit brew`
88
+ Then the stdout should contain "2 processes for 3 beakers"
89
+ And the following files should exist:
90
+ | evidence/final_results.html |
91
+
92
+ Scenario: I can run a passing suite
93
+ Given a file named "beakers/fourth_beaker.rb" with:
94
+ """
95
+ describe "Reporting Beaker 4", :depth => 'shallow' do
96
+ it "loads an external web page, from 4" do
97
+ @driver.get "http://www.google.com"
98
+ @driver.title.should include("Google")
99
+ end
100
+ end
101
+ """
102
+ When I run `ckit brew --beakers=beakers/fourth_beaker.rb`
103
+ And the following files should exist:
104
+ | evidence/final_results.html |
105
+