kasei / attean

A Perl Semantic Web Framework
19 stars 10 forks source link

Tests for stores #109

Closed kjetilk closed 3 years ago

kjetilk commented 7 years ago

It would be very helpful when writing stores to have a fairly comprehensive test suite to verify that the store is sane. I figured it might be helpful to have a separate issue for this referencing issue #98.

There's a start in Test::RDF::Trine::Store, but much work is needed, since Attean's architecture is very different. It should probably be modelled after the roles that can be used to compose the stores, with separate tests for non-mutable vs mutable stores, etc.

kasei commented 3 years ago

I found it very simple to add SPARQL test suite validation to my new AtteanX::Store::LMDB store by simply using a test file which consumed the Test::Attean::SPARQLSuite role and calling run_me.

We might want more store-specific tests to work like this, too, but passing the SPARQL test suite is a good indication that the store has at least the basic functionality working properly.

kasei commented 3 years ago

Given that the original issue description is to "verify that the store is sane", I think the SPARQLSuite test role actually covers this. I'm going to close this as likely resolved, and if there's desire for more comprehensive tests of the store API specifically, this can be re-opened.