testingbot 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +16 -1
- data/examples/test_rspec.rb +4 -2
- data/examples/test_unit.rb +10 -8
- data/lib/testingbot.rb +3 -4
- data/lib/testingbot/version.rb +1 -1
- metadata +6 -6
data/README.rdoc
CHANGED
@@ -30,8 +30,14 @@ You can find an example in our examples folder, try something like this:
|
|
30
30
|
:port => 4444,
|
31
31
|
:browser => "*safari",
|
32
32
|
:url => "http://www.google.com",
|
33
|
+
:platform => "WINDOWS",
|
34
|
+
:version => 6,
|
33
35
|
:timeout_in_second => 60
|
34
36
|
|
37
|
+
browser.options = {
|
38
|
+
:screenshot => true
|
39
|
+
}
|
40
|
+
|
35
41
|
browser.start_new_browser_session
|
36
42
|
end
|
37
43
|
|
@@ -46,6 +52,7 @@ You can find an example in our examples folder, try something like this:
|
|
46
52
|
end
|
47
53
|
|
48
54
|
=== Example RSpec
|
55
|
+
This example needs RSpec version 1. You can run it with spec test_rspec.rb
|
49
56
|
|
50
57
|
require "rubygems"
|
51
58
|
require "testingbot"
|
@@ -59,7 +66,9 @@ You can find an example in our examples folder, try something like this:
|
|
59
66
|
:host => "http://hub.testingbot.com",
|
60
67
|
:port => 4444,
|
61
68
|
:browser => "*safari",
|
62
|
-
:url => "http://www.google.com",
|
69
|
+
:url => "http://www.google.com",
|
70
|
+
:platform => "WINDOWS",
|
71
|
+
:version => 6,
|
63
72
|
:timeout_in_second => 60
|
64
73
|
end
|
65
74
|
|
@@ -77,6 +86,12 @@ You can find an example in our examples folder, try something like this:
|
|
77
86
|
end
|
78
87
|
end
|
79
88
|
|
89
|
+
== Extra options
|
90
|
+
You can specify extra options like enabling/disabling the screenrecording or screenshot feature. (browser.options)
|
91
|
+
|
92
|
+
There's also an option to pass along extra data with your test, which will be visible on testingbot.com.
|
93
|
+
For example a build number, or other custom data. (browser.extra = "")
|
94
|
+
|
80
95
|
== More information
|
81
96
|
|
82
97
|
Get more information on http://www.testingbot.com
|
data/examples/test_rspec.rb
CHANGED
@@ -12,11 +12,13 @@ describe "People" do
|
|
12
12
|
|
13
13
|
before(:all) do
|
14
14
|
@selenium_driver = Selenium::Client::Driver.new \
|
15
|
-
:host => "
|
15
|
+
:host => "http://hub.testingbot.com",
|
16
16
|
:port => 4444,
|
17
17
|
:browser => "firefox",
|
18
18
|
:url => "http://www.google.com",
|
19
|
-
:timeout_in_second => 60
|
19
|
+
:timeout_in_second => 60,
|
20
|
+
:platform => "WINDOWS",
|
21
|
+
:version => "6"
|
20
22
|
end
|
21
23
|
|
22
24
|
before(:each) do
|
data/examples/test_unit.rb
CHANGED
@@ -12,19 +12,19 @@ class ExampleTest < TestingBot::TestCase
|
|
12
12
|
|
13
13
|
def setup
|
14
14
|
@browser = Selenium::Client::Driver.new \
|
15
|
-
|
15
|
+
:host => "hub.testingbot.com",
|
16
16
|
:port => 4444,
|
17
|
-
:browser => "
|
17
|
+
:browser => "iexplore",
|
18
18
|
:platform => "WINDOWS",
|
19
|
-
:version => "
|
19
|
+
:version => "7",
|
20
20
|
:url => "http://www.google.com",
|
21
21
|
:timeout_in_second => 60
|
22
22
|
|
23
23
|
browser.options = {
|
24
|
-
:screenrecorder => false
|
25
24
|
}
|
26
25
|
|
27
|
-
browser.extra = "
|
26
|
+
browser.extra = "First test" # some custom data you can pass with your tests
|
27
|
+
|
28
28
|
browser.start_new_browser_session
|
29
29
|
end
|
30
30
|
|
@@ -33,9 +33,11 @@ class ExampleTest < TestingBot::TestCase
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def test_page_search
|
36
|
+
# browser.window_maximize
|
36
37
|
browser.open "/"
|
37
|
-
|
38
|
-
|
39
|
-
|
38
|
+
#browser.type "q", "selenium rc"
|
39
|
+
#browser.click "btnG"
|
40
|
+
#sleep 150
|
41
|
+
assert_equal "Google", browser.title
|
40
42
|
end
|
41
43
|
end
|
data/lib/testingbot.rb
CHANGED
@@ -44,8 +44,7 @@ module Selenium
|
|
44
44
|
module Client
|
45
45
|
module Base
|
46
46
|
DEFAULT_OPTIONS = {
|
47
|
-
:screenshot => true
|
48
|
-
:screenrecorder => true
|
47
|
+
:screenshot => true
|
49
48
|
}
|
50
49
|
|
51
50
|
alias :close_current_browser_session_old :close_current_browser_session
|
@@ -112,7 +111,7 @@ if defined?(Spec)
|
|
112
111
|
"extra" => @selenium_driver.extra
|
113
112
|
}
|
114
113
|
|
115
|
-
url = URI.parse('http://
|
114
|
+
url = URI.parse('http://testingbot.com/hq')
|
116
115
|
http = Net::HTTP.new(url.host, url.port)
|
117
116
|
response = http.post(url.path, params.map { |k, v| "#{k.to_s}=#{v}" }.join("&"))
|
118
117
|
end
|
@@ -141,7 +140,7 @@ if defined?(Test::Unit::TestCase)
|
|
141
140
|
"extra" => browser.extra
|
142
141
|
}
|
143
142
|
|
144
|
-
url = URI.parse('http://
|
143
|
+
url = URI.parse('http://testingbot.com/hq')
|
145
144
|
http = Net::HTTP.new(url.host, url.port)
|
146
145
|
response = http.post(url.path, params.map { |k, v| "#{k.to_s}=#{v}" }.join("&"))
|
147
146
|
run_teardown_old
|
data/lib/testingbot/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testingbot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-12-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &70105967496820 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - <=
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.3.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70105967496820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: selenium-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &70105967495920 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70105967495920
|
36
36
|
description: This gem makes using our Selenium grid on testingbot.com easy
|
37
37
|
email:
|
38
38
|
- info@testingbot.com
|