Graphene strongly ties to Arquillian Core and its extensions Containers and Drone to manage lifecycle of the application server, selenium server and Graphene.
In the common scenarios, you need only to choose container you would like to deploy application into and the framework you would like to use for testing.
In order to setup project dependencies, you need to define library dependencies.
Refer to Framework Integration Options for more details.
The simplest possible test would look like this:
This test uses @Drone annotation in order to bring browser to your test case using dependency injection.
You can read more about Using Drone, where you will get information which instances you can use in which situations.
The browser is represented by WebDriver class instance (or its implementations).
For more information what is WebDriver and how it relates to Graphene, look at Using WebDriver.
This is really simple case, it does not really show where Graphene excels.
On the high level, Graphene allows you to create reusable abstractions in form of Page Object (the pattern widely known in Selenium community)
You can read more about using reusable Page Abstractions.
Second big promise of Graphene is making a testing of applications using asynchronous calls heavily (AJAX, WebSocket, ...) simple task.
Graphene allows that by exposing compact syntax for describing conditions which must be met on the page once asynchronous call finished.
You can read more about Testing AJAX,
or you can go directly to the documentation of features, which enables that:
Graphene Utility Classenables compact syntax for waiting and guards
Request Guardsbrings simplest conditions: wait for request to be finished (blocking test)
Graphene enables way more features on a low level.
Using following features may help you write outstanding tests:
allows you to obtain current thread-local context of the browser and "inject" it where you need it without reference propagation.
Drone is extension for Arquillian that manages lifecycle of the Selenium Server and Selenium clients as Selenium 1.x, Selenium 2.x and Graphene.
Refer to Using Drone section for more information.
It is possible to run Graphene tests from any modern IDE. See Arquillian Getting Started Guide for more information about how to run and debug tests in Eclipse.