如何測量GO中的隔離文件夾的代碼覆蓋範圍
[0.0%]問題,您可以使用-coverpkg選項來指定應考慮哪些軟件包進行覆蓋分析。 For example, the following command will include all packages under the current directory:
go test ./test/... -coverprofile=cover.out -coverpkg ./...Once the test execution is complete, you can generate a coverage report using:stuff/stuff.go -> package: stuff test/stuff/stuff_test.go -> package: testgo tool cover -html=cover.outThis will提供有關您項目的代碼覆蓋範圍的詳細報告,包括在單獨的文件夾中覆蓋包裝的覆蓋範圍。
免責聲明: 提供的所有資源部分來自互聯網,如果有侵犯您的版權或其他權益,請說明詳細緣由並提供版權或權益證明然後發到郵箱:[email protected] 我們會在第一時間內為您處理。
Copyright© 2022 湘ICP备2022001581号-3