Re: Wicket tests are extremely slow

2018-02-12 Thread James Selvakumar
Hi all,

Thank you very much for all the suggestions.
I agree that the slowness is because of Spring context initialized multiple
times.
Ours is a multi module maven application and what I have seen is the
context being initialized at least once per module because of new beans in
every module.
The ApplicationContextMock concept looks interesting and I shall try that
out.
Thanks again for taking your time to help me. Wicket rocks!

On Mon, Feb 12, 2018 at 6:17 PM Martijn Dashorst 
wrote:

> Probably you're initializing your application for each test, so you
> should look into speeding that up or eliminating it all together (just
> once for the whole suite)
>
> Martijn
>
>
> On Mon, Feb 12, 2018 at 5:05 AM, James Selvakumar 
> wrote:
> > Hi,
> >
> > We have a Wicket 7.x application which uses a Spring/Hibernate backend.
> We
> > have few hundred simple Wicket tests that basically tests whether the
> page
> > has been loaded properly. Since almost all our Wicket pages use Spring
> > beans, we have to initialize the Spring application context for our
> Wicket
> > tests to run. And as a result our tests are extremely slow that we have
> > stopped running them in our main pipeline.
> >
> > What strategy do you all follow to run Wicket tests that can run fast?
> >
> > Thanks in advance,
> > James
> > mCruncher
>
>
>
> --
> Become a Wicket expert, learn from the best: http://wicketinaction.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Wicket tests are extremely slow

2018-02-12 Thread Martijn Dashorst
Probably you're initializing your application for each test, so you
should look into speeding that up or eliminating it all together (just
once for the whole suite)

Martijn


On Mon, Feb 12, 2018 at 5:05 AM, James Selvakumar  wrote:
> Hi,
>
> We have a Wicket 7.x application which uses a Spring/Hibernate backend. We
> have few hundred simple Wicket tests that basically tests whether the page
> has been loaded properly. Since almost all our Wicket pages use Spring
> beans, we have to initialize the Spring application context for our Wicket
> tests to run. And as a result our tests are extremely slow that we have
> stopped running them in our main pipeline.
>
> What strategy do you all follow to run Wicket tests that can run fast?
>
> Thanks in advance,
> James
> mCruncher



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket tests are extremely slow

2018-02-11 Thread Martin Grigorov
Hi,

As Ernesto said your tests are slow because of Spring/Hibernate, not
because of Wicket.
You can either use mocks instead of real Spring beans or you can create the
Spring context once and reuse it for all/most tests.

Martin Grigorov
Wicket Training and Consulting
Looking for a remote position with Wicket ? Contact me!
https://twitter.com/mtgrigorov


On Mon, Feb 12, 2018 at 5:05 AM, James Selvakumar 
wrote:

> Hi,
>
> We have a Wicket 7.x application which uses a Spring/Hibernate backend. We
> have few hundred simple Wicket tests that basically tests whether the page
> has been loaded properly. Since almost all our Wicket pages use Spring
> beans, we have to initialize the Spring application context for our Wicket
> tests to run. And as a result our tests are extremely slow that we have
> stopped running them in our main pipeline.
>
> What strategy do you all follow to run Wicket tests that can run fast?
>
> Thanks in advance,
> James
> mCruncher
>


Re: Wicket tests are extremely slow

2018-02-11 Thread Ernesto Reinaldo Barreiro
Hi,

You could use

1- ApplicationContextMock as your spring context class
2- Mockito to create mocks of your spring beans

this ways your tests will run a lot faster and they will be independent of
actual backed implementation (as far as mocks behaves in exactly the same
way as expected from real backend)



On Mon, Feb 12, 2018 at 4:05 AM, James Selvakumar 
wrote:

> Hi,
>
> We have a Wicket 7.x application which uses a Spring/Hibernate backend. We
> have few hundred simple Wicket tests that basically tests whether the page
> has been loaded properly. Since almost all our Wicket pages use Spring
> beans, we have to initialize the Spring application context for our Wicket
> tests to run. And as a result our tests are extremely slow that we have
> stopped running them in our main pipeline.
>
> What strategy do you all follow to run Wicket tests that can run fast?
>
> Thanks in advance,
> James
> mCruncher
>



-- 
Regards - Ernesto Reinaldo Barreiro