tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Show subresults and their checks in report display plugin

Open seberm opened this issue 1 year ago • 3 comments

This is a proposal to show the result phases (aka subresults) and their checks in the display report plugin.

Related to:

  • https://github.com/teemtee/tmt/issues/2826

Depends on:

  • https://github.com/teemtee/tmt/pull/3094

Blocked by:

  • https://github.com/teemtee/tmt/pull/3106

The code uses faked subresult data in plans/example/execute/results.yaml for testing purposes.

$ python -m tmt -r ~/tmt-learning/13 run --last report --how display --force -v 
/var/tmp/tmt/run-001

/plans/example
    report
        how: display
            pass /tests/call-dmesg
                skip dmesg (before-test check)
                skip dmesg (after-test check)
            fail /tests/mine-rep-multi
                skip dmesg (before-test check)
                skip dmesg (after-test check)
                pass /tests/mine-rep-multi/test/good
                fail /tests/mine-rep-multi/test/fail
                warn /tests/mine-rep-multi/test/weird
                    skip dmesg (before-test check)
                    skip dmesg (after-test check)
            pass /tests/mine-rep-pass
        summary: 2 tests passed and 1 test failed

total: 2 tests passed and 1 test failed

Pull Request Checklist

  • [x] implement the feature
  • [ ] write the documentation
  • [x] extend the test coverage
  • [ ] update the specification
  • [ ] adjust plugin docstring
  • [ ] modify the json schema
  • [ ] mention the version
  • [ ] include a release note

seberm avatar Jul 23 '24 14:07 seberm

I wouldn't dare to call it "trivial", with the involved verbosity levels, indentation, and more than just a few lines of changes :)

happz avatar Jul 24 '24 11:07 happz

When https://github.com/teemtee/tmt/pull/3106 gets merged, more renaming will need to happen in this PR.

happz avatar Aug 12 '24 15:08 happz

Looks good, thanks! Just one nitpick. Would be good to include at least a simple results.yaml example together with a test which would check the output is as expected. What do you think?

Hello @psss , I've added the tests. Could you please take a look?

Thanks!

seberm avatar Aug 15 '24 14:08 seberm

Unrelated failures, merging.

happz avatar Aug 22 '24 17:08 happz