Code Monkey home page Code Monkey logo

Comments (10)

bubenkoff avatar bubenkoff commented on May 29, 2024

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.

bubenkoff avatar bubenkoff commented on May 29, 2024

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-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

Anatoly Bubenkov

from pytest-bdd.

olegpidsadnyi avatar olegpidsadnyi commented on May 29, 2024

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.

apoh avatar apoh commented on May 29, 2024

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.

bubenkoff avatar bubenkoff commented on May 29, 2024

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.

apoh avatar apoh commented on May 29, 2024

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.

bubenkoff avatar bubenkoff commented on May 29, 2024

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.

bubenkoff avatar bubenkoff commented on May 29, 2024

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.

apoh avatar apoh commented on May 29, 2024

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 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


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.

bubenkoff avatar bubenkoff commented on May 29, 2024

starting on this issue
stay tuned :)

from pytest-bdd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.