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

cucumber / cucumber-jvm / 3652 / 2
86%
master: 86%

Build:
DEFAULT BRANCH: master
Ran 10 Jan 2020 09:21PM UTC
Files 332
Run time 18s
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

10 Jan 2020 09:13PM UTC coverage: 83.95% (-0.07%) from 84.016%
3652.2

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=)]
}
```

5947 of 7084 relevant lines covered (83.95%)

0.84 hits per line

Source Files on job 3652.2
  • Tree
  • List 0
  • Changed 15
  • Source Changed 15
  • Coverage Changed 15
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3046
  • Travis Job 3652.2
  • ed328d77 on github
  • Prev Job for on master (#3648.2)
  • Next Job for on master (#3653.2)
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