Re: [Testing] Feature testing philosophy

I think that is right.  But let's explore a little more deeply.

On Fri, Jul 15, 2016 at 4:35 PM, Cole, Timothy W <t-cole3@illinois.edu>
wrote:

> So currently the bodyResource.json [1] schema in w3c/web-annotation-tests
> conflates together checks to see if the annotation body is correct. An
> annotation passes this schema if the body is any of textualBody, choice or
> set, specific resource, external web resource (string of format uri),
> external web resource with additional properties (json object with at least
> an id key that is a string of uri format). If the body is an array, it
> checks that at least one of the items matches one of the definitions above.
>
>
> If I understand what we need is a separate schema for each of the possible
> body classes in order to report which body class(es) -- i.e., features --
> have been implemented in a given annotation. Easy to do since the
> definitions have been written this way, but just trying to understand how
> these schemas will be used by the test scripts.  So, we end up with:
>
> Schema 1: test for bodyValue
> Schema 2: test for body that is a TextualBody, or for body that is an
> array containing a TextualBody
> Schema 3: test for body that is a SpecificResource, or for body that is an
> array containing a SpecificResource
> Schema 4: test for body that is a Choice, or for body that is an array
> containing a Choice object
> Schema 5: test for body that is a Set, or for body that is an array
> containing a Set
> Schema 6: test for body that is an ExternalWebResource, or for body that
> is an array containing an ExternalWebResource
>
>
I assume that an individual annotation would never have ALL of these.
Because that would be insane, right?

If I am correct in that assumption, and if these various ways of having a
'body' are indeed different features, then there should be a separate test
for each.  I am not really in a position to make that decision.

So, if there are 6 tests, there can be 6 .test files with the JSON schema
embedded, or there can be 6 .test files and 6 .json files that are
referenced.  Those .json files are probably going to rely upon standard
definitions from the definitions directory so they can be pretty simple.

When I create the stubs, I will try to keep that in mind.
-- 
Shane McCarron
Projects Manager, Spec-Ops

Received on Friday, 15 July 2016 22:33:18 UTC