Marc,
I downloaded WebTest from the WebTest Canoo site about 2 months ago. I'm
not sure
how to get it to divulge what version it is. I did check the version on the
htmlunit jar,
and that is 1.14. I run on a Mac, and when the test finishes it says:
/Applications/WebTest/webtest.xml:358: 1 of 1 webtests have failed (0
successful)!
Perhaps that 358 is what you're after. No version number appears in the web
report.
If this is not the version number you're talking about, I can look wherever
and let you
know. Just lemme know how to extract the right number.
The public website is www.bebo.com. All I'm trying to do is get this thing
to register
a new user. The WebTest script, which is very simple, looks like this:
<?xml version="1.0"?>
<!DOCTYPE project SYSTEM "../dtd/Project.dtd">
<project name="demo.beboWebTest" default="test">
<target name="test">
<webtest name="Check that Bebo registration works.">
<invoke url="http://www.bebo.com/InviteJoin.jsp?Member=N"
description="Go to Bebo Sign Up"/>
<setInputField name="FirstName" value="Otto"/>
<setInputField name="LastName" value="Preminger"/>
<setRadioButton name="GenderCd" value="M"/>
<setSelectField name="BirthDay" value="17"/>
<setSelectField name="BirthMonth" value="10"/>
<setSelectField name="BirthYear" value="1930"/>
<setInputField name="Email" value="[EMAIL PROTECTED]
"/>
<setInputField name="Password" value="yourpassword"/>
<clickButton name="xxx"/>
</webtest>
</target>
</project>
So, if your email account is [EMAIL PROTECTED], use [EMAIL PROTECTED],
and your password. What number you use in there doesn't matter ... it's
just to
fool the site into believing that you're unique. The xxx submit button is a
funky
bit of nonsense one of the engineers dropped in to get around some nasty
problem.
The Save (Done!) button actually displayed is outside of any form and for
that
reason, I think, cannot be seen.
If you view the source for this inviteJoin page you will see that it has
been Ajaxed
with mootools in the header. That's where the error is coming from. I
noticed in
the archive that there have been issues around Ajax.
You will not be able to get around the CAPTSHA field. We have an internal
way
of doing that. If the submit was rejected just for that reason, I would
regard it as
a success. As it is, we get this error that GarbageCollect is an undefined
reference. Looking at the mootools http provided in the error report, I
find that
there is indeed a reference to GarbageCollect. Knowing nothing about
mootools
myself, I do not know why this should be undefined. Perhaps we should be
pulling in something we're not. I know that the library is supposed to DO
garbage
collection, and I wonder if this is perhaps not happening as it should.
I would love to use WebTest for all our testing here at Bebo, and integrate
it
with our build process. But unless I can get the tool just to register a
new
user, and perhaps get it to accept someone as a friend, the thing will be
stillborn
and I'll have to look elsewhere. I want to write a Groovy extension, and in
fact
I've already read much of Groovy In Action. Great book. I'm learning, but
at this
point I'm still desperate to acquire as much technique as possible. I'm not
a Java
person, but rather a former Perl expert who sees that the Perl tools are
rapidly
aging (and I've given up thinking there will ever be a Perl 6).
Unfortunately, I missed
the presentation you guys did in San Francisco last year .. I was at that
time not
yet working for Bebo. I've ordered additional books, but any suggestions
you may
have along the lines of learning this stuff more quickly would be greatly
appreciated.
One thing that, I think, would help a lot is more examples of WebTest
scripts written
by people who have a lot of experience with it. A WebTest cookbook of some
sort
would be awesome.
Thanks in advance .. and lemme know about getting the WebTest version.
Ken Hopf
Bebo QA
On 3/4/08, Marc Guillemot <[EMAIL PROTECTED]> wrote:
>
> As you've checked that no js error occurs in "real" browser, this seems
> to be an issue with WebTest JS support.
> WebTest JS support (in fact HtmlUnit's one) gets continuously better but
> is still not 100% as good as it should be.
>
> 2 questions:
> - which WebTest version do you use?
> - if this is the latest one, do you have a publicly available website
> where the problem can be reproduced? This would allow to understand and
> fix it.
>
> Cheers,
> Marc.
> --
> Blog: http://mguillem.wordpress.com
>
>
> Ken Hopf wrote:
> > Hi,
> >
> > I'm new to WebTest, so perhaps this is just a silly question on my
> > part. I'm running my first WebTest and everything is humming along
> nicely,
> > until I try to click a final submit button, at which point I get the
> > following error:
> >
> > javascript errorReferenceError: "CollectGarbage" is not defined.
> > (http://s.bebo.com/script/mootools.v1.11.js#3(eval)#1<http://s.bebo.com/script/mootools.v1.11.js#3%28eval%29%231>
> )
> >
> > This mootools thing is an Ajax library we use here at Bebo. Now, when
> > we run the page interactively, there's no visible problem. But, it
> seems
> > to me that, despite what engineering tells me, this particular error is
> > not the fault of WebTest but rather of the ajax library (which
> unfortunately
> > is compressed).
> >
> > I thought that perhaps a WebTest expert might have some insight about
> > the issue ... eg, whether this really is a problem with WebTest and,
> > whether it is not, any ideas about dealing with it??? For instance,
> > does it make sense to anyone that this thing might work fine
> interactively,
> > but fail when invoked by WebTest ?? If it is really a problem in the
> > target application, is there any way to suppress the error aside from
> > changing the source code ??
> >
> > Thanks in advance,
> > Ken Hopf
>
>
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>