bddfire 1.9.0 → 1.9.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjZjOTJjMWEzMzliMTI3Mzc4ZWQxOTQ4NWI5MjVmZDgyYjU2ZTZmZA==
4
+ NTEyYmU5MjZiMjI0MmVjMWQ2Yjg4MThiZTc0ZGIwYjcyMzQ5ZTFmYg==
5
5
  data.tar.gz: !binary |-
6
- YzY2NWU1YTJiNWY5ZjhlOWUxNDUxZDg2MGE5YzA5ZmI5NjdiZjM1OQ==
6
+ MGEwMTg5NmZlN2Y3MjNkZTVlOGVkZGRmOTNkMWY1ZjI3NjE4NmQ0NA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OWU2NTljYzhhZTY3OGE5NWNmYTBjOWNjNmQ0ZTllY2IyNjkwNTQxOGY3YzVj
10
- OGE3OWZjNDYwNDBhZDRiODM1ZTQ0ZjhiMzkwNTdhMjQwNTdhZDYwMGViMTk0
11
- ZTAxMjBiNTc2OTQ2NjVjNDNmMDdhNDc4OTI0NjcyNWZjNWM1ODA=
9
+ ZTlkMTlhZmNjZmQyMGQxNWMxODRmY2I1N2VlODZmYWEyMGFlOGE4YzlhNjg3
10
+ M2FhZjVlZGQ1OTdkZDg4NzJiODcwODNjYjdmZGE4Y2FiZGNkNjNmMGM1MzE4
11
+ NmYzZDVhOWQ3ZDg3MDVlMmQ2ZWM1NDg5MWYwMDM2ZTA4NDY4MDI=
12
12
  data.tar.gz: !binary |-
13
- ZTkzZGJjMmIzNDI3ZDcxYjE1MjM1ZDA0NDlkNTVhMTU2MDY3NTU4MTE3NWM0
14
- NTE1OGRhMTY1MTA2YzJkYWUzOTBiNjc2ZjY5NmQ5Y2YxY2M4MTZjMTdlYWQ5
15
- OGFiZGE5OTYzYzU1N2E3MzgwZDI4MzViZjkzM2VmNzAxMTgzMTk=
13
+ M2RlYWQzNzA0NjBhNDQxZGE1MTUyZTllZTdjZDcwNmJlNDc4Njg5ODU3NzZj
14
+ OGVlMjQzMzQwOTQ1ZWE1YzdkOGVhMzg2NTVlYTA5NzQwNTJlNmE0N2VmMDA2
15
+ NTc0YjAzNGQyMWI4N2Q2NGQwNmMzZmMxZmJhYzliYWE1YTRkNjM=
@@ -1,44 +1,44 @@
1
1
 
2
- Then(/^page should have title "(.*?)"$/) do |title|
2
+ Then(/^the page title is "(.*?)"$/) do |title|
3
3
  page.should have_title(title)
4
4
  end
5
5
 
6
- Then(/^I should see element "(.*?)" having text "(.*?)"$/) do |element, text|
6
+ Then(/^I see the element "(.*?)" with the text "(.*?)"$/) do |element, text|
7
7
  page.should have_css(element, :text => text)
8
8
  end
9
9
 
10
- Then(/^page should have element "(.*?)"$/) do |element|
10
+ Then(/^page contains "(.*?)"$/) do |element|
11
11
  page.should have_css(element)
12
12
  end
13
13
 
14
- Then(/^I should see element "(.*?)" having count "(.*?)"$/) do |element, count|
14
+ Then(/^I see element "(.*?)" "(.*?)" times$/) do |element, count|
15
15
  page.should have_css(element, :count => count)
16
16
  end
17
17
 
18
- Then(/^page should have button "(.*?)"$/) do |button|
18
+ Then(/^page contains the button "(.*?)"$/) do |button|
19
19
  page.should have_buttton(button)
20
20
  end
21
21
 
22
- Then(/^page should have field "(.*?)"$/) do |field|
22
+ Then(/^page contains the field "(.*?)"$/) do |field|
23
23
  page.should have_field(field)
24
24
  end
25
25
 
26
- Then(/^page should have link "(.*?)"$/) do |link|
26
+ Then(/^page contains the link "(.*?)"$/) do |link|
27
27
  page.should have_link(link)
28
28
  end
29
29
 
30
- Then(/^page should have table "(.*?)"$/) do |table|
30
+ Then(/^page contains the table "(.*?)"$/) do |table|
31
31
  page.should have_table(table)
32
32
  end
33
33
 
34
- Then(/^I should see an element "(.*?)" with checked field$/) do |element|
34
+ Then(/^the element "(.*?)" is checked$/) do |element|
35
35
  page.should have_checked_field(element)
36
36
  end
37
37
 
38
- Then(/^I should see an element "(.*?)" with unchecked field$/) do |element|
38
+ Then(/^the element "(.*?)" is unchecked$/) do |element|
39
39
  page.should have_unchecked_field(element)
40
40
  end
41
41
 
42
- Then(/^I should see content "(.*?)" in the page$/) do |content|
42
+ Then(/^the page contains the following content "(.*?)"$/) do |content|
43
43
  page.should have_content(content)
44
44
  end
@@ -1,3 +1,3 @@
1
1
  module BDDfire
2
- VERSION = "1.9.0"
2
+ VERSION = "1.9.1"
3
3
  end
@@ -3,7 +3,7 @@ Given(/^I am on "(.*?)"$/) do |url|
3
3
  visit(url)
4
4
  end
5
5
 
6
- When(/^I fill in "(.*?)" with "(.*?)"$/) do |element, text|
6
+ When(/^I fill in "(.*?)" with the text "(.*?)"$/) do |element, text|
7
7
  fill_in element, with: text
8
8
  end
9
9
 
@@ -15,11 +15,11 @@ When(/^I fill "(.*?)" into field with (.+) "(.*?)"$/) do |data, type, locator|
15
15
  fill_in locator, with: data
16
16
  end
17
17
 
18
- When(/^I click on element "(.*?)"$/) do |link|
18
+ When(/^I select the "(.*?)" link$/) do |link|
19
19
  click_link(link)
20
20
  end
21
21
 
22
- When(/^I click on button "(.*?)"$/) do |button|
22
+ When(/^I select the "(.*?)" button$/) do |button|
23
23
  click_button(button)
24
24
  end
25
25
 
@@ -27,11 +27,11 @@ When(/^I click on link having text "(.*?)"$/) do |text|
27
27
  click_link(text)
28
28
  end
29
29
 
30
- When(/^I checked checkbox "(.*?)"$/) do |box|
30
+ When(/^I check checkbox "(.*?)"$/) do |box|
31
31
  check(box)
32
32
  end
33
33
 
34
- When(/^I unchecked checkbox "(.*?)"$/) do |box|
34
+ When(/^I uncheck checkbox "(.*?)"$/) do |box|
35
35
  uncheck(box)
36
36
  end
37
37
 
@@ -39,14 +39,14 @@ When(/^I choose radio button"(.*?)"$/) do |radiobutton|
39
39
  choose(radiobutton)
40
40
  end
41
41
 
42
- When(/^I select option "(.*?)" from dropdown "(.*?)"$/) do |option, dropdown|
42
+ When(/^I select option "(.*?)" from the dropdown "(.*?)"$/) do |option, dropdown|
43
43
  select(option, :from => dropdown)
44
44
  end
45
45
 
46
- When(/^I attached file "(.*?)" to field "(.*?)"$/) do |file, locator|
46
+ When(/^I attach the file "(.*?)" to the field "(.*?)"$/) do |file, locator|
47
47
  attach_file(locator, file)
48
48
  end
49
49
 
50
- When(/^I hover over element"(.*?)"$/) do |element|
50
+ When(/^I hover over thr element"(.*?)"$/) do |element|
51
51
  page.find(element).hover
52
52
  end
@@ -19,27 +19,27 @@
19
19
  ### User Actions
20
20
 
21
21
  Given I am on “url”
22
- When I filling “element” with “text”
23
- When I click on “link”
24
- When I click on button
22
+ When I fill in “element” with the text “text”
23
+ When I selet the “link” link
24
+ When I select the "button" button
25
25
  When I click on element having text “text"
26
- When I checked “checkbox”
27
- When I unchecked “checkbox”
26
+ When I check “checkbox”
27
+ When I uncheck “checkbox”
28
28
  When I choose “radio button”
29
- When I select option “” from dropdown “”
30
- When I attach file “file_path"to field “locator”
31
- When I hover over element “locator
29
+ When I select option “option” from the dropdown “dropdown”
30
+ When I attach the file “file_path" to the field “locator”
31
+ When I hover over the element “locator"
32
32
 
33
33
  ### Assertions
34
34
 
35
- Then page should have title “"
36
- Then I should see element “element” having text “text”
37
- Then page should have element “element”
38
- Then I should see element “element” having count “count”
39
- Then page should have link “”
40
- Then page should have button “”
41
- Then page should have field “”
42
- Then page should have table “”
43
- Then I should see element “” with checked field
44
- Then I should see element “” with unchecked field
45
- Then I should see content “” in the page
35
+ Then the page title is title"
36
+ Then I see the element “element” with the text “text”
37
+ Then page contains “element”
38
+ Then I see element “element” “count” times
39
+ Then page contains the link "link"
40
+ Then page contains the button “button”
41
+ Then page contains the field “field”
42
+ Then page contains the table “table”
43
+ Then the element element is checked
44
+ Then the element element is unchecked
45
+ Then the page contains the following content "content"
@@ -1,18 +1,61 @@
1
- equire 'rubygems'
1
+ require 'rubygems'
2
2
  require 'cucumber'
3
3
  require 'cucumber/rake/task'
4
4
  require 'parallel'
5
5
  require 'json'
6
6
  require 'yard'
7
+ require 'fileutils'
8
+
9
+ ADB_SERIAL = "your_serial_number"
10
+
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")
17
+ end
18
+
19
+ task :parallel_run do
20
+ puts "===== Executing Tests in parallel"
21
+ system "bundle exec parallel_cucumber features/ -o \"-p parallel -p pretty\" -n 10"
22
+ puts " ====== Parallel execution finished and cucumber_failure.log created ========="
23
+ end
24
+
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
32
+ end
33
+
34
+ task :parallel_cucumber => [ :cleanup, :parallel_run, :rerun ]
35
+
36
+ Rake::Task["parallel_cucumber"].invoke
7
37
 
8
38
 
9
39
  YARD::Rake::YardocTask.new(:yard) do |t|
10
40
  t.files = ['features/**/*.feature', 'features/**/*.rb']
11
- #t.options = ['--any', '--extra', '--opts'] # optional
12
41
  end
13
42
 
14
- Cucumber::Rake::Task.new(:cucumber) do |t|
15
- t.cucumber_opts = "features --format pretty"
43
+ Cucumber::Rake::Task.new(:seleium) do |t|
44
+ t.cucumber_opts = "features -p selenium --format pretty --profile html "
45
+ end
46
+
47
+
48
+ Cucumber::Rake::Task.new(:poltergeist) do |t|
49
+ t.cucumber_opts = "features -p poltergeist --format pretty --profile html "
50
+ end
51
+
52
+
53
+ Cucumber::Rake::Task.new(:sauce) do |t|
54
+ t.cucumber_opts = "features -p sauce --format pretty --profile html "
55
+ end
56
+
57
+ Cucumber::Rake::Task.new(:browserstack) do |t|
58
+ t.cucumber_opts = "features -p browserstack --format pretty --profile html "
16
59
  end
17
60
 
18
61
  task :parallel_cucumber do
@@ -22,3 +65,10 @@ end
22
65
  task :rubocop do
23
66
  sh "bundle exec rubocop features/"
24
67
  end
68
+
69
+ task :appium do
70
+ puts "===== Installing Appium with NodeJS====="
71
+ sh "npm install"
72
+ sh " ./node_modules/.bin/appium > /dev/null 2>&1"
73
+ system "bundle exec cucumber -p appium_android_web ADB_SERIAL=#{ADB_SERIAL}"
74
+ end
@@ -1,5 +1,5 @@
1
1
  default: -p selenium
2
- html_report: --format pretty --format html --out=features_report.html
2
+ html: --format --out reports/test-report.html
3
3
  bvt: --tags @test
4
4
  browserstack : DRIVER=browserstack
5
5
  testingbot: DRIVER=testingbot
@@ -8,3 +8,6 @@ selenium : DRIVER=selenium
8
8
  appium : DRIVER=appium
9
9
  sauce : DRIVER=sauce
10
10
  chrome: DRIVER=chrome
11
+ parallel_html: --format html --out reports/process<%= ENV['TEST_ENV_NUMBER'] %>.html
12
+ pretty: -f pretty
13
+ parallel: --format pretty --profile parallel_html --format ParallelTests::Cucumber::FailuresLogger --out cucumber_failures.log
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bddfire
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.0
4
+ version: 1.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shashikant Jagtap
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-17 00:00:00.000000000 Z
11
+ date: 2015-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cucumber
@@ -201,3 +201,4 @@ specification_version: 4
201
201
  summary: ! 'BDDfire: Automate Mobile & Web apps with less code. An instant Ruby-Cucumber
202
202
  BDD framework'
203
203
  test_files: []
204
+ has_rdoc: