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.

Scenario should provide access to a "World"

See original GitHub issue

Currently it is possible to hook into and get the Scenario. It would be good if the scenario would allow to access the “World” like in js/ruby in the following way:

Provide access to the glue code instances created by cucumber

         /**
	 * Gets the current instance of the glue code in this scenario
	 * @param clazz glue code type
	 * @return returns the glue instance of the the given class or <code>null</code> if not defined in this scenario
	 */
	<T> T getGlue(Class<T> clazz); 

This would allow to communicate between glue-code steps without the need of any additional framework like picocontainer/spring.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
mpkorstanjecommented, Jul 30, 2019

https://github.com/cucumber/cucumber-jvm/issues/1711#issuecomment-516063549

Especially you want to support the “Specification Guys” so the don’t need to know what steps are there but can find a list on there hand, automatically generated from projects code.

And based on your earlier comment I think you might be misunderstanding what the purpose of Cucumber is. Cucumber is a collaboration tool, not an automated testing tool. Having multiple departments each providing step libraries that specification guys puzzle together would be the opposite of what Cucumber is intended to do.

https://cucumber.io/blog/the-worlds-most-misunderstood-collaboration-tool/

0reactions
mpkorstanjecommented, Nov 3, 2019

Cucumber is a framework to support BDD. Every feature added to the framework adds comes at a cost. A cost in terms of complexity, maintenance, documentation, usage, ect. This cost must be weighed against the benefit of the feature.

The feature you suggested is both highly technical, of use to exactly one user, and supports a use case that has been found to be detrimental to writing behaviour focused Gherkin. As such I see no benefit to adding it to Cucumber JVM. I’ve heard no new arguments since I closed this on Sep 22 so I’ll leave it at that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scenario Six: The internet opens worldwide access to success...
There will be increasing opportunity for global success, and people will form allegiances to geography-neutral social and work groupings while ...
Read more >
What are User Scenarios? - Interaction Design Foundation
User scenarios are detailed descriptions of a user – typically a persona – that describe realistic situations relevant to the design of a...
Read more >
Scenario-Based Learning: Preparing Learners for Real-World ...
Immersive learning simulations can be used to engage learners in realistic scenario-based learning. Learning delivery methods such as e-learning ...
Read more >
Where next with global environmental scenarios? - IOPscience
Scenarios have become a standard tool in the portfolio of techniques that scientists and policy-makers use to envision and plan for the future....
Read more >
Scenario Planning for Unstable Environments - Medium
To deal with these challenges, we created a scenario planning tool, which would enable us to better understand the situation on the ground,...
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