watirgrid 0.0.7 → 0.0.8.pre

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,45 +1,44 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "watirgrid"
8
- gem.summary = %Q{WatirGrid: Web Application Testing in Ruby across a grid network.}
9
- gem.description = %Q{WatirGrid allows for distributed testing across a grid network using Watir.}
10
- gem.email = "tim.koops@gmail.com"
11
- gem.homepage = "http://github.com/90kts/watirgrid"
12
- gem.authors = ["Tim Koopmans"]
13
- gem.add_development_dependency "rspec", ">= 1.2.9"
14
- gem.add_dependency "uuid", ">= 2.2.0"
15
- gem.version = "0.0.7"
16
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
- end
18
- rescue LoadError
19
- puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
20
- end
21
-
22
- require 'spec/rake/spectask'
23
- Spec::Rake::SpecTask.new(:spec) do |spec|
24
- spec.libs << 'lib' << 'spec'
25
- spec.spec_files = FileList['spec/**/*_spec.rb']
26
- end
27
-
28
- Spec::Rake::SpecTask.new(:rcov) do |spec|
29
- spec.libs << 'lib' << 'spec'
30
- spec.pattern = 'spec/**/*_spec.rb'
31
- spec.rcov = true
32
- end
33
-
34
- task :spec => :check_dependencies
35
-
36
- task :default => :spec
37
-
38
- require 'rake/rdoctask'
39
- Rake::RDocTask.new do |rdoc|
40
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
41
- rdoc.rdoc_dir = 'rdoc'
42
- rdoc.title = "watirgrid #{version}"
43
- rdoc.rdoc_files.include('README*')
44
- rdoc.rdoc_files.include('lib/**/*.rb')
45
- end
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "watirgrid"
8
+ gem.summary = %Q{WatirGrid: Web Application Testing in Ruby across a grid network.}
9
+ gem.description = %Q{WatirGrid allows for distributed testing across a grid network using Watir.}
10
+ gem.email = "tim.koops@gmail.com"
11
+ gem.homepage = "http://github.com/90kts/watirgrid"
12
+ gem.authors = ["Tim Koopmans"]
13
+ gem.add_development_dependency "rspec", ">= 1.2.9"
14
+ gem.version = "0.0.8.pre"
15
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
16
+ end
17
+ rescue LoadError
18
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
19
+ end
20
+
21
+ require 'spec/rake/spectask'
22
+ Spec::Rake::SpecTask.new(:spec) do |spec|
23
+ spec.libs << 'lib' << 'spec'
24
+ spec.spec_files = FileList['spec/**/*_spec.rb']
25
+ end
26
+
27
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
28
+ spec.libs << 'lib' << 'spec'
29
+ spec.pattern = 'spec/**/*_spec.rb'
30
+ spec.rcov = true
31
+ end
32
+
33
+ task :spec => :check_dependencies
34
+
35
+ task :default => :spec
36
+
37
+ require 'rake/rdoctask'
38
+ Rake::RDocTask.new do |rdoc|
39
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
40
+ rdoc.rdoc_dir = 'rdoc'
41
+ rdoc.title = "watirgrid #{version}"
42
+ rdoc.rdoc_files.include('README*')
43
+ rdoc.rdoc_files.include('lib/**/*.rb')
44
+ end
data/bin/controller CHANGED
@@ -1,60 +1,60 @@
1
- #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require 'controller'
4
- require 'provider'
5
- require 'optparse'
6
-
7
- options = {}
8
- OptionParser.new do |opts|
9
- opts.banner = "Usage: controller [options]"
10
- opts.separator ""
11
- opts.separator "Specific options:"
12
- opts.on("-H HOST", "--drb-server-host", String,
13
- "Specify DRb Server interface to host on") do |H|
14
- options[:drb_server_host] = H || nil
15
- end
16
- opts.on("-d PORT", "--drb-server-port", Integer,
17
- "Specify DRb Server port to listen on") do |d|
18
- options[:drb_server_port] = d
19
- end
20
- opts.on("-h HOST", "--ring-server-host", String,
21
- "Specify Ring Server interface to host on") do |h|
22
- options[:ring_server_host] = h || nil
23
- end
24
- opts.on("-r PORT", "--ring-server-port", Integer,
25
- "Specify Ring Server port to listen on") do |r|
26
- options[:ring_server_port] = r
27
- end
28
- opts.on("-a ACLS", "--access-control-list", Array,
29
- "Specify a comma separated Access Control List") do |a|
30
- options[:acls] = a
31
- end
32
- opts.on("-l LEVEL", "--log-level", String,
33
- "Specify log level {DEBUG|INFO|ERROR}") do |l|
34
- case l
35
- when 'DEBUG'
36
- options[:loglevel] = Logger::DEBUG
37
- when 'INFO'
38
- options[:loglevel] = Logger::INFO
39
- when 'ERROR'
40
- options[:loglevel] = Logger::ERROR
41
- else
42
- options[:loglevel] = Logger::ERROR
43
- end
44
- end
45
- opts.on_tail("-h", "--help", "Show this message") do
46
- puts opts
47
- exit
48
- end
49
- end.parse!
50
-
51
- controller = Controller.new(
52
- :drb_server_host => options[:drb_server_host],
53
- :drb_server_port => options[:drb_server_port] || 11235,
54
- :ring_server_host => options[:ring_server_host],
55
- :ring_server_port => options[:ring_server_port] || 12358,
56
- :acls => options[:acls] || %w{ allow all },
57
- :loglevel => options[:loglevel]
58
- )
59
- controller.start
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'controller'
4
+ require 'provider'
5
+ require 'optparse'
6
+
7
+ options = {}
8
+ OptionParser.new do |opts|
9
+ opts.banner = "Usage: controller [options]"
10
+ opts.separator ""
11
+ opts.separator "Specific options:"
12
+ opts.on("-H HOST", "--drb-server-host", String,
13
+ "Specify DRb Server interface to host on") do |H|
14
+ options[:drb_server_host] = H || nil
15
+ end
16
+ opts.on("-d PORT", "--drb-server-port", Integer,
17
+ "Specify DRb Server port to listen on") do |d|
18
+ options[:drb_server_port] = d
19
+ end
20
+ opts.on("-h HOST", "--ring-server-host", String,
21
+ "Specify Ring Server interface to host on") do |h|
22
+ options[:ring_server_host] = h || nil
23
+ end
24
+ opts.on("-r PORT", "--ring-server-port", Integer,
25
+ "Specify Ring Server port to listen on") do |r|
26
+ options[:ring_server_port] = r
27
+ end
28
+ opts.on("-a ACLS", "--access-control-list", Array,
29
+ "Specify a comma separated Access Control List") do |a|
30
+ options[:acls] = a
31
+ end
32
+ opts.on("-l LEVEL", "--log-level", String,
33
+ "Specify log level {DEBUG|INFO|ERROR}") do |l|
34
+ case l
35
+ when 'DEBUG'
36
+ options[:loglevel] = Logger::DEBUG
37
+ when 'INFO'
38
+ options[:loglevel] = Logger::INFO
39
+ when 'ERROR'
40
+ options[:loglevel] = Logger::ERROR
41
+ else
42
+ options[:loglevel] = Logger::ERROR
43
+ end
44
+ end
45
+ opts.on_tail("-h", "--help", "Show this message") do
46
+ puts opts
47
+ exit
48
+ end
49
+ end.parse!
50
+
51
+ controller = Controller.new(
52
+ :drb_server_host => options[:drb_server_host],
53
+ :drb_server_port => options[:drb_server_port] || 11235,
54
+ :ring_server_host => options[:ring_server_host],
55
+ :ring_server_port => options[:ring_server_port] || 12358,
56
+ :acls => options[:acls] || %w{ allow all },
57
+ :loglevel => options[:loglevel]
58
+ )
59
+ controller.start
60
60
  DRb.thread.join
data/bin/provider CHANGED
@@ -1,64 +1,64 @@
1
- #!/usr/bin/env ruby
2
- require 'rubygems'
3
- require 'controller'
4
- require 'provider'
5
- require 'optparse'
6
-
7
- options = {}
8
- OptionParser.new do |opts|
9
- opts.banner = "Usage: provider [options]"
10
- opts.separator ""
11
- opts.separator "Specific options:"
12
- opts.on("-H HOST", "--drb-server-host", String,
13
- "Specify DRb Server interface to host on") do |H|
14
- options[:drb_server_host] = H || nil
15
- end
16
- opts.on("-d PORT", "--drb-server-port", Integer,
17
- "Specify DRb Server port to listen on") do |d|
18
- options[:drb_server_port] = d
19
- end
20
- opts.on("-h HOST", "--ring-server-host", String,
21
- "Specify Ring Server host to connect to") do |h|
22
- options[:ring_server_host] = h || nil
23
- end
24
- opts.on("-r PORT", "--ring-server-port", Integer,
25
- "Specify Ring Server port to broadcast on") do |r|
26
- options[:ring_server_port] = r
27
- end
28
- opts.on("-b TYPE", "--browser-type", String,
29
- "Specify browser type to register {ie|firefox|safari}") do |b|
30
- options[:browser_type] = b
31
- end
32
- opts.on("-a ACLS", "--access-control-list", Array,
33
- "Specify a comma separated Access Control List") do |a|
34
- options[:acls] = a
35
- end
36
- opts.on("-l LEVEL", "--log-level", String,
37
- "Specify log level {DEBUG|INFO|ERROR}") do |l|
38
- case l
39
- when 'DEBUG'
40
- options[:loglevel] = Logger::DEBUG
41
- when 'INFO'
42
- options[:loglevel] = Logger::INFO
43
- when 'ERROR'
44
- options[:loglevel] = Logger::ERROR
45
- else
46
- options[:loglevel] = Logger::ERROR
47
- end
48
- end
49
- opts.on_tail("-h", "--help", "Show this message") do
50
- puts opts
51
- exit
52
- end
53
- end.parse!
54
-
55
- provider = Provider.new(
56
- :drb_server_host => options[:drb_server_host],
57
- :drb_server_port => options[:drb_server_port] || 11236,
58
- :ring_server_host => options[:ring_server_host],
59
- :ring_server_port => options[:ring_server_port] || 12358,
60
- :browser_type => options[:browser_type] || nil,
61
- :acls => options[:acls] || %w{ allow all },
62
- :loglevel => options[:loglevel])
63
- provider.start
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'controller'
4
+ require 'provider'
5
+ require 'optparse'
6
+
7
+ options = {}
8
+ OptionParser.new do |opts|
9
+ opts.banner = "Usage: provider [options]"
10
+ opts.separator ""
11
+ opts.separator "Specific options:"
12
+ opts.on("-H HOST", "--drb-server-host", String,
13
+ "Specify DRb Server interface to host on") do |H|
14
+ options[:drb_server_host] = H || nil
15
+ end
16
+ opts.on("-d PORT", "--drb-server-port", Integer,
17
+ "Specify DRb Server port to listen on") do |d|
18
+ options[:drb_server_port] = d
19
+ end
20
+ opts.on("-h HOST", "--ring-server-host", String,
21
+ "Specify Ring Server host to connect to") do |h|
22
+ options[:ring_server_host] = h || nil
23
+ end
24
+ opts.on("-r PORT", "--ring-server-port", Integer,
25
+ "Specify Ring Server port to broadcast on") do |r|
26
+ options[:ring_server_port] = r
27
+ end
28
+ opts.on("-b TYPE", "--browser-type", String,
29
+ "Specify browser type to register {ie|firefox|safari}") do |b|
30
+ options[:browser_type] = b
31
+ end
32
+ opts.on("-a ACLS", "--access-control-list", Array,
33
+ "Specify a comma separated Access Control List") do |a|
34
+ options[:acls] = a
35
+ end
36
+ opts.on("-l LEVEL", "--log-level", String,
37
+ "Specify log level {DEBUG|INFO|ERROR}") do |l|
38
+ case l
39
+ when 'DEBUG'
40
+ options[:loglevel] = Logger::DEBUG
41
+ when 'INFO'
42
+ options[:loglevel] = Logger::INFO
43
+ when 'ERROR'
44
+ options[:loglevel] = Logger::ERROR
45
+ else
46
+ options[:loglevel] = Logger::ERROR
47
+ end
48
+ end
49
+ opts.on_tail("-h", "--help", "Show this message") do
50
+ puts opts
51
+ exit
52
+ end
53
+ end.parse!
54
+
55
+ provider = Provider.new(
56
+ :drb_server_host => options[:drb_server_host],
57
+ :drb_server_port => options[:drb_server_port] || 11236,
58
+ :ring_server_host => options[:ring_server_host],
59
+ :ring_server_port => options[:ring_server_port] || 12358,
60
+ :browser_type => options[:browser_type] || nil,
61
+ :acls => options[:acls] || %w{ allow all },
62
+ :loglevel => options[:loglevel])
63
+ provider.start
64
64
  DRb.thread.join
@@ -1,28 +1,28 @@
1
- require 'rubygems'
2
- require '../lib/watirgrid'
3
-
4
- grid = Watir::Grid.new(:ring_server_port => 12358,
5
- :ring_server_host => '192.168.1.102',
6
- :loglevel => Logger::DEBUG)
7
- grid.start(:read_all => true)
8
-
9
- threads = []
10
- grid.browsers.each do |browser|
11
- threads << Thread.new do
12
- @uuid = browser[:uuid]
13
- p @uuid
14
- end
15
- end
16
- threads.each {|thread| thread.join}
17
-
18
- grid.start(:read_all => true, :uuid => @uuid)
19
-
20
- threads = []
21
- grid.browsers.each do |browser|
22
- threads << Thread.new do
23
- @uuid = browser[:uuid]
24
- p @uuid
25
- end
26
- end
27
- threads.each {|thread| thread.join}
28
-
1
+ require 'rubygems'
2
+ require '../lib/watirgrid'
3
+
4
+ grid = Watir::Grid.new(:ring_server_port => 12358,
5
+ :ring_server_host => '192.168.1.102',
6
+ :loglevel => Logger::DEBUG)
7
+ grid.start(:read_all => true)
8
+
9
+ threads = []
10
+ grid.browsers.each do |browser|
11
+ threads << Thread.new do
12
+ @uuid = browser[:uuid]
13
+ p @uuid
14
+ end
15
+ end
16
+ threads.each {|thread| thread.join}
17
+
18
+ grid.start(:read_all => true, :uuid => @uuid)
19
+
20
+ threads = []
21
+ grid.browsers.each do |browser|
22
+ threads << Thread.new do
23
+ @uuid = browser[:uuid]
24
+ p @uuid
25
+ end
26
+ end
27
+ threads.each {|thread| thread.join}
28
+
data/examples/google.rb CHANGED
@@ -1,19 +1,19 @@
1
- require 'rubygems'
2
- require '../lib/watirgrid'
3
-
4
- grid = Watir::Grid.new(:ring_server_port => 12358,
5
- :ring_server_host => '184.73.224.146',
6
- :loglevel => Logger::DEBUG)
7
- grid.start(:read_all => true)
8
-
9
- threads = []
10
- grid.browsers.each do |browser|
11
- threads << Thread.new do
12
- b = browser[:object].new_browser
13
- b.goto("http://google.com.au/")
14
- b.text_field(:name, 'q').set("performance & test automation specialists")
15
- sleep 1
16
- b.button(:name, 'btnI').click
17
- end
18
- end
1
+ require 'rubygems'
2
+ require '../lib/watirgrid'
3
+
4
+ grid = Watir::Grid.new(:ring_server_port => 12358,
5
+ :ring_server_host => '192.168.1.102',
6
+ :loglevel => Logger::DEBUG)
7
+ grid.start(:read_all => true)
8
+
9
+ threads = []
10
+ grid.browsers.each do |browser|
11
+ threads << Thread.new do
12
+ b = browser[:object].new_browser
13
+ b.goto("http://google.com.au/")
14
+ b.text_field(:name, 'q').set("performance & test automation specialists")
15
+ sleep 1
16
+ b.button(:name, 'btnI').click
17
+ end
18
+ end
19
19
  threads.each {|thread| thread.join}
data/examples/info.rb CHANGED
@@ -1,14 +1,14 @@
1
- require 'rubygems'
2
- require '../lib/watirgrid'
3
-
4
- grid = Watir::Grid.new(:ring_server_port => 12358,
5
- :ring_server_host => '192.168.1.102', :loglevel => Logger::DEBUG)
6
- grid.start(:read_all => true)
7
-
8
- threads = []
9
- grid.browsers.each do |browser|
10
- threads << Thread.new do
11
- p browser
12
- end
13
- end
1
+ require 'rubygems'
2
+ require '../lib/watirgrid'
3
+
4
+ grid = Watir::Grid.new(:ring_server_port => 12358,
5
+ :ring_server_host => '192.168.1.102', :loglevel => Logger::DEBUG)
6
+ grid.start(:read_all => true)
7
+
8
+ threads = []
9
+ grid.browsers.each do |browser|
10
+ threads << Thread.new do
11
+ p browser
12
+ end
13
+ end
14
14
  threads.each {|thread| thread.join}
@@ -1,14 +1,14 @@
1
- require 'rubygems'
2
- require '../lib/watirgrid'
3
-
4
- grid = Watir::Grid.new(:ring_server_port => 12358,
5
- :ring_server_host => '192.168.1.102', :loglevel => Logger::DEBUG)
6
- grid.start(:read_all => true)
7
-
8
- threads = []
9
- grid.browsers.each do |browser|
10
- threads << Thread.new do
11
- p browser
12
- end
13
- end
1
+ require 'rubygems'
2
+ require '../lib/watirgrid'
3
+
4
+ grid = Watir::Grid.new(:ring_server_port => 12358,
5
+ :ring_server_host => '192.168.1.102', :loglevel => Logger::DEBUG)
6
+ grid.start(:read_all => true)
7
+
8
+ threads = []
9
+ grid.browsers.each do |browser|
10
+ threads << Thread.new do
11
+ p browser
12
+ end
13
+ end
14
14
  threads.each {|thread| thread.join}
data/examples/simple.rb CHANGED
@@ -1,19 +1,19 @@
1
- require 'rubygems'
2
- require '../lib/watirgrid'
3
-
4
- grid = Watir::Grid.new(:ring_server_port => 12358,
5
- :ring_server_host => '192.168.1.102',
6
- :loglevel => Logger::DEBUG)
7
- grid.start(:read_all => true)
8
-
9
- threads = []
10
- grid.browsers.each do |browser|
11
- threads << Thread.new do
12
- b = browser[:object].new_browser
13
- b.goto("http://192.168.1.102:4567/")
14
- b.text_field(:name, 'username').set("I am robot")
15
- sleep 1
16
- b.button(:id, 'go').click
17
- end
18
- end
1
+ require 'rubygems'
2
+ require '../lib/watirgrid'
3
+
4
+ grid = Watir::Grid.new(:ring_server_port => 12358,
5
+ :ring_server_host => '192.168.1.102',
6
+ :loglevel => Logger::DEBUG)
7
+ grid.start(:read_all => true)
8
+
9
+ threads = []
10
+ grid.browsers.each do |browser|
11
+ threads << Thread.new do
12
+ b = browser[:object].new_browser
13
+ b.goto("http://192.168.1.102:4567/")
14
+ b.text_field(:name, 'username').set("I am robot")
15
+ sleep 1
16
+ b.button(:id, 'go').click
17
+ end
18
+ end
19
19
  threads.each {|thread| thread.join}