Skip to content

integration with Behave or Pytest-bdd #13

Answered by perrygoy
jardilac91 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, great question! I believe it can!

With BDD-style frameworks like behave and pytest-bdd, you'll have to organize your step definitions. I believe you can use ScreenPy as the way you interact with your application under test, to organize your step definitions more closely. For example, an "add to cart" scenario might look like this:

// cart.feature

Scenario: Add an Item to Cart

    Given I am on the homepage

    When I click on the "daily deals" link
    And I add 1x"Strawberry Gushers" to my cart

    Then I should see 1 item is in my cart

and your step definitions could use ScreenPy (maybe with ScreenPy Selenium). Let's use pytest-bdd for the example:

// maybe several step definition 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jardilac91
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants