-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need example on how to pass null values for Example table #463
Comments
Hi, original module "parse" has no possibility to this just now because of r1chardj0n3s/parse#136 |
Mmh, isn't the problem already solved by using quoting? Like: Scenario Outline: Invalid Login
Given I am an invalid user
And I enter a bad "<username>" in the username field
And I enter a bad "<password>" in the password field
... @given(cfparse('I enter my "{password}" in the password field'), converters=CONVERTERS)
@given(string('I enter a bad "{password}" in the password field'))
def enter_password(login: Login, password: str) -> None:
logging.info(f"Entering password - '{password}'")
login.enter_password(password). # HINT: Internal implementation handles EMPTY_STRING password (and raises error) HINT: I have not actually tried the example above. |
HINT: BETTER: Scenario Outline: Invalid Login
Given I am not logged in
When I login as user "<username>" with password "<password>"
Then the login fails with "<error>" message
... |
Let try @given(cfparse("I enter my {username:word?} in the username field", dict(word=with_pattern(r'\w+')(lambda _:_))), converters=CONVERTERS)
def enter_username(login: Login, username: str) -> None:
logging.info(f"Logging on as - {username}")
login.enter_username(username) |
@f00dog-x300 Pay attention that cfparse doesn't support cardinality field for parse module now jenisys/parse_type#10 |
Actually, the |
Parsers and converters is the right way to go. |
Hi,
I'm trying to perform a test by adding different parameters, and one of those parameters are for null values. Unfortunately, I'm not able to do it.
Currently the Example table that I'm using looks like this
I receive an error stating the step definition is not found. The methods associated with these steps look like this:
I was wondering if I could get some guidance
The text was updated successfully, but these errors were encountered: