[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sensitivity vs. specificity in software testing
From: |
Ralph Corderoy |
Subject: |
sensitivity vs. specificity in software testing |
Date: |
Fri, 07 Apr 2023 13:38:38 +0100 |
Hi Branden,
> On the one hand I like the idea of detecting inadvertent changes to
> vertical spacing (or anything else) in a document, but on the other,
> I find narrowly scoped regression tests to be advantageous.
Agreed. I assume groff is a long way from a set of tests which give
high code coverage. I think that swings in favour of detecting
inadvertent changes.
> I think maybe the best-of-both-worlds solution is to have a model
> document-based automated test--perhaps one that exercises as many
> ms(7) macros as possible.
A bit of a torture test? Yes, worthy.
> would add the highly sensitive Rumsfeldian "unknown unknowns" problem
> detection that I think your suggestion is tuned to.
I don't think it would catch the things not thought of, like the .bp
within a display. I've probably mentioned it before, but a corpus of
real-life documents would be good input to a troff test harness. Render
each at, say, 150 pixels per inch in monochrome by default and compare
against a golden version made earlier.
Commands like ‘gm compare’ or gmic(1) can do the pixel comparison.
A differing pixel would leave the diffs of each stage of the pipeline
for eyeballing. So tbl's output is saved rather than just piped into
troff.
This needn't be part of groff's test suite, or anything to do with the
FSF. It could be useful for comparing versions of other troffs.
Documents could be tagged with what troffs they're compatible with and
whether the test needs upgrading, say to colour pixels. A buildbot or
similar could run the suite against a new release or Git commit.
When a new document is thrown into the pot, a golden test result is
eyeballed and saved. It's not too important whether it's perfect so it
doesn't need costly proof-reading. What matters is a later
change is detected and ensured to be deliberate.
> > output=\
> > ',,,,,,The first page is 1.,, display,,,,,,,,,
> > ,,, -2-,,,The second page is 2.
> > '
> > output=$(echo "$output" | tr , \\012)
>
> This is a good suggestion for handling blank line-happy output, of
> which we have quite a bit in groff.
I of course produced it by doing the opposite, line feeds into commas,
and then reverted a comma by hand where I wanted to show a page break
with a linefeed.
--
Cheers, Ralph.
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, (continued)
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Michał Kruszewski, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, G. Branden Robinson, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Michał Kruszewski, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, G. Branden Robinson, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Michał Kruszewski, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Dave Kemper, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, G. Branden Robinson, 2023/04/05
- [PATCH] fix for groff Git regression (Savannah #64005), G. Branden Robinson, 2023/04/05
- [PATCH] fix for groff Git regression (Savannah #64005), Ralph Corderoy, 2023/04/06
- sensitivity vs. specificity in software testing (was: [PATCH] fix for groff Git regression (Savannah #64005)), G. Branden Robinson, 2023/04/06
- sensitivity vs. specificity in software testing,
Ralph Corderoy <=
- Re: sensitivity vs. specificity in software testing, G. Branden Robinson, 2023/04/07
- Re: sensitivity vs. specificity in software testing, Ralph Corderoy, 2023/04/08
- Re: sensitivity vs. specificity in software testing, G. Branden Robinson, 2023/04/09
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Peter Schaffter, 2023/04/05
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Michał Kruszewski, 2023/04/05
- an opinionated history of *roff macro packages (was: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4), G. Branden Robinson, 2023/04/06
- Re: an opinionated history of *roff macro packages (was: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4), Damian McGuckin, 2023/04/06
- memorandum macros (mm) in 1976/77 (was: an opinionated history of *roff macro packages), G. Branden Robinson, 2023/04/06
- Re: memorandum macros (mm) in 1976/77 (was: an opinionated history of *roff macro packages), Damian McGuckin, 2023/04/06
- Re: pdfroff in groff 1.23.0.rc3 changes compared to 1.22.4, Lennart Jablonka, 2023/04/06