Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the design of the checks and phases in HTML report plugin #3095

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

seberm
Copy link
Collaborator

@seberm seberm commented Jul 18, 2024

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 #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:

Blocked by:

TODOs:

  • Somehow also show the phase checks.
  • Fix old tests
  • Add new test for subresults and checks

Pull Request Checklist

  • 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:

3
4

@seberm
Copy link
Collaborator Author

seberm commented Jul 23, 2024

The phase checks should be also shown. Example:

phase-checks

@seberm seberm added the step | report Stuff related to the report step label Jul 23, 2024
@seberm seberm force-pushed the feature/improve-html-template branch from b0ed4bd to bc7c7ae Compare July 24, 2024 08:28
@seberm seberm marked this pull request as ready for review July 24, 2024 10:49
@seberm seberm force-pushed the feature/improve-html-template branch from bc7c7ae to d054f5c Compare August 5, 2024 12:24
@psss psss added this to the 1.36 milestone Aug 6, 2024
@happz
Copy link
Collaborator

happz commented Aug 12, 2024

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?

@seberm
Copy link
Collaborator Author

seberm commented Aug 12, 2024

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.

@seberm seberm force-pushed the feature/improve-html-template branch from d054f5c to 3b064df Compare August 13, 2024 13:05
@seberm
Copy link
Collaborator Author

seberm commented Aug 13, 2024

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

...

Screenshot 2024-08-13 at 14-53-21 Test results of _plans_example


Screenshot 2024-08-13 at 14-55-24 Test results of _plans_example-2

@seberm seberm force-pushed the feature/improve-html-template branch 2 times, most recently from 71b90b7 to b7496cf Compare August 13, 2024 14:09
@seberm seberm added the ci | full test Pull request is ready for the full test execution label Aug 13, 2024
@seberm seberm force-pushed the feature/improve-html-template branch from b7496cf to 5647df5 Compare August 15, 2024 13:42
@seberm seberm added the plugin | html The html display plugin label Aug 15, 2024
@seberm seberm force-pushed the feature/improve-html-template branch 2 times, most recently from ba70304 to bfb1c23 Compare August 20, 2024 09:44
@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Aug 22, 2024
@happz happz force-pushed the feature/improve-html-template branch from bfb1c23 to 3f203e9 Compare August 22, 2024 12:05
@seberm
Copy link
Collaborator Author

seberm commented Aug 22, 2024

I think I should maybe add some tests which will fake the subresults data and check the html result. What do you think?

@happz happz removed the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Aug 22, 2024
@happz
Copy link
Collaborator

happz commented Aug 22, 2024

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.

@seberm seberm force-pushed the feature/improve-html-template branch 2 times, most recently from 53d80f9 to dedb616 Compare August 26, 2024 12:56
@seberm
Copy link
Collaborator Author

seberm commented Aug 26, 2024

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.

@happz happz added the status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. label Aug 27, 2024
@happz happz force-pushed the feature/improve-html-template branch from dedb616 to ef7c14e Compare August 27, 2024 11:43
Fix the colspan of the main table, add a new column "Actions" into the
table and add possibility to show/hide the checks and subresults row for
each result.

Also, show all the checks in the subresults table. Do not hide them by
default as it's done with general result checks.
@happz happz force-pushed the feature/improve-html-template branch from ef7c14e to 634d838 Compare August 27, 2024 13:37
@happz
Copy link
Collaborator

happz commented Aug 27, 2024

Unrelated failures, merging.

@happz happz merged commit 32a35b6 into teemtee:main Aug 27, 2024
20 of 21 checks passed
@psss psss mentioned this pull request Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci | full test Pull request is ready for the full test execution plugin | html The html display plugin status | ready for merge The only missing piece is to do the rebase the current 'main' and let the CI finish. step | report Stuff related to the report step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants