Re: Validator no longer includes counts

"Cutchins, Stephen" <stephen.cutchins@accenturefederal.com>, 2015-07-24 14:03 +0000:
> Archived-At: <http://www.w3.org/mid/DM2PR10MB030133DDBE2C1D909C424E88F6810@DM2PR10MB0301.namprd10.prod.outlook.com>
> 
> Hi,
> 
> We have been using Validator with an automated test script for a Federal
> project.  Roughly a week ago or so, the counts were removed from
> Validator which is causing our automated test scripts to fail since this
> is what we were checking against.
> 
> Is there a way to add the counts back?  We would very much appreciate it!

Do your test scripts need the precise count or do they just need to know
whether the count is zero or non-zero?

If they only need to know if they’re zero or non-zero, then an easy way to
do that is just to use the gnu=out output format. Because in that case, if
you only care about errors, and you check a document that has no errors, it
will return nothing at all; for example:

  https://validator.w3.org/nu/?doc=https://sideshowbarker.net&out=gnu&level=error

That just returns an empty document, which is what’s expected when the
checker finds no errors to report.

Compare that to the output from this:

  https://validator.w3.org/nu/?doc=https://accenturefederal.com&out=gnu&level=error

If you also care about warnings, you can omit the “&level=error” parameter:

  https://validator.w3.org/nu/?doc=https://accenturefederal.com&out=gnu

Either way, your test script could simply just check to see if the result
is an empty document. If the result isn’t an empty document, then that
means the checker emitted errors and/or warnings.

  —Mike

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Monday, 27 July 2015 00:37:18 UTC