On Thu, Feb 07, 2008 at 02:29:18AM -0800, Ovid wrote:
> --- "Philippe Bruhat (BooK)" <[EMAIL PROTECTED]> wrote:
>
> > The biggest trouble I had was for diagnostics. I ended up considering
> > that diagnostics output after a test result belong to the test result
> > (as a comment to it), and that diagnostics appearing before the first
> > test result are "global" to the whole test script. Which means that
> > "#
> > Looks like you failed 3 tests of 22." is always attached to the last
> > test.
>
> What were you trying to do with the diagnostics? Simply store them, or
> something more elaborate?
Storing them, to be able to show them later in a HTML report like this one
(brought to you in glorious plain text rendering below):
You are here: Home > Quality Assurance > Test smoke
Test script test/lib/Module.pm/test.t
Ran on revision [EMAIL PROTECTED]:30:01 at 2008-02-06 23:39:23
3 test cases (3 planned):
2 ok, 1 failed, 0 todo,
0 skipped and 0 unexpectedly succeeded
Test line Diagnostic
ok 1 - first move
ok 2 - second move
not ok 3 - error move # Failed test (test/lib/Modulepm/test.t at line
29)
# 'Undefined subroutine &Module::shake called
at /home/book/smoke_cvs/lib/Module/SQL.pm line 123.
# '
# doesn't match '(?-xism:bad move)'
# Looks like you failed 1 tests of 3.
So, we have a table with 2 columns, with the diagnostic in regard to
the test line. Except it's not really the diagnostic, but everything between
the current test line and the next test line.
> So you don't get the "old" diagnostics after the test (this was never
> guaranteed anyway), but you get the new-style YAML diagnostics.
> Unfortunately, the "got/expected" information is still somewhat lost
> and I suspect that's what you're really looking for.
Yes, I want to give as much information as possible. Of course, actually
finding and fixing the problem will require running the test again
by hand, but the more info I can show there, the better people reading the
report will be able to "get" what's going wrong.
--
Philippe Bruhat (BooK)
Friends are people who are there when you need them. (also applies to dogs)
(Moral from Groo The Wanderer #43 (Epic))