Personally, I think the conversation scope should be enabled in Arquillian (until someone from the ARQ-team says otherwise).
You could try @Injecting BeanManager, casting it to BeanManagerImpl, acquire the conversation context and activating it manually. Another way might be using the static Container and get the ContextLifecycle service and move on from there but I'm not sure if the static is set correctly in an Arq-test...
seams to work.
I ran into the same problem when writing Arquillian tests for the Seam 3 booking example. We need to add this support both in Weld Embedded and in the remote containers. The reason we still need it in the remote containers is because the remote execution of the test goes through a custom servlet, not the JSF servlet. So we have the same problem...no conversation context.
I encourage you to come over to the Arquillian forums to discuss this issue.
I think my problem was a bug in TestNG.
@Test with a timeOut is the problem.
@AfterMethod is called before the Run() method in class Arquillian.java and close the conversation scope.
timeOutall is ok and Conversation Scope is activated.
See : My Link
What is the
Triing so inside a test, it seems work:
thanks Luca , your solution is working for me.
I just copied you code in @Before in my test class , and it is working fine