Re: [Wtr-general] Executing all scripts at a time

2007-03-02 Thread Naga Harish Kanegolla
Hi, Its working, The problem is I gave $ie=Watir::IE.new in every file, so that 
is the reason i am getting all the files.

Now its working with both require and load, 

Thank you,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19473#19473
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Executing all scripts at a time

2007-03-02 Thread Jason He
I use load method, such as,

Load 'test1.rb'
Load 'test2.rb'
Load 'test3.rb', etc

These test cases could run one after one and there is only one window brought 
up, although the running sequence is not according to the line sequence written 
in the script.

One thing maybe need to pay attention to is that, use global variable $ie to 
create the IE.new instance and use this variable in all test cases, rather than 
use a local variable to create that for each test case.

Regards,
Jason

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Naga Harish 
Kanegolla
Sent: 2007年3月2日 14:40
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Executing all scripts at a time

Hi,
 I am able to run all the tests by using 
require 'test1.rb'
require 'test2.rb'
require 'test3.rb'  etc.,

but when i start the test it is opening 3 windows if there are 3 tests to run, 
i have nearly 15 tests then it opens 15 windows at a time and the test is 
running only in the last window. So  How to solve this problem??
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19466#19466
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Executing all scripts at a time

2007-03-01 Thread Naga Harish Kanegolla
Hi,
 I am able to run all the tests by using 
require 'test1.rb'
require 'test2.rb'
require 'test3.rb'  etc.,

but when i start the test it is opening 3 windows if there are 3 tests to run, 
i have nearly 15 tests then it opens 15 windows at a time and the test is 
running only in the last window. So  How to solve this problem??
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19466#19466
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Executing all scripts at a time

2007-02-23 Thread Željko Filipin

On 2/23/07, Naga Harish Kanegolla <[EMAIL PROTECTED]> wrote:


Is there a way to execute all the scripts at a time?



If you mean sequentially, you can do it like this.

If you have files called test1.rb and test1.rb, make file all_tests.rb in
folder where those files are located and put this in it

require "test1.rb"
require "test2.rb"

If names of your files change a lot, or if you add or delete your files
frequently, try this.

Open command prompt, navigate to folder with you tests, open irb and try
this code, then make script out of it.

irb> tests = Dir["test*.rb"] # test*.rb will exclude all_tests.rb
=> ["test1.rb", "test2.rb"]

irb> tests.each {|test| puts test} # this is just a test, to see what you
have in you array, you can skip it
test1.rb
test2.rb

irb> tests.each {|test| require test} # this will execute all files in
folder

For more information, see class Dir (
http://dev.rubycentral.com/ref/ref_c_dir.html) and watir unit tests (I
modified code from all_tests.rb )
--
Zeljko Filipin
zeljkofilipin.com
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] Executing all scripts at a time

2007-02-22 Thread Naga Harish Kanegolla
Hi all,
  I have all the test cases files in a folder called watir in the test 
directory in my application.
Right now i am executing these scripts one by one. Is there a way to execute 
all the scripts at a time??  If so please help me the code..
Thanks and Regards,
Harish
-
Posted via Jive Forums
http://forums.openqa.org/thread.jspa?threadID=6664&messageID=19113#19113
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general