JBoss Community Archive (Read Only)

Graphene 2

Framework Integration Options

In order to setup Graphene's library dependencies, you need to choose between components:

Test Framework Options

Graphene should fluently work with JUnit and TestNG, you need to include their dependencies in your POM dependencies section:

JUnit

<!-- JUnit -->
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <scope>test</scope>
</dependency>

TestNG

<!-- TestNG -->
<dependency>
    <groupId>org.testng</groupId>
    <artifactId>testng</artifactId>
    <scope>test</scope>
</dependency>

Arquillian Mode Options

You can choose between following Arquillian modes

  • Standalone

    • runs tests without container integration, only lifecycle of extensions is managed

    • allows to use Graphene independently of Arquillian containers and deployment management

  • Container

    • runs tests with container, managed lifecycle of container including deployment

    • you can still use Graphene without managing lifecycle - just do not provide @Deployment in your test case

and include those in dependencies section of your POM:

Note: you need to use Arquillian integration specific for your test framework - following dependencies are for JUnit -  for using TestNG, you need to replace "junit" keyword with "testng"

Standalone Mode

<!-- Arquillian JUnit Standalone -->
<dependency>
    <groupId>org.jboss.arquillian.junit</groupId>
    <artifactId>arquillian-junit-standalone</artifactId>
    <scope>test</scope>
</dependency>

Container Mode

<!-- Arquillian JUnit Container -->
<dependency>
    <groupId>org.jboss.arquillian.junit</groupId>
    <artifactId>arquillian-junit-container</artifactId>
    <scope>test</scope>
</dependency>

Container Management

Graphene uses Arquillian Containers in order to manage lifecycle of the application container and deployment.

To setup Arquillian to use your favorite container, refer to Container adapters.

Selenium version

Graphene 2 covers integration with WebDriver (aka Selenium 2), but it can be used in the same project together with Graphene 1 (based on Selenium 1).

For more detailed summary of differences, refer to Which Graphene to use?

When adding following dependencies, all required dependencies should be brought to your project as transitive dependencies, including:

  • Drone

  • WebDriver

Use Graphene:

<dependency>
    <groupId>org.jboss.arquillian.graphene</groupId>
    <artifactId>graphene-webdriver</artifactId>
    <type>pom</type>
    <scope>test</scope>
</dependency>

Which version to use?

http://arquillian.org/modules/graphene-extension/

Note: in order to rewrite dependencies transitively brought by Graphene (e.g. Drone), you can use BOMs (see bellow)

BOM and Dependency Management Usage

In order to manage or override dependency versions used in the project, it is recommended to use BOMs.

By importing BOM to your Maven POM, you manage versions of dependencies, so you don't need to define them explicitly.

In connection to Graphene, you may want to use these BOMs:

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-10 12:14:27 UTC, last content change 2013-09-11 09:26:13 UTC.