Improve the design of the checks and phases in HTML report plugin
I tried to fix the colspan of the main table, added a new column "Actions" into the table, and added the possibility to show/hide the checks and subresults row for each result using the toggle buttons.
The https://github.com/teemtee/tmt/pull/3094 is a prerequisite to test the code in this PR. To generate the subresults in the attached screenshots, I have for now faked the subresult data in the plans/example/execute/results.yaml as following:
...
phase:
- name: /tests/mine-rep-multi/test/good
result: pass
end-time: "2024-07-17T14:16:28.735039+00:00"
__class__:
module: tmt.result
name: PhaseResult
- name: /tests/mine-rep-multi/test/fail
result: fail
end-time: "2024-07-17T14:16:28.739501+00:00"
__class__:
module: tmt.result
name: PhaseResult
- name: /tests/mine-rep-multi/test/weird
result: warn
end-time: "2024-07-17T14:16:28.743959+00:00"
__class__:
module: tmt.result
name: PhaseResult
check:
- name: dmesg
result: skip
note:
log: []
start-time: '2024-07-18T12:18:06.339547+00:00'
end-time: '2024-07-18T12:18:06.339574+00:00'
duration: 00:00:00
event: before-test
__class__:
module: tmt.result
name: CheckResult
...
Related to:
- https://github.com/teemtee/tmt/issues/2826
Blocked by:
- https://github.com/teemtee/tmt/pull/3106
TODOs:
- [x] Somehow also show the phase checks.
Pull Request Checklist
- [x] implement the feature
- [ ] write the documentation
- [ ] extend the test coverage
- [ ] update the specification
- [ ] adjust plugin docstring
- [ ] modify the json schema
- [ ] mention the version
- [ ] include a release note
Example screenshots:
The phase checks should be also shown. Example:
Just a note: in the light of renaming "phase" to "subresult", either this PR or https://github.com/teemtee/tmt/pull/3106 will require changes to produce the consistent subresults-in-html-report picture. https://github.com/teemtee/tmt/pull/3106 seems to be slightly closer to being merged, how about making it a prerequisite for this PR?
Just a note: in the light of renaming "phase" to "subresult", either this PR or #3106 will require changes to produce the consistent subresults-in-html-report picture. #3106 seems to be slightly closer to being merged, how about making it a prerequisite for this PR?
The #3106 is the prerequisite for this PR (see "Blocked by" section in my first comment on this PR. I will rebase the changes on top of #3106. The same applies for #3107.
Just an update of screenshots. The #3106 is still a prerequisite. My testing data:
...
subresult:
- name: /tests/mine-rep-multi/test/good
result: pass
end-time: "2024-07-17T14:16:28.735039+00:00"
__class__:
module: tmt.result
name: SubResult
- name: /tests/mine-rep-multi/test/fail
result: fail
end-time: "2024-07-17T14:16:28.739501+00:00"
__class__:
module: tmt.result
name: SubResult
- name: /tests/mine-rep-multi/test/weird
result: warn
end-time: "2024-07-17T14:16:28.743959+00:00"
__class__:
module: tmt.result
name: SubResult
check:
- name: dmesg
result: skip
note:
log: []
start-time: '2024-07-22T10:34:41.135249+00:00'
end-time: '2024-07-22T10:34:41.135279+00:00'
duration: 00:00:00
event: before-test
__class__:
module: tmt.result
name: CheckSubResult
- name: dmesg
result: skip
note:
log: []
start-time: '2024-07-22T10:34:41.393797+00:00'
end-time: '2024-07-22T10:34:41.393819+00:00'
duration: 00:00:00
event: after-test
__class__:
module: tmt.result
name: CheckSubResult
check:
- name: dmesg
result: skip
note:
log: []
start-time: '2024-08-13T12:00:22.021926+00:00'
end-time: '2024-08-13T12:00:22.021978+00:00'
duration: 00:00:00
event: before-test
__class__:
module: tmt.result
name: CheckResult
- name: dmesg
result: skip
note:
log: []
start-time: '2024-08-13T12:00:22.268393+00:00'
end-time: '2024-08-13T12:00:22.268414+00:00'
duration: 00:00:00
event: after-test
__class__:
module: tmt.result
name: CheckResult
...
I think I should maybe add some tests which will fake the subresults data and check the html result. What do you think?
I think I should maybe add some tests which will fake the subresults data and check the html result. What do you think?
Good idea, deserves a test.
I think I should maybe add some tests which will fake the subresults data and check the html result. What do you think?
Good idea, deserves a test.
I’ve added the tests. This PR should be ready to merge once the tests pass.
Unrelated failures, merging.