-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalStateException: No Scope registered for scope 'cucumber-glue' #600
Comments
v1.1.5 has the same issue. |
Also having this problem with 1.1.5 |
Found a workaround for this problem: In my test-applicationContext.xml I added this (copied from cucumber-glue.xml in the cucumber distribution) Workaround for a bug? in cucumber-spring after 1.1.3
|
Just an update. I just started using 1.1.6 and this is still an issue. The workaround posted by azzoti works though. |
An variation on the workaround is of course to import the cucumber-glue.xml in the test application context xml file instead of copying the content:
|
I am encountering this error with v1.2.4. I have a class co.masslab.shiba.CucumberTests annotated with: @RunWith(Cucumber.class)
@CucumberOptions(features="src/test/resources",
glue={"co.masslab.shiba", "cucumber.api.spring"})
@Configuration A step definition class in the same package annotated with: @ContextConfiguration(classes={ShibaApplication.class, TestDoubleConfig.class, DataSourceConfig.class},
loader=SpringApplicationContextLoader.class)
@IntegrationTest
@WebAppConfiguration And a DataSourceConfig class, also in the same package, that looks like this: @Configuration
public class DataSourceConfig {
@Scope("cucumber-glue")
@Bean
public DataSource datasource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.build();
} The innermost error in the stack trace is In light of this, I am asking that this ticket be reopened. |
Sorry, just now saw #965 which I assume covers this issue. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
After Cucumber JVM v1.1.4, when using @scope('cucumber-glue') or in the cucumber.xml context file <bean .... scope="cucumber-glue" /> , spring throws the following exception:
Caused by: java.lang.IllegalStateException: No Scope registered for scope 'cucumber-glue'
See failing example here: https://github.com/cpkelley/cuke-demo-spring/
This works fine when reverting back to v1.1.2. It's possible that I'm just not using the new cucumber spring properly. I tried following the steps specified in the Cucumber Recipes book.
The text was updated successfully, but these errors were encountered: