Michael,
"Imagine trying to create an automated spelling and grammar
checker without really *learning* English."
--> Actually, No... that is a programmers job... I am
not making the spelling checker... I am checking that the spell checker catches
all the mis-spellings on the page...
... I really don't concern myself with how it works... only
THAT the spell checker works...
In a similar vein... I am looking to create testing tools
that checks a feature on a page... click here... look for text there... fill in
that box... move this widget to an x/y spot on the page... etc...
I am not so concerned with what the functions do or how
they do them... my focus ... is that when I need to click a submit button I
cut and past
$ie.button(:name, "submit").click
when I want to close the testing page, I source in and call
a function I found the other day...
def close_it
# close all open ie
windows
all_closed = 'unknown'
while (all_closed != 'yes')
begin
#use a regexp that will match any title so all ie windows are forced closed
header = Regexp.new(//)
@ie = IE.attach(:title, header)
@ie.close
# catch the exception raised when there's now window to attach to.
rescue NoMatchingWindowFoundException
all_closed = 'yes'
end
end
all_closed = 'unknown'
while (all_closed != 'yes')
begin
#use a regexp that will match any title so all ie windows are forced closed
header = Regexp.new(//)
@ie = IE.attach(:title, header)
@ie.close
# catch the exception raised when there's now window to attach to.
rescue NoMatchingWindowFoundException
all_closed = 'yes'
end
end
end
All I really want to do is use these "helper files" or
examples to cut and paste into a script page... so when I want to test for a
feature... I cut and paste in some specific script to do the task... As there
does not seem to be a prebuilt list of them... I am finding I have to build them
to get the job done... What I think I was looking for is that it would
be nice if these types of files were already gathered up in a place
already...
Just a list of these helper files cut and pasted in the
right order should get the work done...
Like my Honda Element -- an internal combustion engine
-- I use in the morning to get to work... I really don't want to worry too much
about HOW it functions ... just THAT it
functions...
Thom
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michael Bolton
Sent: Thursday, February 09, 2006 10:32 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Are there any References to Ruby/WatirwrittenbyTesters?
> I purchased the Dave Thomas Book
-- Programming Ruby -- and it is a good reference but unfortunately... your
description is very apt... (I laughed when I read) it shows description of
the street signs ... (I was not able to sum it up like that but I had similar
feelings)... I have a brief programming background and relatively understand the
OO reference but don't have the time to really *learn*
Ruby.
If that's really
the case, you should reconsider using test automation in general and WATIR in
particular. Imagine trying to create an automated spelling and grammar
checker without really *learning* English. (Yes, the metaphor is a little
mixed, but useful, I hope.) If you want automation to assist the testing
effort effectively, you'll need to meet it on its own terms, and that means
recognizing that automating tests is a software development project. See
below for some things that have helped.
> I
keep looking for easy answers / prebuilt scripts or other things that will make
my Watir QA tasks easier to complete. I have not found them yet and keep
plugging away at my Watir scripts. Some people here gave me some feed back on a
script I wrote the other day and some of the ideas helped in planning future
scripts... Although, I guess I just did not get some of the modifications
suggested.
Questioning, rapid
learning, and communicating problems effectively are important testing
skills. Learning a programming language thoroughly will serve you well as
a tester. Although you'll make mistakes--lots of them--,the
process will give you insight into the kinds of mistakes that programmers
make, which is an important beneficial side
effect.
> My focus is on making the
scripts as readable as possible, making the scripts as easy to pick up six
months from now and just pick up and go with them.
That's /great/. and an
important first step. Would that all programmers were always so
pragmatic and focused on the future! It's easy, apparently, for programmers to forget
that the program is only partially written for the machine; it's also written
for the benefit of the poor sucker that has to maintain
it.
> What
I really want to do is test, not write scripts or have to remember what the
script does.
I understand that, but if
you want to use automation to assist you in testing, you can't really have one
without the other. Again, to stretch a metaphor, it's like wanting to be a
film critic without reading other film criticism or taking
notes.
> I
agree... Watir / Ruby, good... process, good... this e-mail
resource, good... learning curve, steep... the resource I could use is a
repository of examples geared more to a QA tester like me... perhaps I will have
to start to make a website for it...
This would be a great
step. You might also be interested in Brian Marick's forthcoming book,
Scripting for Testers. Here are the things that helped for
me:
- See if you can find local
partners, either in your shop or in your community, and pair with them.
That was the fastest mode of learning for
me.
- Reading over the narrative
in Programming Ruby can help, but I've got a lot of value out of reading over
the class documentation for a particular class each day, in priority of
usefulness for that class (so I started with String, Fixnum).
- Relentless
practice, especially by trying the class methods in IRB, has helped a
lot.
- Learning TDD--writing a
test, writing just enough code to pass it, wrestling with the confusion,
sorting it out, getting a success--has helped.
- Why's Poignant Guide to
Ruby (available online) appears to be the product of someone who dallied a
little too much with the hallucinogens at some point, but it has
helped.
- writing tiny useful tools,
exclusive of Watir, has helped a lot. The WOW! factor of accomplishing
some useful little task, like searching a file for some text, or reformatting an
error log to filter out the distractions, is
unmatched.
- learning regular
expressions (partly through reading Mastering Regular Expressions, by Friedl)
has helped a lot.
- reading the forums (this
one and the Ruby support forums) and participating in them, has
helped.
Finally, it's my
intention to help with the Watir documentation, both internal and external (and
I'm on the paved road to Hell, of course). If you have specific questions
about something that's unclear or baffling to you, that will help to focus my
efforts.
---Michael
B.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Carvalho
Sent: Thursday, February 09, 2006 12:54 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Are there any References to Ruby/Watir written byTesters?
I have been evaluating Ruby and Watir for about a week now and I think it will do what we want it to. Not completely sure yet -- there are still some features to check out, but it's looking good.
One thing that I have noticed is that it has been a struggle for me to do what I want with Ruby and Watir. That's because all the references are geared towards programmers and not testers. The Ruby Cheat Sheet is _almost_ close to being an exception. The only reference book I know is called "Programming Ruby, The Pragmatic Programmer's Guide"... *not* something like "Testing with Ruby, The Pragmatic Tester's Guide."
You see, I know what I want to test, but the documentation is not structured in such a way as to help me accomplish that. It's kind of like wanting to drive to a different city and all I have for reference is a book with a description of all the road signs. So, if I didn't already know what direction to head in and the general rules of the road, the documentation alone certainly wouldn't help me get there.
If I didn't have any prior programming experience and some familiarity with OO design, I'm pretty sure that I would have given up on evaluating Ruby & Watir after the first day. I'm persistent, if nothing else, and sometimes it pays off. Actually, if it weren't for this mailing list, I'm pretty sure that I wouldn't have gotten as far as I have. (Thank you all for your time and help, by the way.) The technical API reference is just about next to useless for me and I may as well be reading an Auto Mechanic's Guide in Esperanto.
Quoting from the "Forward" of the "Pragmatic Programmer's Guide", "Ruby is designed to make programming not only easy, but also fun. It allows you to concentrate on the creative side of programming, with less stress." Hmm, ya, that's nice. I don't really care about the creative side of programming. I'm pretty sure that I'm being paid to be a creative *tester*, and not a creative programmer. Does Ruby/Watir help me do that? No, not really. I still haven't figured out how to structure a decent test case in Watir, let alone script it.
I believe that there currently is a big gap between the users of Ruby & Watir and the rest of the Tester community who could probably be making use of it. The Ruby and Watir languages just aren't translated into Tester-speak.
Does anyone know of any efforts, either planned or in-progress, to address this gap? If so, I would be very interested in participating in the review of the documentation. Heck, if I had the time and a lot more experience with Ruby & Watir, I'd write it myself!
Please don't take this as a slight against Watir. I think that Watir is a tremendously important framework for Ruby, and without it I *know* that I wouldn't be evaluating Ruby right now. (Excellent job on the part of the developers and contributors who continue to improve and expand the framework. Please keep up the good work.) I just think that it would likely be more popular if the documentation was less programmer-centric. I know it would help me be more productive.
Thoughts?
Paul.
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general