Code Monkey home page Code Monkey logo

Comments (1)

happz avatar happz commented on September 2, 2024 1

From #968 (comment) users should have an ability to see test results in their preferred format.

For that, there could be templates that receive stream of test result JSON and format the output accordingly.

There should be an ability to create reports in multiple formats without rerunning the test suite. So the stream of test result objects or events could be saved as JSONL for later processing.

A bit of clarification WRT how tmt does things: we are talking about two places where "result reporting" happens. One is a progress report, emitted by execute plugin while it's running as part of tmt run, this one is now a stream of lines; the other is report step, executed when all testing is done. The former is short-lived, run-time only, and cannot be replayed without re-running tests - run a test, collect its results, report the simplified outcome, move on to next test. The latter can be re-run many times because it depends on already collected results.

First thoughts:

  • we can extend the execute step and plugins to use templates when rendering the progress reporting. Today the format is hardcoded, switching it to a template - and letting the user change the template - should provide us a way to introduce different formats of progress reporting into execute. We can have a default template, we can provide TAP template or a template converting tmt.result.Result instances into JSON/YAML, and so on.
  • we can add a report plugin that would read collected results and use a given template to render their reporting. Similar to what html already does, but with the ability to emit to stdout.

And both places can use the very same template. The default/TAP/JSON/YAML/whatever else would be them emitted by execute to stderr while tmt run is in action and by tmt run --last report -h new-plugin any time later, for the same price. I like it.

from tmt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.