jboss-arquillianarquillian-dronegraphene2

Arquillian Graphene @InitialPage always returns null


I have a test scenario:

@Test
public void testHomePage(@InitialPage LoginPage loginPage) {

    loginPage.login();

    assertNotNull(welkom.getText());

}

Driven by an arquillian deployment:

@Deployment(testable = true)

However, the loginPage.login(); gives me a NPE.

When I change testable = false, my test works... I don't understand what I am doing wrong...


Solution

  • Yes the thing is that testeable = true means that the test itself is moved from your runner (IDE, Maven, ...) to application server and it is executed there inside the application server runtime. Arquillian Drone and Graphene are meant to work from outside the application server.

    So setting testeable to false makes Arquillian just deploys your archive to application server but then the test is run from your runtime (IDE, Maven, ...). You can read more about this in https://docs.jboss.org/author/display/ARQ/Test+run+modes

    Since Drone Graphene are black box tests, then testeable = false is a requirement.