Comments (16)
Yes!!! I've felt guilty about bot having one for years so starting one would be great. Best way to handle recurring questions on ML.
from docs.
- cucumber and excel (don't, explain why)
from docs.
- skipping steps (don't, explain why)
from docs.
- issues with runners / how to run
from docs.
If at all possible, I've a strong preference for first finding the right place for that info to live, and then linking to it in the form of an FAQ.
from docs.
@plaindocs Yes, I agree. However, sometimes people don't find the documentation; it might be helpful to have a list of common problems...
from docs.
Additional FAQ (which should -also- be clarified in the docs):
- Getting 'undefined steps' because glue is not found (where does it look for the glue by default, how to set where to find the glue) - so many StackOverflow questions...
- Running though CLI (how to) - see:
- https://groups.google.com/forum/#!topic/cukes/bM_ZHHwks8U
- https://www.jeroenreijn.com/2017/10/running-cucumber-from-the-command-line.html
=> Note there is a separate issue on adding this information (#261). It should be added and then linked from the FAQ to that section. - Taking a screenshot on fail (& explain taking screenshot every step is an antipattern)
from docs.
Input for "Cucumber can't find my glue" (from @brasmusson on Slack): Cucumber-JVM will search for step definitions in the packages you told it to look in. Either you put your step definitions files in the default package where Cucumber-JVM searches, that is the package (or sub-packages) of the runner class - in your case the package com.Create_Customer_API
, or you tell Cucumber-JVM explicitly which packages (which includes the sub-packages) to search with the glue = {"<package>", "<package>", "<etc>"}
in the @CucumberOptions
annotation - in your case glue = {"Create_Customer_API"}
from docs.
How to share state between steps: in JVM, use DI (needs more documentation anyway). Link to list of supported DI framework (currently here: https://cucumber.io/docs/reference/java-di). If your project already uses any of these framework (or you are familiar with one of them), it's easiest to use that. If you don't already use one, Picocontainer is the most light weight version you can use.
There's a little information in the Cucumber for Java book.
from docs.
ANSI color thingy: cucumber/cucumber-java-skeleton#18
from docs.
Details in scenarios: http://dhemery.com/pdf/writing_maintainable_automated_acceptance_tests.pdf
from docs.
From @mattwynne :
"Iām teaching a class today, and Iām getting questions where Iām struggling to find docs to point people to with the answers:
- how does Cucumber-JVM go about searching for glue code, by default?
- what are the configuration parameters you can pass to your
RunCukesTest
JUnit bridge? e.g. glue, plugin etc. - how do you use java 8 lambdas for defining steps"
From @brasmusson
"
- Cucumber-JVM use the package of the runner class as default (when using the command line runner, there is not default)
- See https://github.com/cucumber/cucumber-jvm/blob/master/core/src/main/java/cucumber/api/CucumberOptions.java
- See https://github.com/cucumber/cucumber-jvm/blob/master/examples/java8-calculator/src/test/java/cucumber/examples/java/calculator/RpnCalculatorStepdefs.java
"
from docs.
Clarify Cucumber expressions vs Regex, see: cucumber/common#515
from docs.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/transaction/TransactionDefinition.
The cause is incorrect detection of the Glue property, for some reason the package cucumber.api.spring is added incorrectly.
only cucumber.api.spring is added to glue
"regular" glue not added by default, need to add manually.
from docs.
Added a FAQ page, with most but not all FAQ mentioned here. Maybe create a new issue with pending FAQ?
from docs.
Questions about dynamic data (don't; tests should be deterministic).
from docs.
Related Issues (20)
- Cucumber is not showing number of scenarios and steps passed or falied HOT 2
- Browser Automation tutorial has deprecated libraries HOT 1
- Docs website formatting is broken HOT 24
- The API reference page is broken in production, half of the content missing HOT 2
- New unofficial golang implementation HOT 6
- Update direct links to docs on Cucumber website
- Move the 10-minute-tutorial(s) to source code and enable running them in a pre-built environments
- Netlify preview keeps spamming cookie warnings
- Books "Card" embed logic breaks the page HOT 1
- Python Cucumber: Is there a Behave replacement? HOT 2
- Json Cucumber mergeFeaturesWithRetest HOT 1
- Ctrl+C does not stop/kill Docker running the docs HOT 2
- Consistent and correct spelling
- How to enable test data externalization (through Excel/JSON etc.) using Cucumber Java and TestNG? HOT 1
- Can I decide whether the following steps should continue to execute based on the result of the previous step execution HOT 1
- Step of installing cucumber as dependency should be required for the 10 Minute Tutorial
- Add definition of glue to docs HOT 1
- Automate gherkin-i18n-table based on json of gherkin repo HOT 5
- Question for Background with Feature and Rule HOT 4
- Data table and Doc string are not documented as mutually exclusive HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.