AbstractIntegrationTestSuite uses selenium for running the tests so most of
the API you'll see in it is derived from the selenium API.
Here's a simple example that opens the application default URL and sends a
click action to the browser:

public class MyIntegrationTestClass extends AbstractIntegrationTestSuite {
   @Test
   public void test_some_thing() {
       open(BASE_URL);

       clickAndWait("//d...@class='login']/input");
   }
}

All you have to do now is run the test and AbstractIntegrationTestSuite will
take care of starting the jetty instance and all that stuff for you.
Hope this helps.

On Tue, Feb 24, 2009 at 1:14 PM, Angelo Chen <angelochen...@yahoo.com.hk>wrote:

>
> Hi,
>
> I'm interested in using AbstractIntegrationTestSuite to test some pages,
> any
> samples on how to use it? I have looked at the T5 source, and not quite
> understand them, need only a simple one to get started. thanks,
>
> Angelo
>
>
> HugoPalma wrote:
> >
> > I'm implementing my user interface tests using selenium and the provided
> > AbstractIntegrationTestSuite class. Everything is working fine.
> >
> > Still, i'd like to replace my DAO services implementation with some mock
> > ones when i run the tests. The problem is that the services are declared
> > in
> > the application module so how do i override those declarations for
> testing
> > purposes ?
> > One workaround i found was to pass a VM parameter when i run the test
> goal
> > and then in the bind method implementation i check for the parameter and
> > declare either the prodution implementation or the mock one. Although
> this
> > works it forces me to implement the mock objects in the main sources and
> > not
> > on the test sources where they should be.
> >
> > I was wondering if anyone had a better way to do this.
> > Thanks.
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Providing-service-mocks-for-integration-tests-tp22173123p22180881.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to