Selenium with Python Tutorial 41-PyTest | Run Multiple Tests in PyTest

///Selenium with Python Tutorial 41-PyTest | Run Multiple Tests in PyTest

Selenium with Python Tutorial 41-PyTest | Run Multiple Tests in PyTest

FavoriteLoadingAdd to favorites

Visit our blogs for more Tutorials & Online training
==========================================

Subscribe our YouTube Channel for getting updated videos
==========================================

Like us in Face book
==========================================

source

By |2019-11-30T00:16:02+00:00November 30th, 2019|Python Video Tutorials|5 Comments

5 Comments

  1. Amar H R November 30, 2019 at 12:16 am - Reply

    Thank you 🙂

  2. Dhananjay Sonar November 30, 2019 at 12:16 am - Reply

    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")

  3. Dhananjay Sonar November 30, 2019 at 12:16 am - Reply

    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")

  4. Dhananjay Sonar November 30, 2019 at 12:16 am - Reply

    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

  5. A - ِS November 30, 2019 at 12:16 am - Reply

    thank you

Leave A Comment

*