`Get-CodeCoverageResult`: New command proposal
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- powershell
- Lĩnh vực
- cli, testing-qa
Hướng nghiên cứu
Không có tệp triển khai hoặc bài kiểm thử nào được nêu tên. Trước tiên, hãy xem xét cấu hình Invoke-Pester hiện có và đầu ra PesterObject CodeCoverage.CommandsMissed được mô tả trong issue, sau đó xác định cách các lệnh được đề xuất cùng với các tham số Type, Name và AddSource nên được tích hợp. Công việc được xem là hoàn tất khi các kết quả coverage được yêu cầu cho các mục bị bỏ sót, đã thực thi và đã lọc có thể được truy cập thông qua các lệnh CLI được đề xuất.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Details of the scenario you tried and the problem that is occurring
It is very complicated to get the code coverage for a certan function or class through CLI. Suggest adding a command that can make it less difficult:
Invoke-PesterWithCodeCoverage: runs Pester with required configuration and returns a PesterObject. The command should take an optional PesterConfiguration parameter, but use default if not specified.
Get-CodeCoverageResult: The command should take the parameters:
PesterObject (mandatory)
Name (optional, array of class and function names being tested)
AddSource (optional, only applicable when built module using ModuleBuilder)
Type (optional, either Missed, Executed or All - defaults to Missed only)
Should add a new property Type to the resulting objects with Missed or Executed
Returns the CommandsMissed
$config = New-PesterConfiguration
$config.Run.Path = @('<test paths>')
$config.CodeCoverage.Enabled = $true
$config.CodeCoverage.Path = @('./output/builtModule/<ModuleName>')
$config.CodeCoverage.CoveragePercentTarget = 0
$config.Output.Verbosity = 'None'
$config.Run.PassThru = $true
$result = Invoke-Pester -Configuration $config
# After running above, get all commands that was missed with a reference to the SourceLineNumber in SourceFile.
$result.CodeCoverage.CommandsMissed | Where-Object { $_.Function -eq '<FunctionName>' -or $_.Class -eq '<ClassName>' } | Convert-LineNumber -PassThru | Select-Object Class, Function, Command, SourceLineNumber, SourceFile
Steps to reproduce the problem
Expected behavior
Current behavior
Suggested solution to the issue
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the module that was used
- Ngôn ngữ chính
- PowerShell
- Star
- 6
- Fork
- 9
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dsccommunity/DscResource.Test
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 38/100
dsccommunity/DscResource.Test#175 · 2 bình luận ·
-
enhancement help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
dsccommunity/DscResource.Test#171 ·
-
enhancement help wanted
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
dsccommunity/DscResource.Test#168 ·
-
enhancement help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
dsccommunity/DscResource.Test#160 · 7 bình luận ·
-
documentation help wanted
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
dsccommunity/DscResource.Test#146 ·
Tất cả issue của dsccommunity/DscResource.Test
Issue tương tự
-
command: start distro: Debian engine: null game: Teamspeak 3 reproducible: always severity: low type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
GameServerManagers/LinuxGSM#5193 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/docs area/stack good first issue help wanted kind/docs priority/p2 triage/accepted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] mo clean deletes Cypress test runner binaries in ~/Library/Caches/CypressCó thể đã có người làm @viniciusdsandrade đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
b-ber/tasks bug
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
triplecanopy/b-ber#736 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
streamlink/streamlink#7192 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày