Small update --
Selenium and MooTools apparently don't mix well. Dirk, could you take
a look at this thread and tell me if me makes any sense to you?
http://forum.mootools.net/viewtopic.php?id=1639
On the positive side, if we were able to figure out a way to make
Selenium and Moo work together, it would be a GREAT way to do web unit
tests. It is **really** slick. Here's a demo MOV that shows how to
"record" unit tests. And although the movie doesn't show it, you can
export these as JUnit tests.
http://www.testearly.com/resources/selenium-ant/full-functional_viewlet_swf.html
In the meantime, I've realized why some of our web unit tests don't
work: some of the functions can only be accessed by JavaScript. I
discovered this initially after removing the MooTools JS file during
Selenium troubleshooting.
For example, if you turn off JavaScript and navigate to the Login.jsp
page, if you click on the "Register New User" tab, you'll find that it
doesn't do anything. This is exactly what happense with JWebunit now,
because we don't package Rhino with the web testing tools (yet). It
can't follow the JS link that activates the registration tab. Even
worse, if I try to access /templates/default/ProfileTab directly, I
get the dreaded NPE.
So -- and I want to be as delicate as possible here -- I have a few
questions.
1. How did we get to a point where the web tier became totally
untestable?
2. Did we ever make a decision to require JavaScript to do even
minimal things like registering users?
3. How should we fix web tier testing? In the short term, we can't
even "cheat" and access the registration page directly.
4. Do we care enough to delay 1.6.0? I do, but perhaps I am the only
one.
I am a little upset about this, frankly.
Andrew
On Nov 26, 2007, at 9:45 PM, Andrew Jaquith wrote:
All -- got Selenium running in an automated way via Ant. Works just
dandy. Checking to see how much work it will take to port everything
in one shot from JWebunit to Selenium. Because it can run with JUnit
like Selenium, it shouldn't be too hard -- change some classes and
methods, etc.
While I'm at it, I'm also correcting as many of the JWebunit tests
as I can... more news later.
Andrew
On Nov 26, 2007, at 5:58 PM, Juan Pablo Santos RodrÃguez wrote:
Hi all,
I've been tinkering with webtests awhile from now. The thing is,
once you
manage to make them (JWebUnit) run, via Eclipse or Ant, you'll see
about 60%
of them will fail because they make assertions against unlocalized
text (aka
2.4.x template). This is the biggest issue with them, IMHO. Also,
I've seen
that JWebUnit + JUnit 3.8.x has some difficulties parsing mootools
library
(JUnit 4.3 seems to be ok). Regarding the fact of launching
webtests via Ant
script: I haven't been able to look at it, but Andrew's commit at
2.5.158should help get them running.
I've began to translate web tests to JMeter, but just now there is
only a
simple Login&Logout web-test. I'll gladly translate them gradually
but -and
it's a very big but-, for the next 3 weeks I'm not going to be able
to work
too much on them (sorry for the screamings there on Finland, :-s),
ie: today
I've arrived home at 22.30 from work, and it seems it's not going
to change
in the following weeks, so the time I can put into it is mostly
dawn /
weekends (for several reasons, 5 out 10 people in my project
switched job
with deadline 3 weeks ahead.. urg). I haven't look into Selenium very
deeply, but if anyone want's to, it can be another option, right
now there
are only 2 out of 16 webtests translated.
Besides of that, I found that JMeter isn't exactly intuitive at
first but,
once you get it, it's very straightforward. If someone is
interested, this
pdf<http://ecmarchitect.com/wp-images/Load_testing_Documentum_WDK/Load_testing_Documentum_WDK.pdf
>it's
a very good starting point on this tool. JWebUnit tests were also
making report files at tests/reports, and they've been for me the
place to
look at when something were wrong with them.
Finally, on 2.6.0: I'll give a +1 on that. Janne, Dirk & all:
you've put a
huge amount of work on that to happen. I'd like to see David's Au
patch on
FCK and ShortUrlConstructor but, right now, I feel I do speak too
much and
commit not so much (and I'd really like to have the time to make it
the
opposite), so it's more a wish than show-stopper :-)
Cheers,
JP
2007/11/26, Craig L Russell <[EMAIL PROTECTED]>:
Hi Murray,
Distributions of Apache projects must follow this guidance: http://
people.apache.org/~cliffs/3party.html
JUnit uses the Common Public License which is an Apache Category B
license, suitable for distribution by an Apache project as a binary.
If an Apache project uses LGPL libraries, it must not distribute
them. And although it's not an absolute rule, a project that uses
LGPL won't graduate from incubation.
Craig
On Nov 26, 2007, at 12:57 PM, Murray Altheim wrote:
Janne Jalkanen wrote:
[...]
The question is: who can commit time to fix our web unit tests
using whatever they fancy, if we consider that to be the only
blocking factor for 2.6 release? If the answer involves any of
the words "nobody", "christmas", or "holiday", I'm going to a)
scream, and b) release. May be sloppy, but really - our webtests
are in a really, really awful shape.
Janne,
I suppose one question is permitted from the ignorant: I realize
Apache
wants everything to be Apache-licensed, but LGPL is hardly a
problem
license. Is there a *hard* requirement that everything released as
part
of an Apache software project be *all* Apache-licensed? I.e., is it
possible we could continue to use JUnit? It's what we all know
and if
we were able to put any time into fixing unit tests I'd personally
rather invest that time into fixing tests than learning Yet Another
Software Package. Another alternative (at least for the interim) is
that
we continue to use JUnit but not include those files in the Apache
distribution. If that's possible it would give us a window at
least.
Murray
......................................................................
.....
Murray Altheim <murray07 at altheim.com>
=== = =
http://www.altheim.com/murray/
= = ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk
= = = =
Boundless wind and moon - the eye within eyes,
Inexhaustible heaven and earth - the light beyond light,
The willow dark, the flower bright - ten thousand houses,
Knock at any door - there's one who will respond.
-- The Blue Cliff Record
Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:[EMAIL PROTECTED]
P.S. A good JDO? O, Gasp!