Dallaylaen has asked for the wisdom of the Perl Monks concerning the following question:

Hello dear esteemed monks,

Say I have a module (Assert::Refute to be precise) that checks several conditions and creates a report that specifies which of the conditions failed and why. Quite naturally I use TAP (Test Anything Protocol) to represent such reports.

Now I'd like to be able to emit warnings/exceptions/log messages based on failing reports. TAP is cool but it looks ugly in the log (although I could possibly output it line by line). JUnit's XML also looks heavier than needed...

Is there a terse, one-line format I could use for such reporting? I'd like to be able to keep the reason/explanation bits (diags) and test names.

Thank you.

  • Comment on A terse, one-line alternative to TAP / JUnit?

Replies are listed 'Best First'.
Re: A terse, one-line alternative to TAP / JUnit?
by haukex (Archbishop) on Sep 01, 2018 at 06:34 UTC

    Simple idea: does prove help?

      No. I don't want to combine multiple messages into shorter ones. I want an individual message to be a one-liner but retain the details.

      TAP was chosen because it's a clear way to say "condition Foo holds, condition Bar doesn't and here is why", not because I'm necessarily testing something.

        Maybe you could show some examples?