Questions tagged [pytest-bdd]

86 questions
0
votes
1 answer

How to call from two different example

I want to call both Desktop and Cloud Example. How can I do it. Here is my code Scenario Outline: Test different value for same parameter Example: Desktop | app | app1 | | instagram| facebook | Example: Cloud | app | app1 | |…
Rana
  • 389
  • 5
  • 17
0
votes
1 answer

pytest-bdd--> Selenium Webdriver python AttributeError: 'NoneType' object has no attribute 'execute_script' calling pytest fixture from conftest.py

Got this error when calling the webdriver object; this has been defined within a fixture. Please refer to the below details: Code structure: tests features design.feature step_defs __init__.py conftest.py test1.py Code in…
0
votes
1 answer

How can we pass a dictionary from feature file to test file. (pytest-bdd)

I am trying to pass a dictionary from a feature file to my test file. I searched a lot but couldnt find a way to pass a dictionary. Below is one example that is available in behave which I wanted to achieve in pytest-bdd Reference link: How can I…
S_G
  • 67
  • 6
0
votes
1 answer

User-friendly vs. generated name and classname in JUnit XML for import to XRay

Using pytest-bdd with the JUnit argument to produce a nice JUnit XML report. I then use a cURL command to import the test to XRay, the Atlassian Jira extension. Jira is running on a server running on our network (not cloud). So I am using something…
Guy
  • 666
  • 1
  • 10
  • 34
0
votes
0 answers

Is there a way to redirect from the feature bdd step to the step definition function in VS code please for pytest Bdd framework

Is there any pytest bdd plugin which could solve this problem, please. I am using Pytest BDD extension in VS code, I am not able to navigate to step definition from feature file, if the step has a parameters in it. Plugin I tried: plugin link For…
Jagadeesh
  • 143
  • 2
  • 3
  • 14
0
votes
1 answer

Pytest-BDD step arguments as *args

is it possible to use *args like step arguments in pytest-bdd? For example my Scenario: Scenario: Data Creation Given login with USER1 and role ADMIN Then set expert portal mode Then fill section Name with Alexa Then fill section…
Kisuro
  • 104
  • 7
0
votes
1 answer

pytest-bdd page object implementation

I am new to pytest-bdd. I have to implement the automation framework from the scratch. SO I have followed some material and implemented with small framework very basic. When I run the test I can see webdriver is not getting started at all and I…
vaanumalar
  • 57
  • 1
  • 11
0
votes
2 answers

Allure Serve Got unexpected extra arguments

I'm trying to generate allure reports in my python - behave project. I have my json files created in below directory structure. now I'm trying to execute allure serve .\allure\results\ command seems like it's processing something for 5-6…
0
votes
0 answers

pytest-bdd TypeError: argument of type 'NoneType' is not iterable

I'm very confused. I'm trying to learn to use pytest-bdd and gherkin, but I'm getting a TypeError saying NoneType is not iterable. I assume this means that the dict I'm trying to get values from is somehow becoming a NoneType object somewhere in…
Ben
  • 82
  • 11
0
votes
1 answer

How to implement pytest xfail mark with pytest-bdd?

I am automating an api using pytest bdd.I need to implement @pytest.mark.xfail for one of my step definition. But after adding this decorator, its not working as expected. Example > example.feature Scenario: Validate the API response where…
anirbans
  • 19
  • 1
  • 1
  • 2
0
votes
1 answer

Pytest bdd error "scenario_wrapper() missing 1 required positional argument: 'request'"

I'm learning pytest and I get an error trying to run a test that worked fine before I added pytest-bdd(feature file, step file is the one I'm trying to run) This is my code: import pytest import time from selenium import webdriver from pytest_bdd…
Artis
  • 35
  • 5
0
votes
1 answer

How can I pass scenario specific arguments to pytest bdd after_scenario hook?

I'm using pytest bdd to execute bdd scenarios. Example: Scenario Outline: entry with special character Given I am an authenticated user When I request entry information with name Then I expect a 200 response code And I check the output…
user3698979
  • 103
  • 1
  • 9
0
votes
1 answer

fixture 'pylon_config_missing_usageplan' not found while running pytest-bdd

@scenario('../features/config.feature', 'Loading a valid config') def test_config(): pass @given("I have provided a valid pylon config",target_fixture="pylon_config") def pylon_config(): input_data = { } return…
Jishnunand P K
  • 145
  • 1
  • 8
0
votes
1 answer

How to continue execution of steps in Pytest BDD with scenario outline

I'm trying to implement a Feature scenario outline, something similar to below: Feature: Scenario outlines Scenario Outline: Outlined given, when, then Given there are cucumbers Given there are apples When…
0
votes
1 answer

Pytest BDD - select stubbed or live API calls

I'm working on developing some Behavior Driven Development i.e style tests using pytest-bdd. We want to re-use the same features and more or less the same step definitions to having both stubbed and live calls to a third party API i.e. we want to…