Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Runtime debugging tools needed?!!

Reply
Thread Tools

Runtime debugging tools needed?!!

 
 
sunkids@gmail.com
Guest
Posts: n/a
 
      06-05-2006
Hi All:
Thanks everyone so activating in ruby community. I am newbi to
ruby. This is all because WATIR, a web testing tool.
I know some people post before saying there is no need for ruby
have a runtime debugging tool, because ruby is simple enough or so easy

to find where the error is, which I totally agree with. However, my
company deside to try WATIR/Ruby in our product functional testing(Web
application testing), and ask me to give a full demo to the automation
board.
The challenges of swithing from our existing automation tool to
Ruby/WATIR tool are fast development and less maintenance effort.
First, I am strongly believe fast development can be achieved by strait

forward coding and pure OO language advantage. Second, less maintenance

effort has to be achieved with propret tool. However, because of our
large size of web application, our testing framework is also very large

and complex, and it is still grow fast. In order to maintain the
testing framework release to release we are at boundary equal effort
between manual testing and recalibrate existing automation. That's also

why we can looking for better tools.
The current WATIR/Ruby debugging flow is all based on exception,
fix and rerun the program. However, with frequent source code
change(our product), we have to face the ugly truth, our automation
scripts have to be constantly change. Even worse, our automation
scripts can't be just simply rerun, due to all the testing senario data

is half way send to server. We have to restore the database at server
and rerun the script, which is VERY TIME CONSUMING, maybe more than our

code creation.
Which makes me thinking about a tool, that will allow me running
Ruby/WATIR code under it, show me the exception, pause the code and
resumed the code after I saved my fix to the code. If this is doable
(which I believe, because ruby is interpreted language), that will be
ideal solution for our maintaining such large testing framework.
Thanks in advance for all your commens.

Regards,
Jonathan Ni

 
Reply With Quote
 
 
 
 
aidy
Guest
Posts: n/a
 
      06-05-2006
Hi,

I am using Watir and Ruby myself. Having tried emacs,vi etc - I went
back to Eclipse.

There is a Ruby plugin for Eclipse here:
http://sourceforge.net/projects/rubyeclipse

Just extract your zip into the *Eclipse* folder.

This article gives you some much needed info:
http://www.ibm.com/developerworks/op...os-rubyeclipse

Debug info can be read over a port, and you should be able to de-bug in
the IDE just like Java.

The above article, explains it all, but I have not got it to work. The
way I see it, if there is an article on it on an IBM site, written by a
guy from ThoughtWorks - it's gotta work.

Aidy

p.s. I would be interested in knowing how you are organising you
test-classes. I have created a little framework, but need some
feedback.

 
Reply With Quote
 
 
 
 
Andrew McDonagh
Guest
Posts: n/a
 
      06-05-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi All:
> Thanks everyone so activating in ruby community. I am newbi to
> ruby. This is all because WATIR, a web testing tool.
> I know some people post before saying there is no need for ruby
> have a runtime debugging tool, because ruby is simple enough or so easy
>
> to find where the error is, which I totally agree with. However, my
> company deside to try WATIR/Ruby in our product functional testing(Web
> application testing), and ask me to give a full demo to the automation
> board.
> The challenges of swithing from our existing automation tool to
> Ruby/WATIR tool are fast development and less maintenance effort.
> First, I am strongly believe fast development can be achieved by strait
>
> forward coding and pure OO language advantage. Second, less maintenance
>
> effort has to be achieved with propret tool. However, because of our
> large size of web application, our testing framework is also very large
>
> and complex, and it is still grow fast. In order to maintain the
> testing framework release to release we are at boundary equal effort
> between manual testing and recalibrate existing automation. That's also
>
> why we can looking for better tools.
> The current WATIR/Ruby debugging flow is all based on exception,
> fix and rerun the program. However, with frequent source code
> change(our product), we have to face the ugly truth, our automation
> scripts have to be constantly change. Even worse, our automation
> scripts can't be just simply rerun, due to all the testing senario data
>
> is half way send to server. We have to restore the database at server
> and rerun the script, which is VERY TIME CONSUMING, maybe more than our
>
> code creation.
> Which makes me thinking about a tool, that will allow me running
> Ruby/WATIR code under it, show me the exception, pause the code and
> resumed the code after I saved my fix to the code. If this is doable
> (which I believe, because ruby is interpreted language), that will be
> ideal solution for our maintaining such large testing framework.
> Thanks in advance for all your commens.
>
> Regards,
> Jonathan Ni
>


ok, so there's a few different things here that under lay your desire
for a debugger - notably that Watir tests are difficult to write/test
because they are working the system end-to-end - i.e. Web ui to DB.

Automated tests are an investment - they take time to make and need
maintaining just like the application code they exercise. However, this
investment is normally a factor lower than the time and cost of
repeatedly running manual tests.

Once a test is automated it can and should, be run as manay times as
possible - by everyone on the team including the build system if you
have one.

However, as you are seeing, your tests need to Arrange some form of
initial state, do the desired Action to test and then Assert the results.

I.e. the 3 A's

Arrange
Action
Assert

However, like I said, your tests are currently end-to-end. Which is
often not needed nor desired.

A more reliable, flexible, less maintenance approach is to partition the
tests so that very few actually go end-to-end.

For example, say we have a login screen, which accepts the users name
and password, which the web application then uses to authenticate
against an LDAP service.

Now, we could setup the test environment and the test itself so that we
use a real users name and password and the system really does connect to
the LDAP.

However, then the user name and password needs updating when ever they
change (because company policy says all passwords expire every month, or
the user leaves the company, etc).

A better, flexible, less maintenance approach would be to substitute the
LDAP look up with a fake LDAP implementation.

This way, we can create acceptance tests that test all types of
conditions without the application ever going to a real LDAP server and
the test never need updating because of a data value change, because the
values never need changing - they are fake values.

 
Reply With Quote
 
aidy
Guest
Posts: n/a
 
      06-07-2006
Hi,

Apparently the RDT debugger (Eclipse) will not work with ruby 1.8.4,
but will with ruby 1.8.2.

Aidy

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui C++ 0 04-27-2009 12:51 PM
3 ESSENTIAL TOOLS FOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLSFOR STARTING AND MAINTAINING...3 ESSENTIAL TOOLS FOR STARTING ANDMAINTAINING... Oanh Bui Python 0 04-27-2009 12:46 PM
Runtime debugging tools needed? sunkids@gmail.com Ruby 0 06-05-2006 01:26 PM
Article : Security Tools Part -- 2 (.Net FrameWork Tools Series) Namratha Shah \(Nasha\) ASP .Net 0 11-23-2004 04:01 PM



Advertisments