Guys,

One thing that I like regarding Wicket tester is that it easily allows one
to check a Page under design for any exception that it could throw at
creation-time. Actually, doing such a basic test is for me essential, so as
it takes only two lines of code, I systematically check all my pages this
way.

You know, the:

        // start and render the test page
        this.tester.startPage(HomePage.class);

        // assert rendered page class
        this.tester.assertRenderedPage(HomePage.class);

thing.

What I like so much with it is that any error which would occur when you
load the page in FF / IE... occurs without leaving Eclipse and immediately.
When the workflow to find the page in the browser is long and repetitive,
it's a relief!

BUT, when the number of pages grow, two related problems emerge:

-you have to duplicate these two lines of code everytime, which is a (small)
pain in itself
-and you have no guarantee that you didn't forget any page, which is worst.

So I'm looking for a way to list all Page instances in a Wicket app, which
could then allow me to be sure that they are all covered by a test. And when
it's done maybe I could use the same system in order to ensure that Selenium
(the automated functional testing tool) has covered all my pages as well
(more deeply).

I could use a test coverage tool, but 1) it wouldn't work with Selenium 2) I
don't want to generate a report, I want the test suit to fail if a Page is
not covered by my test class.

Could anyone suggest where to start, please?

Regards,

Pierre


-- 
Rien de grand ne s'est accompli dans le monde sans passion.

(G.W.F. Hegel, philosophe allemand)

Reply via email to