-
1. Re: Arquillian Selenium Test - JSF Directory
lfryc Oct 9, 2013 8:54 AM (in response to gustavodsf)I'm afraid you will need to share some code snippets to allow us identify what's wrong in your case. :-)
Please include the snippet of your @Deployment method.
-
2. Re: Arquillian Selenium Test - JSF Directory
gustavodsf Oct 9, 2013 9:13 AM (in response to lfryc)This is my test. It´s a simple test, but it's given me Invalid Path, on the log of JBoss.
@Deployment(testable = false) public static WebArchive createDeployment() {
return ShrinkWrap.create(WebArchive.class, "mis.war")
.addClasses(Usuario.class, Estado.class, Setor.class, Atribuicao.class, Cargo.class)
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsWebResource(new File(WEBAPP_SRC, "index.jsp"))
.addAsWebResource(new File(WEBAPP_SRC, "login.xhtml"))
.addAsWebResource(new File(WEBAPP_SRC, "loginFail.xhtml"))
.addAsWebResource(new File(WEBAPP_SRC, "pages/logout.jsp"))
.addAsWebResource(new File(WEBAPP_SRC, "pages/home.xhtml"))
.addAsWebResource(new File(WEBAPP_SRC, "pages/template/common/commonContent.xhtml"))
.addAsWebResource(new File(WEBAPP_SRC, "pages/template/common/commonFooter.xhtml"))
.addAsWebResource(new File(WEBAPP_SRC, "pages/template/common/commonHeader.xhtml"))
.addAsWebResource(new File(WEBAPP_SRC, "pages/template/common/commonLayout.xhtml"))
.addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
.addAsWebInfResource(new File(WEBAPP_SRC, "WEB-INF/faces-config.xml"))
.setWebXML(new File(WEBAPP_SRC, "WEB-INF/web.xml"));
}
@Drone DefaultSelenium driver; @ArquillianResource URL deploymentURL; @Test public void testLogin() { Assert.assertNotNull("Deployment URL should not be null", deploymentURL); driver.open(deploymentURL + "index.jsp"); } }
-
3. Re: Arquillian Selenium Test - JSF Directory
kwintesencja Oct 10, 2013 10:21 AM (in response to gustavodsf)Hi there,
im using filters include from the new shrinkWrap API(2.x) for adding deployment resourses:
war.merge(ShrinkWrap.create(GenericArchive.class).as(ExplodedImporter.class).importDirectory(WEBAPP_SRC).as(GenericArchive.class), "/", Filters.include(".*\\.(xhtml|css|js|png)$")); but for your specific case make sure that pages/template/common/commonContent.xhml is inside src/test/resources directory.
I hope it helps.