Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Cobertura report shows wrong numbers

Đang mở
#520 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
testing-qa

Hướng nghiên cứu

Start by tracing the slather coverage -x command for Xcode projects and how it reads coverage data from the attached .xcresult bundle. Compare the line totals it uses with the 95 covered lines reported by xcrun xccov and the 88 lines in the Cobertura XML. Done means the generated report accounts for the discrepancy; the issue does not name a source file or test to start from.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

I have exported the code coverage report with

coverage = JSON.parse `xcrun xccov view --report --json #{test_path}`

It gave a report with something like the below

  "coverage": {
    "coveredLines": 95,
    "lineCoverage": 1,
    "targets": [
      {

It shows that 95 lines are covered which is the actual value since I see the same number on Xcode.
Screen Shot 2022-08-10 at 11 39 44

Then I run the slather

slather coverage -x --scheme FizzBuzzKit Appcircle.xcodeproj

XML report says this

<?xml version="1.0"?>
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
<coverage line-rate="1.0000000000000000" branch-rate="1.0000000000000000" lines-covered="88" lines-valid="88" branches-covered="98" branches-valid="98" complexity="0.0" timestamp="1660117022" version="Slather 2.7.2">

Instead of 95, it is reporting as 88 lines.

I attached the Xcode test result as well.
FizzBuzzKit.xcresult.zip

Ngôn ngữ chính
Ruby
Star
1.6k
Fork
239
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của SlatherOrg/slather

Tất cả issue của SlatherOrg/slather

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.