Clarify identity semantics for parameterized tests and merged retries
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
- 35/100
- Loại issue
- Tài liệu
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- documentation, testing-qa
Hướng nghiên cứu
Start with the identity model described in the issue, then read PRs #57 and #62 and the referenced MTP files: CtrfReportEngine.JsonTestWriter.cs and UnitTestElementExtensions.cs. The work is done when the specification documents a normative model for parameterized tests and merged retries, including one worked example and guidance MTP can implement.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Producer context
Microsoft.Testing.Platform (MTP) produces CTRF for multiple test frameworks, so it cannot assume every framework assigns the same stability semantics to its native test UID.
Today the MTP CTRF reporter keeps the framework-provided UID under tests[].extra.uid rather than claiming it is a CTRF testId:
For MSTest specifically, that UID is a versioned hash of the assembly file name, fully-qualified test name, parameter types, and (for data-driven tests) the row index:
This is stable for many rebuilds, but a rename, assembly rename, or reordered dynamic data source can change it.
What the current spec resolves
The identity model is clear that:
testIdidentifies a logical test case and should be stable across runs within the producer's documented scope;executionIdis unique for one execution of that logical test within a run;attemptIdidentifies an individual entry inretryAttempts;- identity fields are optional and opaque to consumers.
PR #57 and PR #62 provide useful general guidance, but we could not find guidance for parameterized cases or for reports transformed by retry merging.
Questions
- For a parameterized/data-driven method, is each argument row a distinct logical test case that should have its own
testId, or should all rows share the method'stestIdand be distinguished byparametersplusexecutionId? - If rows are distinct test cases, should a generated
testIdbe based on canonical parameter values (stable across data-source reordering) rather than a row index? How should producers handle values that cannot be serialized deterministically or safely? - Is a source rename/file move intentionally a new
testId, or is preserving identity across renames an expected producer responsibility? - For retries executed as separate processes and later collapsed into one CTRF test object, should the raw per-process documents and the merged test share one
executionId, or should each raw document have its own execution identity and the merged document get another one? - Is
attemptIdintentionally limited to previous attempts inretryAttempts? The final attempt is represented by the test object, which has noattemptId; that makes it difficult to correlate the final attempt between a raw per-process report and a merged report.
Why this matters for MTP
Mapping an arbitrary framework UID to testId may overstate its stability, while omitting standardized identities prevents CTRF consumers from correlating parameterized rows and retry artifacts. We would like to document and implement the intended model rather than establish a .NET-specific convention.
Possible interpretations include treating every parameter row as a logical test case, or treating the method as the logical test and the row as an execution. We are not prescribing either; a normative recommendation and one worked parameterized/retry example would unblock the mapping.
- Ngôn ngữ chính
- Không có dữ liệu ngôn ngữ
- Star
- 99
- Fork
- 4
- Merge trung bình
- 1 giờ 21 phút
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không 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 ctrf-io/ctrf
-
Also Mention UUID version 8Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
-
Độ khó 3/5 Nửa ngày Mức phù hợp với người mới 32/100
-
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 48/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Issue tương tự
-
documentation
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 86/100
bridgetownrb/bridgetown#1130 ·
-
Add TOC to repoĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
netlify/netlify-mcp#75 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 91/100
twbs/bootstrap#43050 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(prompt): filer socket fragment hardcodes an issue-intent cap of 8 that Chore runs overrideĐang mởagent-butler-finding chore
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
jordansmall/spindrift#5128 ·
Maintainer thường phản hồi trong vòng 1 ngày