lundi 23 février 2015

How to implement a scenario outline in lettuce using pycharm

I have the following feature:



Feature: Check if the weather service works properly
In order to check the weather service
As beginner
I'll get some values and check if they are ok and if the temperature given is correct

Scenario: Check if a city and and country given are correct
Given I access the url with http://ift.tt/1mGUATE
And the city is <city> and the country <country>
When I ask for the city and country name
Then I check if the city and country are correct
And I check if the status code is 200

Examples:
| city | country |
| London | UK |
| Madrid | ES |
| Barcelona | ES |
| Berlin | GE |


And I have the following step:



@step("the city is (.*) and the country (.*)")
def city_and_country(self, expectedCity, expectedCountry):
world.expectedCity = expectedCity
world.expectedCountry = expectedCountry


but when I execute this step I have the followin information:


enter image description here


I check the lettuce documentation and the scenario outline looks pretty well, but I still don´t understand what I'm doing wrong. Any ideas?


Thanks in advance!


Aucun commentaire:

Enregistrer un commentaire