运行测试
进入 test 目录
在 1 个线程中运行测试
pytest login_tests.py --headful
并行运行测试
pipenv install pytest-xdist
cd test
pytest login_tests.py registration_tests.py article_tests.py --headful -n 3
与 Allure Report 并行运行
cd test
pytest login_tests.py article_tests.py registration_tests.py --headful --alluredir=./allure-results -n 3
allure generate
allure serve allure-results
在所有浏览器引擎(chromium、firefox、webkit)上运行测试
# Note!!!!
# Make sure that "@pytest.mark.only_browser" decorators are commented under the tests
pytest article_tests.py --browser chromium --browser firefox --browser webkit --headful -n 3
|