Jetty + JWebUnit is a really nice solution for me at least.

On 8/28/05, Martijn Dashorst <[EMAIL PROTECTED]> wrote:
> In a previous project we used the Jetty embedded servlet container,
> together with a TestSetUp decorator (the same we use in the Wicket
> examples), and that kept the tests running fast. TDD was possible
> using such a setup.
> 
> Martijn
> 
> 
> On 8/28/05, Ingram Chen <[EMAIL PROTECTED]> wrote:
> > Thanks for educational advice ! I have tried Link example and it works
> > great ! Though I still can not make Form submission work with similar
> >  way... and It seems that there is no example code for
> >  mockRequest.setRequestToFormComponent(form, map). I will
> > investigate its
> >  source later.
> >
> >
> >  Anyway, Wicket Page serves both View and Controller in presentation layer,
> >  so it can not avoid writing navigation flow logic in WebPage. Additionally,
> >  Form typically contains various complex validations, it is helpful that
> > writing
> >  such Test against Java class directly without the need of container. We had
> >  tried integration-test (such as jWebUnit) before, but it slows down
> > developing
> >  rhythm and hard to practice TDD (because too coarse) . We prefer to keep
> > most Test
> >  small and lightweight, and treat in-container test as last resort.
> >
> >
> >
> >  On 8/28/05, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> > > You can use them for behavioural tests too. E.g. checking that a
> > > certain link handler is executed etc.
> > >
> > > The mock objects provide you with a minimal simulated web application
> > > enivornment. That's the least you need for your tests to be usefull.
> > > You usually want to test rendering results, as that is the goal of
> > > your web application after all: providing a user interface. For all
> > > non-render tests - of which I think that usually is about business
> > > logic, which should be in your business layer and tested independently
> > > of your presentation layer - just test the callbacks. The mockups will
> > > execute just like when in a container.
> > >
> > > Eelco
> > >
> > > On 8/28/05, Ingram Chen <[EMAIL PROTECTED] > wrote:
> > > > Hi,
> > > >
> > > >     I have spent some time on test case from Wicket-core source.
> > > >  Wicket provides MockApplication and MockHttpServletRequest... etc. to
> > help
> > > >  testing without the need of container. However, It seems that such test
> > is
> > > > just related
> > > >  to "rendering" of the page or component. I do not find any examples
> > about
> > > > "behavior" test,
> > > >  for example:
> > > >
> > > >      public ManageBookPage() {
> > > >          Form form = new Form("createBookForm") {
> > > >              protected void onSubmit() {
> > > >                  // do some business logic.
> > > >                  setResponsePage(CreateBook.class);
> > > >              }
> > > >          };
> > > >          add(form) ;
> > > >      }
> > > >
> > > >  Is it possible to unit test createBookForm submission on the
> > ManageBookPage
> > > >  without container ?
> > > >
> > > >  --
> > > > Ingram Chen
> > > > Java [EMAIL PROTECTED]
> > > > Institue of BioMedical Sciences Academia Sinica Taiwan
> > > > blog:
> > http://www.javaworld.com.tw/roller/page/ingramchen
> > >
> > >
> > > -------------------------------------------------------
> > > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > Practices
> > > Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> > > Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> > > _______________________________________________
> > > Wicket-user mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-user
> > >
> >
> >
> >
> > --
> > Ingram Chen
> > Java [EMAIL PROTECTED]
> > Institue of BioMedical Sciences Academia Sinica Taiwan
> > blog: http://www.javaworld.com.tw/roller/page/ingramchen
> 
> 
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to