-
1. Re: Test a @ViewScoped Bean without drone/graphene?
aslak Feb 11, 2015 8:26 AM (in response to kgoedert)Not from in container.. as ViewScope is bound to JSF.
But deploying any JSF page that has a ViewScoped bean and using @RunAsClient and simply calling the JSF URL via new URL(..).openStream should invoke the Bean....
-
2. Re: Test a @ViewScoped Bean without drone/graphene?
kwintesencja Feb 27, 2015 3:19 PM (in response to aslak)maybe you should look into Deltaspike test control module: http://deltaspike.apache.org/documentation/test-control.html
In this kind of integration test you have FaceContext and also CDI scopes active.
Here is a nice example: ee6-ds-demo/PageBeanTest.java at master · os890/ee6-ds-demo · GitHub
-
3. Re: Test a @ViewScoped Bean without drone/graphene?
isidoros Jan 26, 2019 1:39 PM (in response to aslak)Is this feasible? Because I tried in a mixed mode test firstly to call from a @RunAsCient method the jsf page and then in an container method tried to
inject the viewscope Controller bind to the jsf page but still I m getting the
WELD-001303: No active contexts for scope type javax.faces.view.ViewScoped [Proxied because : Original exception caused: class java.lang.ClassNotFoundException: org.jboss.weld.contexts.ContextNotActiveException]
Any suggestions please?