feat(testcase): annotate testcase links with results - #739
feat(testcase): annotate testcase links with results#739AlexanderLanin wants to merge 6 commits into
Conversation
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //src:license-checkStatus: Click to expand output |
|
Documentation preview for this pull request is available at: |
There was a problem hiding this comment.
Pull request overview
This PR introduces a doctree-resolved post-processing hook in score_source_code_linker to annotate testcase links with a colored status badge derived from each testcase need’s result, and adds documentation + unit tests for the behavior.
Changes:
- Add
testcase_annotations.pyimplementingannotate_testcase_results()to append(passed|failed|skipped|disabled|<other>)badges to testcase references. - Register the new hook from the extension
__init__.pyand document the new module in extension docs. - Add unit tests covering reference resolution via
refid/refurifragments and result-to-color mapping/fallback behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/extensions/score_source_code_linker/tests/test_testcase_annotations.py | Adds unit tests for reference target resolution and result badge rendering. |
| src/extensions/score_source_code_linker/testcase_annotations.py | Implements doctree post-processing to append colored result badges to testcase references. |
| src/extensions/score_source_code_linker/init.py | Wires the new doctree-resolved hook into the extension setup. |
| src/extensions/docs/source_code_linker.md | Documents the presence/purpose of the new module file. |
| docs/how-to/test_to_doc_links.rst | Updates user documentation around test linking and describes testcase result annotations. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
456cdb7 to
a40328d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (2) — in code that hasn't changed since the last review.
docs/how-to/test_to_doc_links.rst:48
- This removes the only placement guidance for manually generated reports, but the linker does not discover arbitrary JUnit XML: it searches for files named
test.xmlunder the workspace-roottests-report/or Bazel'sbazel-testlogs/. Without that detail, users of the advanced path cannot make the documented integration work.
This section is only relevant when your language or test framework does not
have one of the integrations above. In that case, produce JUnit XML with the
metadata described below. The generated test results are processed
automatically and create GitHub links from the requirements to the testcases.
.github/workflows/license_check.yml:42
- The composite action emits only one
--comply-withflag, so this value expands to--comply-with ASF EF; the scanner consumesASFas the policy and treatsEFas another lockfile. The job will then try to parse a nonexistentEFfile instead of checking both policies. Pass one policy here, or update the action to emit--comply-withonce per policy.
comply_with: ASF EF
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Overall looks okay I think.
It works in the implementation and rendered page and looks good.
|
|
||
| Required Properties | ||
| ------------------- | ||
| This section is only relevant when your language or test framework does not |
There was a problem hiding this comment.
ASD-STE100 Simplified Technical English is a worthwhile guideline when writing how-tos.
There was a problem hiding this comment.
this talks about programming language
MaximilianSoerenPollak
left a comment
There was a problem hiding this comment.
Seems okay though still some questions open that can be adressed in future PRs.
Would like @a-zw approval too before merge.
Summary
score_source_code_linkerExtracted from #730; original author is @antonkri
see https://eclipse-score.github.io/docs-as-code/pr-739/internals/requirements/requirements.html
