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

cucumber / cucumber-jvm / 3799
86%

Build:
DEFAULT BRANCH: master
Ran 06 Feb 2020 10:18PM UTC
Jobs 1
Files 356
Run time 49s
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
3799

push

travis-ci

web-flow
[Core] TestCaseState should be PASSED by default (#1888)

Currently `TestCaseState` defaults to `Status.UNDEFINED` when no steps have
been executed. This is odd because the implementation otherwise collects the
most severe result. So the logical expectation would be that it would return
`Status.PASSED`

```java
@Override
public Status getStatus() {
    if (stepResults.isEmpty()) {
        return Status.UNDEFINED;
    }

    Result mostSevereResult = max(stepResults, comparing(Result::getStatus));
    return Status.valueOf(mostSevereResult.getStatus().name());
}
```

As a result the `TestCaseResultObserver` in `junit-platform-engine` and
`testng` needs to check if an undefined scenario was empty or not. This means
our abstraction is rather leaky.

```java
if (status.is(UNDEFINED)) {
    if (suggestions.isEmpty()) {
        // Empty scenario
        return;
     }
    throw new UndefinedStepException(suggestions, strict);
}
```

By stating that the empty test is passed by default and making `TestCaseState`
default to `Status.PASSED` we resolve this complexity. As a result
`Scenario.getState` will return `PASSED` rather then `UNDEFINED` prior to the
execution of the first step of a scenario.

1 of 1 new or added line in 1 file covered. (100.0%)

6313 of 7609 relevant lines covered (82.97%)

0.83 hits per line

Jobs
ID Job ID Ran Files Coverage
3 3799.3 (COVERAGE=true) 06 Feb 2020 10:18PM UTC 0
82.97
Travis Job 3799.3
Source Files on build 3799
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #3799
  • 9d41f808 on github
  • Prev Build on master (#3797)
  • Next Build on master (#3800)
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