Thanks, with this manual and knowledge that it can be done it was piece of
cake. If someone wants to see how I have implemented context reloading, you
can check it:
https://github.com/smigielski/wicket/blob/BaseArquillianTest/mock/src/mai...
I agree with you that selenium would fit this scenario also very well, but
if you have alternative you can decide what is more comfortable in any
single test.
On Tue, Jan 25, 2011 at 11:04 AM, Pete Muir <pmuir(a)redhat.com> wrote:
You can control contexts as described in the Weld ref manual (this is
a
Weld only feature, not in CDI yet) --
http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html --
follow the instructions there to manually control the contexts.
However in general for the type of test you describe I generally would
suggest using htmlunit or selenium as they give a much more realistic view
of how your users interact with pages. "Unit" tests are more suitable for
testing out your business logic.
I think Aslak does plan manual context control in Arquillian (but the
approach from Weld above should work fine in Arquillian as well).
On 25 Jan 2011, at 09:34, Marek Smigielski wrote:
> Hi,
> I was trying to write some more complex test scenario for wicket module,
but I have problem with CDI contexts. When I access second page through
SeamWicketTester object, request context still is the same as in previous
one. Is there any way to manualy flush context in CDI?
> Without it it will be hard to write some integration test in realworld
business application when you need some more steps to test, and want to see
how different objects are injected to your pages.
> As I understand there will be also impossible to test conversation scope
behaviour. Do you have any advice how to do it?
> Or should I use frameworks like selenium?
>
> It will be good feature to manually control context switching in
arquillian but I don't know whether it is possible.
>
>
> regards,
> Marek Smigielski
> _______________________________________________
> seam-dev mailing list
> seam-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/seam-dev