Hoe to Execute another scripts

4 views
Skip to first unread message

Vikas Tulashyam

unread,
Mar 12, 2009, 8:02:08 AM3/12/09
to Watir General
Hi Guys,
Please provide me the solution for the following problems

1. I want to execute ruby scripts from a single file, like I want to
create a Test suite and want to call each test case which is a
separate ruby file, so how to call scripts.

2. I am creating some common utilities for my project , so How I can
call them in my projects, let say I have created a Module
'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
this scripts by providing the exact path of the ruby script and I can
call this within that folder only.



Thanks in advance

Vikas

Al Snow

unread,
Mar 12, 2009, 9:21:07 AM3/12/09
to watir-...@googlegroups.com
For #1, check out the Watir unit tests. You can get them at Github.

Thanks,
Al Snow
Agile Software Automation Developer
Linkedin: http://www.linkedin.com/in/alsnow
Google Talk: jasnow1
Twitter: jasnow


> Date: Thu, 12 Mar 2009 05:02:08 -0700
> Subject: [wtr-general] Hoe to Execute another scripts
> From: vtula...@gmail.com
> To: watir-...@googlegroups.com

JArkelen

unread,
Mar 12, 2009, 9:35:08 AM3/12/09
to Watir General
Use Rake for executing multiple test scripts.

On Mar 12, 2:21 pm, Al Snow <jas...@hotmail.com> wrote:
> For #1, check out the Watir unit tests. You can get them at Github.
>
> Thanks,
> Al Snow
> Agile Software Automation Developer
> Linkedin:http://www.linkedin.com/in/alsnow
> Google Talk: jasnow1
> Twitter: jasnow
>
>
>
> > Date: Thu, 12 Mar 2009 05:02:08 -0700
> > Subject: [wtr-general] Hoe to Execute another scripts
> > From: vtulash...@gmail.com
> > To: watir-...@googlegroups.com
>
> > Hi Guys,
> > Please provide me the solution for the following problems
>
> > 1.  I want to execute ruby scripts from a single file, like  I want to
> > create a Test suite and want to call each test case which is a
> > separate ruby file, so how to call scripts.
>
> > 2. I am creating some common utilities for my project , so How I can
> > call them in my projects, let say I have created a Module
> > 'CommonUtils' in Directory-file - C://Test/Common.rb . So can I call
> > this scripts by providing the exact path of the ruby script and I can
> > call this within that folder only.
>
> > Thanks in advance
>
> > Vikas
>
> _________________________________________________________________
> Express your personality in color! Preview and select themes for Hotmail®.http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=TX...

marekj

unread,
Mar 12, 2009, 10:48:33 AM3/12/09
to watir-...@googlegroups.com
sorry, but Hoe, http://seattlerb.rubyforge.org/hoe/
would not be the best way to execute scripts
Use Rake, SpecTask or good old TestUnit runner.

marekj

Watirloo: Semantic Page Objects in UseCases
Human Readable Machine Executable Acceptance Testing
http://github.com/marekj/watirloo/

Vikas Tulashyam

unread,
Mar 13, 2009, 4:25:16 AM3/13/09
to Watir General
Hey Guys,
Thanks for the time. I tried using Rake and Hoe but i couldn't find
the exact way to create packages. Please help me with some examples if
you guys can.

Thanks in advance


On Mar 12, 7:48 pm, marekj <marekj....@gmail.com> wrote:
> sorry, but Hoe,http://seattlerb.rubyforge.org/hoe/
> would not be the best way to execute scripts
> Use Rake, SpecTask or good old TestUnit runner.
>
> marekj
>
> Watirloo: Semantic Page Objects in UseCases
> Human Readable Machine Executable Acceptance Testinghttp://github.com/marekj/watirloo/

clai2x

unread,
Mar 27, 2009, 3:28:14 AM3/27/09
to Watir General
im having the same problem too...looking forward to see some helpful
samples from you guys...
thanks in advance

Tiffany Fodor

unread,
Mar 27, 2009, 11:14:58 AM3/27/09
to Watir General
Hi!

In response to your first question, please see a similar thread here:

http://groups.google.com/group/watir-general/browse_thread/thread/139afd34fcc37c9b/a9524063b89f086c?lnk=gst&q=framework#a9524063b89f086c

If your common utilities are contained in the one ruby file you
mentioned, you can make them available by requiring the ruby file:

require 'CommonUtils'

If the CommonUtils.rb file does not exist in the working directory,
you'll need to include a relative path.

Then you can call the methods you have in CommonUtils from your
framework.

Hope this helps!

-Tiffany
Reply all
Reply to author
Forward
0 new messages