is JSFUnit Dead??
by Paul Rivera
Looking at the jsfunit website (http://www.jboss.org/jsfunit) the last announcement was made nearly a year ago.
Looking at the github commit graph, seems there were no commits for over half a year already.
No one is answering the posts in this forums. No one is sending emails in the developer's list.
IS JSFUNIT DEAD??
12 years, 5 months
embedded tomcat 7 with JSFUnit
by Paul Rivera
Hi Guys,
I'm using Arquillian to test my JSF beans in an embedded Tomcat 7.0.27 container. Problem is, I'm getting this exception when I run maven test: see http://pastebin.com/Ewiwe2CQ
I have the following pom.xml: see http://pastebin.com/u2UuakAc
Here's my Unit Test Class:
@RunWith(Arquillian.class)
publicclassUserBeanTest{
@Deployment
publicstaticWebArchivecreateDeployment(){
MavenDependencyResolverresolver =DependencyResolvers.use(MavenDependencyResolver.class).loadMetadataFromPom("pom.xml");
WebArchivewar =ShrinkWrap.create(WebArchive.class)
.setWebXML(newFile("src/main/webapp/WEB-INF/web.xml"))
.addAsWebResource(newFile("src/main/webapp/WEB-INF/faces-config.xml"),"/WEB-INF/faces-config.xml")
.addClass(UserBean.class);
war.addAsWebResource(newFile("src/main/webapp","user.xhtml"));
//add these libraries only for non JEE containers (e.g. tomcat)
war.addAsLibraries(resolver.artifact("org.apache.myfaces.core:myfaces-api:2.1.5").resolveAsFiles());
war.addAsLibraries(resolver.artifact("org.apache.myfaces.core:myfaces-impl:2.1.5").resolveAsFiles());
returnwar;
}
@Test
@InitialPage("/user.jsf")
publicvoidshould_create_greeting(JSFServerSessionserver,JSFClientSessionclient){
//some tests here
}
}
The problem seems to occur during deployment of the WebArchive when the Arquillian tests run, and not when my @Test methods run. I was able to make things work by using managed tomcat. But I'd prefer an embedded tomcat though. Has anyone had better luck with this?
Best Regards,
Paul
12 years, 5 months