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:<br><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="https://github.com/smigielski/wicket/blob/BaseArquillianTest/mock/src/main/java/org/jboss/seam/wicket/mock/SeamWicketTester.java">https://github.com/smigielski/wicket/blob/BaseArquillianTest/mock/src/main/java/org/jboss/seam/wicket/mock/SeamWicketTester.java</a></div>
<div><br></div><div>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.</div><div><br><div class="gmail_quote">On Tue, Jan 25, 2011 at 11:04 AM, Pete Muir <span dir="ltr">&lt;<a href="mailto:pmuir@redhat.com">pmuir@redhat.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">You can control contexts as described in the Weld ref manual (this is a Weld only feature, not in CDI yet) -- <a href="http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html" target="_blank">http://docs.jboss.org/weld/reference/latest/en-US/html/contexts.html</a> -- follow the instructions there to manually control the contexts.<br>

<br>
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. &quot;Unit&quot; tests are more suitable for testing out your business logic.<br>

<br>
I think Aslak does plan manual context control in Arquillian (but the approach from Weld above should work fine in Arquillian as well).<br>
<div><div></div><div class="h5"><br>
On 25 Jan 2011, at 09:34, Marek Smigielski wrote:<br>
<br>
&gt; Hi,<br>
&gt; 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?<br>

&gt; 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.<br>
&gt; As I understand there will be also impossible to test conversation scope behaviour. Do you have any advice how to do it?<br>
&gt; Or should I use frameworks like selenium?<br>
&gt;<br>
&gt; It will be good feature to manually control context switching in arquillian but I don&#39;t know whether it is possible.<br>
&gt;<br>
&gt;<br>
&gt; regards,<br>
&gt; Marek Smigielski<br>
</div></div>&gt; _______________________________________________<br>
&gt; seam-dev mailing list<br>
&gt; <a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>
&gt; <a href="https://lists.jboss.org/mailman/listinfo/seam-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/seam-dev</a><br>
<br>
</blockquote></div><br></div>