Arquillian Graphene @InitialPage always returns null

71 views Asked by At

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...

1

There are 1 answers

0
lordofthejars On BEST ANSWER

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.