bddfire 1.9.1 → 1.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.markdown +61 -60
- data/lib/bddfire/version.rb +1 -1
- data/scaffold/config_files/README.md +87 -12
- data/scaffold/config_files/Rakefile +20 -7
- data/scaffold/features/google.feature +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGQxYzZjOTA1NTg2NDNhNGExODFmNzc3ZjlhMDk0Yzg3YmNiY2NhNw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZjEyNTA5ODk1NTczMTI3N2YxOGJjZTg4ZGY0YTQwZWYzNjJmZmM1ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YTUwNDQ2ZDNlMjU2NmJlY2RhNDY1NDY0MmJmNDMyNTljYTk1YTQ3MWM3NTQ3
|
10
|
+
N2RiN2I4ODcxMGFlNWU5MzFjY2ExMDYyODE1MjkwNTExZDk1YjczNmU2MWM2
|
11
|
+
MGJkNGRiMTQ4YTk2YjFiNDllYjQwMmIyY2RmNDVjZDgyYjQ5Y2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MDA5OTEyODlmMjVjZTdlODc3OWFjY2EzYjRhNWZmNjYzYTA1NDM2NWQ5NzM4
|
14
|
+
YWM0MjRjYWI1NDNkYThkNWYxZTNjNjU1MGJmY2U0ZGNlNWQwYTE3YTMxNjZl
|
15
|
+
YzhjM2FjYzk5ZTI5MDkwOTUyMjVjMTVmY2Y4OGVkMDEyZmZlYjc=
|
data/README.markdown
CHANGED
@@ -21,17 +21,18 @@ In your project's root directory...
|
|
21
21
|
|
22
22
|
|
23
23
|
This will create 'cucumber' direcory and one command will install Ruby Cucumber framework with all possibly supported tools in the 'cucumber' directory. This will create all the directories and files to support following tools
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
24
|
+
* Capybara
|
25
|
+
* Selenium-Webdriver
|
26
|
+
* Poltergeist: PhantomJS based headless driver for capybara
|
27
|
+
* Run scenarios in parallel 10 processes and rerun failed scenarios.
|
28
|
+
* Appium : Mobile test automation Framework
|
29
|
+
* Saucelabs : Cloud testing framework
|
30
|
+
* Browserstack : Cloud testing framework
|
31
|
+
* TestingBot : Cloud testing framework
|
32
|
+
* Relish : Living Documenation
|
33
|
+
* Yard : Cucumber documentation
|
34
|
+
* Rubocop : Ruby code review tool
|
35
|
+
* CI Support Script
|
35
36
|
|
36
37
|
|
37
38
|
If you don't already have a `Gemfile` or `Rakefile`, one will be created.
|
@@ -45,98 +46,98 @@ Now, we need to run bundle install [Fix nokogiri error if you get any by using s
|
|
45
46
|
$ cd cucumber
|
46
47
|
$ bundle install
|
47
48
|
|
48
|
-
Once installed, you can run cucumber with multiple
|
49
|
-
|
50
|
-
## Don't waste time writing steps. Use predefined
|
49
|
+
Once installed, you can run cucumber with multiple cabybara driver
|
51
50
|
|
51
|
+
#Usage
|
52
|
+
### Pre-defined-steps
|
52
53
|
You can use[Browser based](https://github.com/Shashikant86/bddfire/blob/master/pre-defined-steps/capybara_steps.md) steps
|
53
54
|
You can use headless Poltergeist based [headless Poltergeist based](https://github.com/Shashikant86/bddfire/blob/master/pre-defined-steps/headless_steps.md) steps
|
54
55
|
|
56
|
+
### Parallel Cucumber & Re-run Failed
|
57
|
+
You can run entire test suite in 10 different processes but you can increase number of processes. The reports are generated for each process. If any scenario failed it will re-run. It will use poltergeist by default but you can change in Rakefile
|
58
|
+
|
59
|
+
$ rake parallel_cucumber
|
60
|
+
|
61
|
+
###Selenium Firefox
|
62
|
+
You can use selenium driver to run scenario in browser [firefox].
|
63
|
+
|
64
|
+
$ rake selenium
|
65
|
+
|
66
|
+
You can run cucumber with profile like this
|
55
67
|
|
56
|
-
|
68
|
+
$ bundle exec cucumber -p selenium
|
57
69
|
|
58
|
-
|
70
|
+
###Headless Poletergeist
|
71
|
+
You can use PhantomJS based Capybara driver Poltergeist driver.
|
59
72
|
|
60
|
-
|
73
|
+
|
74
|
+
You can run cucumber with profile like this
|
61
75
|
|
62
76
|
$ bundle exec cucumber -p poltergeist
|
63
77
|
|
64
|
-
|
78
|
+
OR
|
65
79
|
|
66
|
-
|
80
|
+
$ rake poltergeist
|
67
81
|
|
82
|
+
###Chrome Driver
|
83
|
+
You can run your scenarios in Google Chrome
|
68
84
|
|
69
|
-
|
70
|
-
|
85
|
+
$ rake poltergeist
|
86
|
+
You can run cucumber with profile like this
|
71
87
|
|
72
|
-
|
88
|
+
$ bundle exec cucumber -p chrome
|
73
89
|
|
74
|
-
##### Use Browserstack :
|
75
|
-
Please enter your BS_USERNAME and BS_KEY key in the env.rb file
|
76
90
|
|
77
|
-
|
91
|
+
###Cloud Testing Frameworks
|
92
|
+
Please enter your USERNAME and KEY in the env.rb file
|
78
93
|
|
79
|
-
|
80
|
-
|
94
|
+
$ rake sauce/browserstack/testingbot
|
95
|
+
OR
|
81
96
|
|
82
|
-
|
97
|
+
$ bundle exec cucumber -p sauce/browserstack/testingbot
|
83
98
|
|
84
|
-
|
85
|
-
|
99
|
+
###Appium:
|
100
|
+
Run Appium server in the background.
|
86
101
|
|
87
102
|
$ npm install
|
88
103
|
$ ./node_modules/.bin/appium
|
104
|
+
OR
|
89
105
|
|
90
|
-
|
91
|
-
|
92
|
-
$ bundle exec cucumber -p appium_android_web ADB_SERIAL=serial_number
|
106
|
+
$rake start_appium
|
93
107
|
|
94
|
-
Now run cucumber with appium
|
108
|
+
Now run cucumber with appium. Make sure you updated env.rb file with capabilities you want to use for Android.
|
95
109
|
|
96
|
-
$ bundle exec cucumber -p
|
110
|
+
$ bundle exec cucumber -p appium ADB_SERIAL=serial_number
|
97
111
|
|
98
|
-
|
112
|
+
Now run cucumber with appium iOS. Make sure you updated env.rb file with capabilities you want to use for iOS
|
99
113
|
|
100
|
-
|
114
|
+
$ bundle exec cucumber -p appium
|
101
115
|
|
102
|
-
|
116
|
+
###Cuke_sniffer
|
117
|
+
You can use cuke_sniffer to detect smells in your Cucumber. It will generate reports in the cuke_sniffer.html in the 'reports' directory.
|
103
118
|
|
104
|
-
|
119
|
+
$ rake cuke_sniffer
|
105
120
|
|
106
|
-
|
121
|
+
###Rubocop
|
107
122
|
|
108
|
-
You can
|
109
|
-
|
110
|
-
$ bundle exec rake rubocop
|
123
|
+
You can use rubocop to detect ruby errors in your Ruby file
|
111
124
|
|
125
|
+
$ rake rubocop
|
126
|
+
This will report all the offence in rubocop.
|
112
127
|
|
113
128
|
## CI Integration
|
114
129
|
|
115
|
-
Currently, you can use the script 'ci_script' on Jenkins or Hudson. More CI
|
130
|
+
Currently, you can use the script 'ci_script' on Jenkins or Hudson. More CI Integration is on the way.
|
116
131
|
|
117
132
|
You need pass rake rask to the script
|
118
133
|
|
119
134
|
$ ./ci_script features
|
120
135
|
|
121
136
|
|
122
|
-
## Use Rake
|
123
|
-
You can also use Rake taks created automatically for you
|
124
|
-
|
125
|
-
$ bundle exec rake features
|
126
|
-
|
127
|
-
You can run Cuke_sniffer report on your project
|
128
|
-
|
129
|
-
$ bundle exec rake cuke_sniffer
|
130
|
-
|
131
|
-
You can run rubocop report on your project
|
132
|
-
|
133
|
-
$ bundle exec rake rubocop
|
134
|
-
|
135
|
-
|
136
137
|
# TODO
|
137
138
|
|
138
|
-
* Add more and more steps so that user won't need to write more code
|
139
|
-
* Add examples to show use of native app automation
|
139
|
+
* Add more and more steps so that user won't need to write more code
|
140
|
+
* Add examples to show use of native app automation
|
140
141
|
|
141
142
|
|
142
143
|
## LICENSE
|
data/lib/bddfire/version.rb
CHANGED
@@ -1,27 +1,102 @@
|
|
1
|
-
BDD Scenarios
|
1
|
+
BDD Scenarios
|
2
2
|
========================
|
3
3
|
|
4
4
|
## Install
|
5
5
|
|
6
6
|
Your description to install project
|
7
7
|
|
8
|
-
$ bundle install
|
9
|
-
Make sure you are using corect ruby version.
|
8
|
+
$ bundle install
|
9
|
+
Make sure you are using corect ruby version.
|
10
10
|
|
11
11
|
## Usage
|
12
|
+
Now, we need to run bundle install [Fix nokogiri error if you get any by using supported nokogiri version]
|
12
13
|
|
13
|
-
|
14
|
+
$ cd cucumber
|
15
|
+
$ bundle install
|
14
16
|
|
15
|
-
|
16
|
-
|
17
|
-
### Run Rake tasks
|
17
|
+
Once installed, you can run cucumber with multiple cabybara driver
|
18
18
|
|
19
|
-
|
19
|
+
#Usage
|
20
|
+
### Pre-defined-steps
|
21
|
+
You can use[Browser based](https://github.com/Shashikant86/bddfire/blob/master/pre-defined-steps/capybara_steps.md) steps
|
22
|
+
You can use headless Poltergeist based [headless Poltergeist based](https://github.com/Shashikant86/bddfire/blob/master/pre-defined-steps/headless_steps.md) steps
|
20
23
|
|
24
|
+
### Parallel Cucumber & Re-run Failed
|
25
|
+
You can run entire test suite in 10 different processes but you can increase number of processes. The reports are generated for each process. If any scenario failed it will re-run. It will use poltergeist by default but you can change in Rakefile
|
21
26
|
|
22
|
-
|
27
|
+
$ rake parallel_cucumber
|
23
28
|
|
29
|
+
###Selenium Firefox
|
30
|
+
You can use selenium driver to run scenario in browser [firefox].
|
24
31
|
|
25
|
-
|
26
|
-
|
27
|
-
|
32
|
+
$ rake selenium
|
33
|
+
|
34
|
+
You can run cucumber with profile like this
|
35
|
+
|
36
|
+
$ bundle exec cucumber -p selenium
|
37
|
+
|
38
|
+
###Headless Poletergeist
|
39
|
+
You can use PhantomJS based Capybara driver Poltergeist driver.
|
40
|
+
|
41
|
+
|
42
|
+
You can run cucumber with profile like this
|
43
|
+
|
44
|
+
$ bundle exec cucumber -p poltergeist
|
45
|
+
|
46
|
+
OR
|
47
|
+
|
48
|
+
$ rake poltergeist
|
49
|
+
|
50
|
+
###Chrome Driver
|
51
|
+
You can run your scenarios in Google Chrome
|
52
|
+
|
53
|
+
$ rake poltergeist
|
54
|
+
You can run cucumber with profile like this
|
55
|
+
|
56
|
+
$ bundle exec cucumber -p chrome
|
57
|
+
|
58
|
+
|
59
|
+
###Cloud Testing Frameworks
|
60
|
+
Please enter your USERNAME and KEY in the env.rb file
|
61
|
+
|
62
|
+
$ rake sauce/browserstack/testingbot
|
63
|
+
OR
|
64
|
+
|
65
|
+
$ bundle exec cucumber -p sauce/browserstack/testingbot
|
66
|
+
|
67
|
+
###Appium:
|
68
|
+
Run Appium server in the background.
|
69
|
+
|
70
|
+
$ npm install
|
71
|
+
$ ./node_modules/.bin/appium
|
72
|
+
OR
|
73
|
+
|
74
|
+
$rake start_appium
|
75
|
+
|
76
|
+
Now run cucumber with appium. Make sure you updated env.rb file with capabilities you want to use for Android.
|
77
|
+
|
78
|
+
$ bundle exec cucumber -p appium ADB_SERIAL=serial_number
|
79
|
+
|
80
|
+
Now run cucumber with appium iOS. Make sure you updated env.rb file with capabilities you want to use for iOS
|
81
|
+
|
82
|
+
$ bundle exec cucumber -p appium
|
83
|
+
|
84
|
+
###Cuke_sniffer
|
85
|
+
You can use cuke_sniffer to detect smells in your Cucumber. It will generate reports in the cuke_sniffer.html in the 'reports' directory.
|
86
|
+
|
87
|
+
$ rake cuke_sniffer
|
88
|
+
|
89
|
+
###Rubocop
|
90
|
+
|
91
|
+
You can use rubocop to detect ruby errors in your Ruby file
|
92
|
+
|
93
|
+
$ rake rubocop
|
94
|
+
This will report all the offence in rubocop.
|
95
|
+
|
96
|
+
## CI Integration
|
97
|
+
|
98
|
+
Currently, you can use the script 'ci_script' on Jenkins or Hudson. More CI Integration is on the way.
|
99
|
+
|
100
|
+
You need pass rake rask to the script
|
101
|
+
|
102
|
+
$ ./ci_script features
|
@@ -18,7 +18,7 @@ end
|
|
18
18
|
|
19
19
|
task :parallel_run do
|
20
20
|
puts "===== Executing Tests in parallel"
|
21
|
-
system "bundle exec parallel_cucumber features/ -o \"-p parallel -p pretty\" -n 10"
|
21
|
+
system "bundle exec parallel_cucumber features/ -o \"-p parallel -p poltergeist -p pretty\" -n 10"
|
22
22
|
puts " ====== Parallel execution finished and cucumber_failure.log created ========="
|
23
23
|
end
|
24
24
|
|
@@ -33,8 +33,7 @@ end
|
|
33
33
|
|
34
34
|
task :parallel_cucumber => [ :cleanup, :parallel_run, :rerun ]
|
35
35
|
|
36
|
-
Rake::Task["parallel_cucumber"].invoke
|
37
|
-
|
36
|
+
# Rake::Task["parallel_cucumber"].invoke
|
38
37
|
|
39
38
|
YARD::Rake::YardocTask.new(:yard) do |t|
|
40
39
|
t.files = ['features/**/*.feature', 'features/**/*.rb']
|
@@ -49,6 +48,9 @@ Cucumber::Rake::Task.new(:poltergeist) do |t|
|
|
49
48
|
t.cucumber_opts = "features -p poltergeist --format pretty --profile html "
|
50
49
|
end
|
51
50
|
|
51
|
+
Cucumber::Rake::Task.new(:chrome) do |t|
|
52
|
+
t.cucumber_opts = "features -p chrome --format pretty --profile html "
|
53
|
+
end
|
52
54
|
|
53
55
|
Cucumber::Rake::Task.new(:sauce) do |t|
|
54
56
|
t.cucumber_opts = "features -p sauce --format pretty --profile html "
|
@@ -58,17 +60,28 @@ Cucumber::Rake::Task.new(:browserstack) do |t|
|
|
58
60
|
t.cucumber_opts = "features -p browserstack --format pretty --profile html "
|
59
61
|
end
|
60
62
|
|
61
|
-
|
62
|
-
|
63
|
+
Cucumber::Rake::Task.new(:testingbot) do |t|
|
64
|
+
t.cucumber_opts = "features -p testingbot --format pretty --profile html "
|
65
|
+
end
|
66
|
+
|
67
|
+
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 ....====="
|
70
|
+
t.cucumber_opts = "features -p appium_android_web ADB_SERIAL=#{ADB_SERIAL} --format pretty --profile html "
|
71
|
+
end
|
72
|
+
|
73
|
+
task :cuke_sniffer do
|
74
|
+
sh "bundle exec cuke_sniffer --out html reports/cuke_sniffer.html"
|
63
75
|
end
|
64
76
|
|
65
77
|
task :rubocop do
|
66
78
|
sh "bundle exec rubocop features/"
|
67
79
|
end
|
68
80
|
|
69
|
-
task :
|
81
|
+
task :start_appium do
|
70
82
|
puts "===== Installing Appium with NodeJS====="
|
71
83
|
sh "npm install"
|
72
84
|
sh " ./node_modules/.bin/appium > /dev/null 2>&1"
|
73
|
-
system "bundle exec cucumber -p appium_android_web ADB_SERIAL=#{ADB_SERIAL}"
|
74
85
|
end
|
86
|
+
|
87
|
+
task :police => [ :cleanup, :cuke_sniffer]
|