Skip to content

Getting started

On this wiki you will find all needed documentation to get started with the Java/Cucumber version of CrossTest.

How to get CrossTest

CrossTest is available as a Maven package. If you are new to Maven, you can find information about it on the Apache website. When you want to setup a new testing project using CrossTest, follow the instructions on the remainder of this page.

Specifics about how to incorporate Crosstest in your environment may vary based on your setup. For example what IDE is being used, what type of CI/CD pipeline etc. But generally speaking it comes down to

  • including the required dependencies in a maven pom.xml file
  • use the Cucumber runner or write a java class to run the tests in a framework such as JUnit

Some IDEs such as Eclipse or IntelliJ come with a bundled Maven installation, but in other cases you might have to install Maven first.

How to use CrossTest with the Cucumber runner

To run tests locally on your computer, using the Cucumber cli runner you need the following setup: A folder containing:

  • The maven pom file (pom.xml)
  • A basis CrossTest configuration file (XTestConfig.xml)
  • A cmd or script file to invoke maven
  • A subfolder containing the feature testfiles

Maven Pom file

The pom.xml should have the following contents:

<project xmlns="" xmlns:xsi="" xsi:schemaLocation="">
        <!-- -->
        <!-- change dependency below to the correct JDBC driver for the specific RDBMS you are using -->


Basic CrossTest configuration

The XTestConfig.xml should have the following content. Update the DatabaseServerConfig values so it corresponds to an existing database connection in your environment. If you are using a different JDBC driver than SQL Server, also update the dependency in the pom.xml (previous section).

<?xml version="1.0" encoding="UTF-8"?>
            password ="password"            

This is all configuration needed for running the first test. For an explanation of all configuration options see the Configuration section.

Script file to run the tests

The script should contain the following statement. The example below will run all the feature files that are stored in the testfiles subfolder.

mvn exec:java -Dexec.classpathScope=test -Dexec.mainClass=io.cucumber.core.cli.Main -Dexec.args="./testfiles --glue com.xbreeze.xtest"

Create and run your first test

Add a new feature file in the testfiles folder, be sure to have a file name that ends with the .feature extension and insert the following code:

Feature: a first testfeature
    Scenario: Running a crosstest scenario
        When I execute the following query on demo:
            SELECT 'Hello World' AS FirstResult

        Then I expect the following result:
            | FirstResult |
            | Hello World |

Now execute the script file from the previous section and the output should finish with something like

INFO: Loading ObjectFactory via service loader: io.cucumber.picocontainer.PicoFactory

1 Scenarios (1 passed)
2 Steps (2 passed)

That's it! you have successfully run a first Cucumber/CrossTest feature. For more information about how to use Crosstest look at the Configuration and Step documentation.

Bugs & issues

When you encounter an issue while using CrossTest please report it by sending an e-mail to with the subject 'CrossTest Cucumber - Bug report'.

Please provide the following information:

  • Steps to reproduce
  • Expected behaviour
  • CrossTest version used