Comments (10)
yes, it's possible in pytest-bdd via parametrization:
https://github.com/olegpidsadnyi/pytest-bdd#step-parameters
On 27 September 2013 09:47, apoh [email protected] wrote:
Currently it's only possible to add parameter for a step or scenario via
the testcode. Gherkin support the feature of "Scenario Outline"
http://docs.behat.org/guides/1.gherkin.html#scenario-outlines add
different datasets to the feature-file. Is there a way to implement this?P.S.: If you need support I can help you.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23
.
Anatoly Bubenkov
from pytest-bdd.
ah, sorry you meant to have dataset in the scenario file directly...
well, it will need the casting from strings to some python types in
general...
do you see the real value in this?
can you describe the use-case?
eg why having parameter values in python is worse than having dataset in
scenario file?
On 27 September 2013 10:02, Anatoly Bubenkov [email protected] wrote:
yes, it's possible in pytest-bdd via parametrization:
https://github.com/olegpidsadnyi/pytest-bdd#step-parametersOn 27 September 2013 09:47, apoh [email protected] wrote:
Currently it's only possible to add parameter for a step or scenario via
the testcode. Gherkin support the feature of "Scenario Outline"
http://docs.behat.org/guides/1.gherkin.html#scenario-outlines add
different datasets to the feature-file. Is there a way to implement this?P.S.: If you need support I can help you.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23
.Anatoly Bubenkov
Anatoly Bubenkov
from pytest-bdd.
We advocate the standard pytest parametrization (pytest.mark.parametrize) where you can use complex Python types. For example if you operate some Point(x, y) type configuring them in the txt would be not easy.
If you have strong reasons to define the Example section in the .feature file please share.
from pytest-bdd.
Yes I think there's a real value. In example when a ProducOwner who only is able to write Gherkin-Feature files, like to test different datasets.
Okay so I will open a fork and send u a pull-request when I'm done.
from pytest-bdd.
It will be problematic as we only parse files on runtime, not importtime
and we rely on pytest parametrization
so to continue to rely on pytest parametrization you will need to parse files on import time, which i have to say is not good approach
from pytest-bdd.
So you'r parsing Step by Step!? Maybee there is a way to look for the
Examples-Section when a Scenario is starting.
Am 27.09.2013 10:33, schrieb Anatoly Bubenkov:
It will be problematic as we only parse files on runtime, not importtime
and we rely on pytest parametrization
so to continue to rely on pytest parametrization you will need to parse
files on import time, which i have to say is not good approach—
Reply to this email directly or view it on GitHub
#23 (comment).
Andreas Pohle
Mail: [email protected]
Skype: andreas_po
Mobile: 0163/1769321
Phone: 030/69200891
from pytest-bdd.
not step by step but first touch of the file happens too late for the
parametrization
On 27 September 2013 10:39, apoh [email protected] wrote:
So you'r parsing Step by Step!? Maybee there is a way to look for the
Examples-Section when a Scenario is starting.Am 27.09.2013 10:33, schrieb Anatoly Bubenkov:
It will be problematic as we only parse files on runtime, not importtime
and we rely on pytest parametrization
so to continue to rely on pytest parametrization you will need to parse
files on import time, which i have to say is not good approach—
Reply to this email directly or view it on GitHub
<
#23 (comment)
.Andreas Pohle
Mail: [email protected]
Skype: andreas_po
Mobile: 0163/1769321
Phone: 030/69200891—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-25230653
.
Anatoly Bubenkov
from pytest-bdd.
pytest parametrization works the way it generates code, basically
Well, im sure it's possible (to add what you want), just not as easy as you
might think
On 27 September 2013 10:39, apoh [email protected] wrote:
So you'r parsing Step by Step!? Maybee there is a way to look for the
Examples-Section when a Scenario is starting.Am 27.09.2013 10:33, schrieb Anatoly Bubenkov:
It will be problematic as we only parse files on runtime, not importtime
and we rely on pytest parametrization
so to continue to rely on pytest parametrization you will need to parse
files on import time, which i have to say is not good approach—
Reply to this email directly or view it on GitHub
<
#23 (comment)
.Andreas Pohle
Mail: [email protected]
Skype: andreas_po
Mobile: 0163/1769321
Phone: 030/69200891—
Reply to this email directly or view it on GitHubhttps://github.com//issues/23#issuecomment-25230653
.
Anatoly Bubenkov
from pytest-bdd.
Ok, I will see what i can do
Am 27.09.2013 10:41, schrieb Anatoly Bubenkov:
pytest parametrization works the way it generates code, basically
Well, im sure it's possible (to add what you want), just not as easy as you
might thinkOn 27 September 2013 10:39, apoh [email protected] wrote:
So you'r parsing Step by Step!? Maybee there is a way to look for the
Examples-Section when a Scenario is starting.Am 27.09.2013 10:33, schrieb Anatoly Bubenkov:
It will be problematic as we only parse files on runtime, not
importtime
and we rely on pytest parametrization
so to continue to rely on pytest parametrization you will need to parse
files on import time, which i have to say is not good approach—
Reply to this email directly or view it on GitHub
<.
Andreas Pohle
Mail: [email protected]
Skype: andreas_po
Mobile: 0163/1769321
Phone: 030/69200891—
Reply to this email directly or view it on
GitHubhttps://github.com//issues/23#issuecomment-25230653.
Anatoly Bubenkov
—
Reply to this email directly or view it on GitHub
#23 (comment).
Andreas Pohle
Mail: [email protected]
Skype: andreas_po
Mobile: 0163/1769321
Phone: 030/69200891
from pytest-bdd.
starting on this issue
stay tuned :)
from pytest-bdd.
Related Issues (20)
- Missing tag for 7.0.1 HOT 2
- RFE: is it possible to restart making github releases?🤔 HOT 2
- How to use multiple values for a parameter in Scenario Outline Examples
- Custom hooks HOT 1
- Issue with pytest-bdd Failing to Identify Correct Scenario Path After Folder Name Change HOT 2
- `iterparentnodeids` removed from pytest HOT 1
- Step definition parses wrong parameter from feature file
- Unable to run parallel tests with pytest-xdist - can't serialize <class 'pytest_bdd.parser.Step'> HOT 1
- Pytest emits deprecation warning: "A private pytest class or function was used" HOT 3
- pytest-bdd doesn't support pytest 8.1.0 HOT 5
- Missing git tags for 7.1 and 7.1.1 releases HOT 1
- Python 3.8/pytest 3.0.4/pytest-bdd 3.1.0 crash: TypeError: an integer is required (got type bytes) HOT 2
- Pytest 8.1.1 fixture injection compability HOT 2
- Unable to run pytest-bdd with pytest-xdist, can't serialize <class 'pytest_bdd.parser.Step'> HOT 4
- Does pytest-bdd support pytest-xdist? HOT 2
- Version 7.1.2 no longer provides pytest_bdd.steps.inject_fixture HOT 1
- Issue with existing working automation after python 3.11.1 and pytest-bdd 7.00 upgrade HOT 6
- Re-use of target_fixture not possible anymore HOT 1
- How to apply for function/module/package/session scope to feature HOT 2
- Is there a hook for 'before_feature' in pytest-bdd?
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 pytest-bdd.