watirgrid 1.0.3.pre → 1.0.3
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 +13 -17
- data/Rakefile +1 -1
- data/bin/provider +1 -1
- data/lib/controller.rb +2 -2
- data/lib/provider.rb +1 -1
- data/watirgrid.gemspec +3 -3
- metadata +8 -11
data/README.rdoc
CHANGED
@@ -12,7 +12,7 @@ WatirGrid is built on Rinda which implements the Linda distributed computing par
|
|
12
12
|
In other words, WatirGrid allows multiple parallel processes to *_provide_* remote Watir objects in the form of tuple spaces across a grid network. This grid network is *_controlled_* by a ring server.
|
13
13
|
|
14
14
|
==== Key Terminology
|
15
|
-
The *controller* implements a repository of tuples (tuple space) that can be accessed concurrently. The controller hosts the *ring* *server* which advertises these tuples across a grid network. Typically you will host one controller on a central machine.
|
15
|
+
The *controller* implements a repository of tuples (tuple space) that can be accessed concurrently. The controller hosts the *ring* *server* which advertises these tuples across a grid network making it loosely coupled. Typically you will host one controller on a central machine.
|
16
16
|
|
17
17
|
The *providers* make remote Watir objects available to the tuple space hosted by the *ring* *server*. Typically you will host one or many providers on your grid network, for example, each PC may become a single provider of a Watir tuple in the form of an Internet Explorer, Firefox or Safari browser object.
|
18
18
|
|
@@ -22,29 +22,24 @@ Pick a server to host the 'controller' for the ring server and execute the follo
|
|
22
22
|
$ controller
|
23
23
|
|
24
24
|
This should find your external facing IP and start the corresponding DRb and Ring Servers:
|
25
|
-
|
25
|
+
Controller started on : druby://143.238.105.61:11235
|
26
26
|
Ring server started on: druby://143.238.105.61:12358
|
27
27
|
|
28
28
|
On each client PC, host the 'provider' for the distributed (DRb) Watir objects
|
29
29
|
$ provider
|
30
30
|
|
31
31
|
This should find the recently started Ring Server and register a tuple for the Watir object:
|
32
|
-
|
33
|
-
|
34
|
-
New tuple registered : druby://143.238.105.61:
|
32
|
+
Provider started on : druby://143.238.105.61:11236
|
33
|
+
Controller found on : druby://143.238.105.61:11355
|
34
|
+
New tuple registered : druby://143.238.105.61:11355
|
35
35
|
|
36
36
|
You will now be able to execute commands across remote browsers on your grid network.
|
37
37
|
|
38
38
|
e.g.
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
threads << Thread.new do
|
44
|
-
b = browser[:object].new_browser
|
45
|
-
b.goto("http://www.google.com")
|
46
|
-
b.text_field(:name, 'q').set("watirgrid")
|
47
|
-
b.button(:name, "btnI").click
|
39
|
+
Watir::Grid.control(:controller_uri => 'druby://143.238.105.61:11355') do |browser, id|
|
40
|
+
browser.goto("http://www.google.com")
|
41
|
+
browser.text_field(:name, 'q').set("watirgrid")
|
42
|
+
browser.button(:name, "btnI").click
|
48
43
|
end
|
49
44
|
end
|
50
45
|
threads.each {|thread| thread.join}
|
@@ -68,11 +63,12 @@ You may wish to host the controller and providers on different machines in a rea
|
|
68
63
|
-d, --drb-server-port PORT Specify DRb Server port to listen on
|
69
64
|
-h, --ring-server-host HOST Specify Ring Server host to connect to
|
70
65
|
-r, --ring-server-port PORT Specify Ring Server port to broadcast on
|
71
|
-
-
|
66
|
+
-c, --controller-uri URI Specify Controller URI e.g. druby://127.0.0.1:11235 to bypass Ring Server
|
67
|
+
-b, --browser-type TYPE Specify browser type to register {ie|firefox|safari|webdriver}
|
72
68
|
-a, --access-control-list ACLS Specify a comma separated Access Control List
|
73
69
|
-l, --log-level LEVEL Specify log level {DEBUG|INFO|ERROR}
|
74
|
-
--help Show this message
|
70
|
+
--help Show this message
|
75
71
|
|
76
72
|
== Copyright
|
77
73
|
|
78
|
-
Copyright (c) 2009 Tim Koopmans. See LICENSE for details.
|
74
|
+
Copyright (c) 2009-2011 Tim Koopmans. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
gem.email = "tim.koops@gmail.com"
|
10
10
|
gem.homepage = "http://github.com/90kts/watirgrid"
|
11
11
|
gem.authors = ["Tim Koopmans"]
|
12
|
-
gem.version = "1.0.3
|
12
|
+
gem.version = "1.0.3"
|
13
13
|
end
|
14
14
|
rescue LoadError
|
15
15
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
data/bin/provider
CHANGED
@@ -26,7 +26,7 @@ OptionParser.new do |opts|
|
|
26
26
|
options[:ring_server_port] = r
|
27
27
|
end
|
28
28
|
opts.on("-c URI", "--controller-uri", String,
|
29
|
-
"
|
29
|
+
"Specify Controller URI e.g. druby://127.0.0.1:11235 to bypass Ring Server") do |h|
|
30
30
|
options[:controller_uri] = h || nil
|
31
31
|
end
|
32
32
|
opts.on("-b TYPE", "--browser-type", String,
|
data/lib/controller.rb
CHANGED
@@ -65,7 +65,7 @@ class Controller
|
|
65
65
|
|
66
66
|
# obtain DRb Server uri
|
67
67
|
@drb_server_uri = drb_server.uri
|
68
|
-
@log.info("
|
68
|
+
@log.info("Controller started on : #{@drb_server_uri}")
|
69
69
|
|
70
70
|
# start the Ring Server
|
71
71
|
ring_server = Rinda::RingServer.new(tuple_space,
|
@@ -86,7 +86,7 @@ class Controller
|
|
86
86
|
# Stop the controller by shutting down the DRb service
|
87
87
|
def stop
|
88
88
|
DRb.stop_service
|
89
|
-
@log.info("
|
89
|
+
@log.info("Controller stopped on: #{@drb_server_uri}")
|
90
90
|
end
|
91
91
|
|
92
92
|
private
|
data/lib/provider.rb
CHANGED
data/watirgrid.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{watirgrid}
|
8
|
-
s.version = "1.0.3
|
8
|
+
s.version = "1.0.3"
|
9
9
|
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new("
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Tim Koopmans"]
|
12
|
-
s.date = %q{2011-04-
|
12
|
+
s.date = %q{2011-04-06}
|
13
13
|
s.description = %q{WatirGrid allows for distributed testing across a grid network using Watir.}
|
14
14
|
s.email = %q{tim.koops@gmail.com}
|
15
15
|
s.executables = ["controller", "provider"]
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watirgrid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 17
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
9
|
- 3
|
10
|
-
|
11
|
-
version: 1.0.3.pre
|
10
|
+
version: 1.0.3
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- Tim Koopmans
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2011-04-
|
18
|
+
date: 2011-04-06 00:00:00 -07:00
|
20
19
|
default_executable:
|
21
20
|
dependencies: []
|
22
21
|
|
@@ -78,14 +77,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
78
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
78
|
none: false
|
80
79
|
requirements:
|
81
|
-
- - "
|
80
|
+
- - ">="
|
82
81
|
- !ruby/object:Gem::Version
|
83
|
-
hash:
|
82
|
+
hash: 3
|
84
83
|
segments:
|
85
|
-
-
|
86
|
-
|
87
|
-
- 1
|
88
|
-
version: 1.3.1
|
84
|
+
- 0
|
85
|
+
version: "0"
|
89
86
|
requirements: []
|
90
87
|
|
91
88
|
rubyforge_project:
|