mercredi 4 mai 2016

pytest xdist launch multiple browsers at once

I am trying to run pytests in parallel.

I have file like below

@pytest.yield_fixture(scope="module")
def moduleSetup(request):
    # module_setup = Module_Setup()
    # request.addfinalizer(module_setup.teardown)
    driver = webdriver.Firefox()
    yield driver
    driver.close()

I am trying to run all tests at once. I tried py.test -d --tx 3*popen//python=python2.7 test.py

I have parametrize input params so it will loop through different params.

But when I run it launches one browser and run test for one scenario and then for second scenario. It doesn't launch multiple browser at once.

I tried yield_fixture fixture, scope as function session

Aucun commentaire:

Enregistrer un commentaire