

Visit our blogs for more Tutorials & Online training
==========================================
Subscribe our YouTube Channel for getting updated videos
==========================================
Like us in Face book
==========================================
Thank you 🙂
import pytest
@pytest.fixture()
def setUp():
print("Execute once before every method execution")
def testmethod1(setUp):
print("This is test method 1")
def testmethod2(setUp):
print("This is test method 2")
import pytest
@pytest.yield_fixture()
def setUp():
print("Execute once before every method execution")
yield
print("Execute once after every method execution")
def testmethod1(setUp):
print("This is test method 1")
def testmethod2(setUp):
print("This is test method 2")
collected 4 items
test_Login.py::test_loginByEmail Opening URL to login
This is log in by email test method
PASSEDclosing browser after login
test_Login.py::test_loginByFacebook Opening URL to login
This is login by Facebook test method
PASSEDclosing browser after login
test_Signup.py::test_signUpByEmail Opening URL to sign up
This is log in by email test method
PASSEDclosing browser after signup
test_Signup.py::test_signUpByFacebook Opening URL to sign up
This is login by Facebook test method
PASSEDclosing browser after signup
thank you