Hi,
I'm working with pytest since few weeks now for automate my functionnal
tests using Webdriver and python. And i have some questions about how to
paramatrize tests.
After reading docs, i've setup my tests like :
@pytest.mark.parametrize(("Url", "name", "LastName", "IdCustomer"), [
("http://myurl.com", "myname", "mylastname", "12345"),
])
def test_get_infos_about_client(Url, name, Lastname, IdCustomer):
#Do something with arguments
[...]
My problem is I've 2 testing environnements ENV1 and ENV2, however datas (
in particular IdCustomer are not the same between ENV1 and ENV2 ( these
datas are generated during the creation of the Customer)
So , I'm thinking about use csv files to inject datas in place of
parametrize function. But I did'nt find any docs about it. Is it possible?
I've tried
def pytest_generate_tests(metafunc):
#read csv file
metafunc.parametrize(header, datas)
But it doesn't work!
Can I do the same thing with another method ?
Thnaks for your help
Thomas
_______________________________________________
Pytest-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pytest-dev