pytest.ini用法

addopts = xfail_strict = testpaths =


說明:html

pytest.ini 放在工程的頂層目錄下ide


pytest 列表下用法測試


addopts  用於定義執行參數  -- rsxX  表示pytest報告全部測試用例被跳過、預計失敗、預計失敗但實際被經過的緣由ui

testpaths 表明測試文件所在的目錄,須要根據在那個目錄下運行pytest來進行變動,不然會找不到對應的測試文件spa


--html=F:\\selenium_requset\\sjkb-ui\\request\\baogao.html --self-contained-html  爲測試報告路徑htm

須要安裝pytest-html 依賴包selenium


–reruns n (n:爲重試的次數) 失敗重跑it

須要安裝pytest-rerunfailures 依賴包 (有待測試)class

相關文章
相關標籤/搜索