question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New option extraGlue in @CucumberOptions - adds packages to search, keeping default package

See original GitHub issue

Summary

It would be nice to have a new option in @CucumberOptions to specify packages to search for glue in addition to the default search path.

Context & Motivation

The glue option in @CucumberOptions allows the glue search path to be specified, but it it is used, the default path (the current package) is not considered (unless it’s also included in the list passed to glue).

It would be nice to have an option, say extraGlue that allows packages to be added to the search path, in addition to the current package. It would be useful in adding common steps and especially hooks.

Possible Solution

I’ve looked at the code and I believe I can provide a pull request implementing this (including tests). I’m just checking before if someone would be against this feature.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mpkorstanjecommented, Aug 27, 2018

Ideally you put the runner one level above your glue and features. This means you dont have to configure them.

However this also means you can’t add extra glue from a library that is a sibling package of your Runner.

1reaction
mpkorstanjecommented, Aug 27, 2018

When no glue is provided the glue defaults to the package of the runner (the class annotated with @CucumberOptions).

When glue is provided this default is ignored. Not so with extra glue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to create dynamic glue in cucumber java based on the ...
Cucumber will search its classpath and find any step in the same package or a subpackage. Setting the location as suggested by MikeJRamsey56...
Read more >
Announcing Cucumber - JVM version 4.0.0
I am happy to announce the release of Cucumber-JVM v4.0.0. This release features several new features, some quality of life improvements and ...
Read more >
Cucumber Tests in Spring Boot with Dependency Injection
Both feature tests are configured by default to get all glue classes from within the same package so that parameter is omitted in...
Read more >
Cucumber Options Glue - ProgramsBuzz
Glue Option helps Cucumber to locate the step definition file. We specify the package to load glue code (step definitions or hooks) in...
Read more >
Authors - Citrus Framework
Citrus will look for all files located in the feature package with name pattern **/**.Steps.xml and load those definitions when Cucumber starts up....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found