I've looked at WebTest so far, which is based on htmlunit, but I'm not
making much progess.
I'm evaluating Selenium now, it looks pretty good.
Regards,
Setya
On Apr 24, 10:38 am, "Ian Bambury" <ianbamb...@gmail.com> wrote:
> JUnit is part of Eclipse. Is there something you want to do which it can't?
>
> Ian
Is it possible use JUnit to test a running client? For example to log-
in, browse to a page and then validate say that a tree expands and
collapses correctly.
Thanks. Is it Selenium RC? We want to have an automated set of
acceptance or regression tests run as part of the build process.
Yes, exactly. Also try Selenium IDE which is an action recorder than
you can playback. Unfortunately it only runs on Firefox (for now).
Regards,
Setya
I'm struggling with Selenium. How do you identify elements on a page?
When I try Selenium IDE it records nothing. (This maybe to do with how
our developers are using GWT rather than Selenium... I managed to log
in with Selenium RC but as soon as I get to a real gwt page I cannot
identify the elements on the page. I've tried using firebug in
firefox, but I'm no closer.
How are you getting on?
* It records the wrong element. I find it sometimes recording xpaths
on computed attributes which you can't forsee with a reasonable
investment of time. In this case I assign my own IDs
(DOM.setAttribute(element,"myId")) to elements and use the respective
locators (that's selenium jargon for an expression be it xpath,
javascript etc which returns a DOM element). If you decide to go that
way, do yourself a favor and try to design your widgets in a way that
this ID assignment is done more or less automatically
(inheritance?)... you don't want to see it in your code all the time.
* It doesn't record clicks on images. You have to add a user extension
to the selenium recorder - don't worry, it's javascript, it's easy and
it is somewhere on their site.
* It can't find the elements it's supposed to click on. That's the A
in Ajax - Selenium wants to click on an element as result of a click
on a link or button that is not there yet. You will make good friends
with waitForText or waitForElement which you will have to append
manually to your scripts where you see it fit. This way you tell
selenium to pause the execution until the page has changed into the
state you want it to. You can set timeouts there after which you
assume that your test has failed.
* It hates frames. You will have to come to peace with the setFrame
function which (I don't remember now) is or is not part of the
standard distro. It works more or less like the 'cd' command on the
command prompt where you descent into child frames or navigate up to
the parent frame of the current frame.
* It doesn't do well with closed windows. When you have a listener
that closes a window, you essentially are killing the living space of
Selenium. In this case move the 'close' call to a deferred command.
I'll post more if I can remember anything :)
You can (marginally) test UI level events with GWT, but you really are
only testing whether or not the toolkit itself propagates it's own
internal events (not your own code). You are testing if ClickListener
works, not whether or not your stuff works. And I say marginally
because though there are ways to do it, those ways break down in many
Composite widget situations.
For more testing at the GWT UI level though, see this thread:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/33e8e82fbab3ad31/c42484c086b3a73a.
Also note my take there that you should not really need to do this.
For that level of "integration" testing Selenium is fantastic.
Because Selenium uses the JS engine in the browser, by driving the
browser, you can test across different platforms and so on from the
integration level (the whole app, and this is similar to, but subtly
different than GWT remote testing).
For individual components, widgets, RPC calls, etc, you can *and
should* test using GWTTestCase. The key to that though, is to use a
client side model and controller, along with your View, MVC. This
allows your tests to call the controller and test things. The view
(widget) does not have logic in it that you ever need to fire an event
off of to test. The view widget should just invoke controller methods,
and in some cases listen for model and react to model events
directly. It should not however "do stuff" in terms of manipulating
the model. (Test "controller.doStuff()" instead of inside the widget
having to fire - leave the UI to the widget, and move the logic out to
the model, via the controller).
For more on general testing there are a bunch of threads around such
as:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/c6114b8cb1f38754/c0f0e1879d1285b5
and:
I'm trying to use Selenium to test my application.
I've added identification to some html items, to images, links which
seems to work since I see clicks recorded with correct id.
But now I'm facing the second problem raised in this post: clicks on
image are not recorded. As suggested by George, I went to selenium site
to find out the selenium user extension but saw nothing that can perform
this.
Could you please post the name of this user extension ? or may be I have
to add some code that has been posted somewhere ? then could you post
where to find this ?
Thanks in advance.
Boris
George Georgovassilis a écrit :
--
Boris Lenzinger
-+-+-+-+-+-+-
CSILL (Société en cours de création)
Site Web: http://www.csill.fr
c/o Telecom Paris - ENST
CICA
2229, route des Crêtes
06560 Valbonne Sophia Antipolis
-+-+-+-+-+-+-
* eValid has a bi-directional page map to help identify
DOM elements.
* eValid has a special ImageClick command to record
clicks on images.
* eValid handles frame, browser sub-windows, pop-ups
and the like.
* eValid contains a collection of built-in commands
to synchronization (including synchronization of DOM
property values).
You can download your evaluation copy of eValid V7 from:
http://www.e-Valid.com/Products/Download.7/down.evalid.7.phtml?status=FORM
Full details about the eValid web analysis and testing suite
can be found at:
On Apr 24, 2:27 am, Mike <ado...@opentext.com> wrote:
> What tools are recommended forautomatedclienttesting of GWT
On Apr 24, 11:52 am, George Georgovassilis