• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cucumber / cucumber-jvm / 3652
86%

Build:
DEFAULT BRANCH: master
Ran 10 Jan 2020 09:21PM UTC
Jobs 1
Files 332
Run time 19s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
3652

push

travis-ci

web-flow
[Java] Support empty strings and null values in data tables (#1857)

Empty data table cells can either be considered null or empty strings.
For example table below can converted to a map as
`{name=Aspiring Author, first publication=}` or
`{name=Aspiring Author, first publication=null}`.

```gherkin
 | name            | first publication |
 | Aspiring Author |                   |
```

And as demonstrated #1617 there are good reasons to default the empty
table cell to null. However this does not cover all cases. There are
however good use cases to use the empty string.

By declaring a table transformer with a replacement string it becomes
possible to explicitly disambiguate between the two scenarios. For
example:

```gherkin
Given some authors
   | name            | first publication |
   | Aspiring Author |                   |
   | Ancient Author  | [blank]           |
```

```java
@DataTableType(replaceWithEmptyString = "[blank]")
public Author convert(Map<String, String> entry){
  return new Author(
     entry.get("name"),
     entry.get("first publication")
  );
}

@Given("some authors")
public void given_some_authors(List<Author> authors){
  // authors = [Author(name="Aspiring Author", firstPublication=null), Author(name="Ancient Author", firstPublication=)]
}
```

113 of 113 new or added lines in 13 files covered. (100.0%)

5947 of 7084 relevant lines covered (83.95%)

0.84 hits per line

Jobs
ID Job ID Ran Files Coverage
2 3652.2 10 Jan 2020 09:21PM UTC 0
83.95
Travis Job 3652.2
Source Files on build 3652
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3652
  • ed328d77 on github
  • Prev Build on master (#3648)
  • Next Build on master (#3653)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc