Shaded DataTable Dependencies

Parent POM for data tables

License

License

Categories

Categories

Cucumber Application Testing & Monitoring Data
GroupId

GroupId

io.cucumber
ArtifactId

ArtifactId

datatable-dependencies
Last Version

Last Version

3.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Shaded DataTable Dependencies
Parent POM for data tables

Download datatable-dependencies

How to add to project

<!-- https://jarcasting.com/artifacts/io.cucumber/datatable-dependencies/ -->
<dependency>
    <groupId>io.cucumber</groupId>
    <artifactId>datatable-dependencies</artifactId>
    <version>3.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.cucumber/datatable-dependencies/
implementation 'io.cucumber:datatable-dependencies:3.0.0'
// https://jarcasting.com/artifacts/io.cucumber/datatable-dependencies/
implementation ("io.cucumber:datatable-dependencies:3.0.0")
'io.cucumber:datatable-dependencies:jar:3.0.0'
<dependency org="io.cucumber" name="datatable-dependencies" rev="3.0.0">
  <artifact name="datatable-dependencies" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.cucumber', module='datatable-dependencies', version='3.0.0')
)
libraryDependencies += "io.cucumber" % "datatable-dependencies" % "3.0.0"
[io.cucumber/datatable-dependencies "3.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

Maven Central

Data Table for Java

For general information about data tables please refer to the polyglot project for specific information the DataTable javadoc.

Comparing data tables

The matchers module contains Hamcrest matchers to compare data tables. These can be used in most common test frameworks and produces pretty error messages.

Add the datatable-matchers dependency to your pom.

<dependencies>
  [...]
    <dependency>
        <groupId>io.cucumber</groupId>
        <artifactId>datatable-matchers</artifactId>
        <version>${cucumber-datatable.version}</version>
        <scope>test</scope>
    </dependency>
  [...]
</dependencies>

Use the matcher in your step definition.

import static io.cucumber.datatable.matchers.DataTableHasTheSameRowsAs.hasTheSameRowsAs;

[...]

private final DataTable expected = DataTable.create(
    asList(
        asList("Annie M. G.", "Schmidt"),
        asList("Roald", "Dahl"),
));
    
@Then("these authors have registered:")
public void these_authors_have_registered(DataTable registeredAuthors){
    assertThat(registeredAuthors, hasTheSameRowsAs(expected).inOrder());
    
    // java.lang.AssertionError: 
    // Expected: a datable with the same rows
    // but: the tables were different
    // - | Annie M. G. | Schmidt  |
    //   | Roald       | Dahl     |
    // + | Astrid      | Lindgren |
} 

Build

Not building?

We're using shaded dependencies in a reactor build so make sure you run mvn clean install the first time.

IntelliJ IDEA also doesn't know how to handle the shaded pom

  1. mvn install
  2. Open the 'Maven Projects' tool window.
  3. Choose "Shaded DataTable Dependencies" -> "Ignore Projects".
  4. Open Project Structure, choose the "DataTable" module, add jars, select dependencies/datatable-dependencies-....jar
  5. Select the top level pom.xml and choose "Maven" -> "Reimport".
io.cucumber

Cucumber

Cucumber Open

Versions

Version
3.0.0
2.0.0
1.1.14
1.1.12
1.1.7
1.1.6
1.1.3
1.1.2
1.0.3
1.0.2
1.0.1
1.0.0