在 pycharm 裡通過 pytest 執行用例,控制檯沒有輸出日誌資訊
import logging
logging.basicConfig(level=logging.DEBUG)
def test_demo():
logging.debug("This is a log!")
控制檯輸出:
Testing started at 17:28 ...
E:\pyDemo\seleniumDemo\venv\Scripts\python.exe "D:\pycharm\PyCharm 2018.3.5\helpers\pycharm_jb_pytest_runner.py" --path E:/pyDemo/seleniumDemo/test_log1.py
Launching pytest with arguments E:/pyDemo/seleniumDemo/test_log1.py in E:\pyDemo\seleniumDemo
============================= test session starts =============================
platform win32 -- Python 3.7.3, pytest-6.0.0, py-1.9.0, pluggy-0.13.1
rootdir: E:\pyDemo\seleniumDemocollected 1 item
test_log1.py . [100%]
============================== 1 passed in 0.15s ==============================
Process finished with exit code 0
相關文章
- ASP.NET Core 整合測試中通過 Serilog 向控制檯輸出日誌ASP.NET
- pycharm 控制檯輸出資訊時,輸出的結果和報錯資訊會錯位,影響檢視報錯資訊,有什麼可以辦法避免嘛?PyCharm
- 不一樣的控制檯程式—–在控制檯中輸出圖片薦
- DG沒有應用日誌應用日誌
- pytest+allure 生成測試報告,如果保留同一個測試用例的多次執行的日誌資訊。測試報告
- pytest(9)-標記用例(指定執行、跳過用例、預期失敗)
- pytest(13)-多執行緒、多程式執行用例執行緒
- 在Delphi中捕獲控制檯程式的輸出 (轉)
- pytest多程式/多執行緒執行測試用例執行緒
- 在Docker中,很多應用容器都是預設後臺執行的,怎麼檢視它們的輸出和日誌資訊?Docker
- SpringBoot通過yml和xml檔案配置日誌輸出Spring BootXML
- codeblocks 控制檯輸出亂碼BloC
- Pytest測試框架(一):pytest安裝及用例執行框架
- pytest(4)-測試用例執行順序
- C++學習筆記(七) - Qt 在控制檯輸出C++筆記QT
- 另一種列印輸出日誌資訊的方式
- 通過日誌檢視mysql正在執行的SQL語句MySql
- js控制檯輸出consoleJS
- iOS 控制檯輸出中文,非外掛iOS
- pytest 能否執行 nose 寫的測試用例
- java 在控制檯上輸入密碼時,密碼不顯示在控制檯上Java密碼
- java專案中eclipse控制檯輸出log4j的資訊JavaEclipse
- 恢復控制檔案後,沒有最後一個歸檔日誌的備份,也沒新增歸檔日誌資訊,怎麼恢復?
- reportbuilder 日誌輸出UI
- Python輸出日誌Python
- 在TSM 的ISC控制檯中不用立刻執行排程
- java-執行 java 控制檯程式Java
- 執行Java,不顯示控制檯Java
- 指令碼在crontab裡沒有執行的解決辦法之一指令碼
- nohup不輸出nohup.out日誌資訊,已解決。
- C++簡單日誌/debug除錯資訊輸出C++除錯
- 透過jbuilder打包的app在控制檯執行訪問jboss的ejb出現javax.naming.NoInitialContextExceptionUIAPPJavaContextException
- logback下日誌輸出前處理操作——以日誌脫敏為例
- 執行runInstaller沒有介面彈出
- Java使用Scanner類進行控制檯輸入Java
- 有沒有辦法判斷某個儲存過程是否在執行?儲存過程
- 啟動tomcat時,日誌裡大量輸出建立資料來源dataSource的日誌Tomcat
- pycharm控制檯亂碼怎麼解決?PyCharm