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

cucumber / cucumber-jvm / 4072 / 3
86%
master: 86%

Build:
DEFAULT BRANCH: master
Ran 14 May 2020 06:13PM UTC
Files 394
Run time 57s
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

14 May 2020 05:54PM UTC coverage: 85.962% (-0.01%) from 85.975%
COVERAGE=true

push

travis-ci

web-flow
[Spring] Require an active scenario before creating beans (#1974)

The glue code context does not require an active scenario. As a result
it was possible to create scenario scoped beans that would be shared
(leak) between scenarios.

An example of this is illustrated below. Because this does require
access to the `GlueCodeScope` it is not possible to do this in
practice.

```java
@Configuration
public static class TestApplicationConfiguration {
    @Bean
    public BeanFactoryPostProcessor beanFactoryPostProcessor(){
        return factory -> factory.registerScope(SCOPE_CUCUMBER_GLUE, new GlueCodeScope());
    }

    @Bean
    public ExampleService service(ScenarioScopedApi api) {
        return new ExampleService(api);
    }

    @Bean
    @Scope(value = SCOPE_CUCUMBER_GLUE)
    public ScenarioScopedApi api() {
        return new ScenarioScopedApi();
    }
}
```

However without registering the the `GlueCodeScope` at start up Spring
will complain about missing the cucumber-glue scope rather then
complain about scope not having started or the missing proxy mode.

So to avoid further confusion:

1. GlueCodeContext will check if the context has been started.
2. Add a `@ScenarioScope` annotation that sets the correct proxy mode.
3. Do some renaming of internal classes
4. Use a global counter for conversation ids

Related
 - https://github.com/cucumber/cucumber-jvm/issues/1970
 - https://github.com/cucumber/cucumber-jvm/issues/1667

6748 of 7850 relevant lines covered (85.96%)

0.86 hits per line

Source Files on job 4072.3 (COVERAGE=true)
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3325
  • Travis Job 4072.3
  • 0743e3c4 on github
  • Prev Job for COVERAGE=true on master (#4065.3)
  • Next Job for COVERAGE=true on master (#4073.3)
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