Comments (2)
On what scenarios would it help you to use a step definition that has no data table but is implemented with a function receiving a table? godog generates functions based on the feature file step definitions - that means the source of the function structure are the step definitions. if a step has no data table associated with it godog assumes it needs none. And by the way you can pass empty tables by providing only the table column names.
Feature:
Scenario:
Given an example step
| name | age | gender |
from godog.
there are heavily reused stepdefs where it is convenient to express extra named values in the data table in a key-value format. this saves needing to define multiple stepdefs for every possible combination of optional values as part of a step:
Feature:
Scenario:
Given an example step
| value x | 123 |
| value y | 345 |
| value z | 546 |
This is useful in cases where there are unknown numbers and possible combinations of these optional values
In these cases, it would be convenient to allow the table to be omitted if no optional values are required, otherwise another step with slightly different wording is needed in order to pass the table or not.
The step function is already able to define how it interprets the table. all that would be required is the scenario parser to check if the function expects a data table, and to pass an empty table if none is provided in the cucumber
from godog.
Related Issues (20)
- click on run tests but tests are not running HOT 1
- Please update the concurrency paragraph in the docs to clarify if scenario outlines run in parallel or only the scenarios HOT 1
- Is this feature file in godog/_examples/godogs running sequencially ? HOT 2
- Why Getting total scenarios as 6 while I am having total 5 scenarios HOT 3
- Skipping a test by returning `godog.ErrSkip` does not work? HOT 6
- print error stack when panic
- step function support return a nil Context with error HOT 1
- Conflict between global flags set by godog.BindCommandLineFlags and spf13/cobra HOT 2
- HELP: I want to know the index of a scenario in a scenario outline in the before scenario hook.
- Can't navigate to step definition from Gherkin step
- Unexpected step line values in cucumber report generated by Godog for scenario outlines
- ReadMe add step `go get ...` see provided patch to fix it
- Tag Filtering Expressions HOT 2
- Calculated step duration is wrong HOT 3
- Support for attachments / embeddings as per Cucumber and Behave HOT 9
- Slack registration token_revoked error HOT 2
- Broken link in „help wanted” issue HOT 1
- MacOS arm64 package
- runAfterStepHooks should allow the user to replace an error with a nil or another error
- godog should report failure if ambiguous matching steps are found HOT 5
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 godog.