GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEST::RDF::TRINE::STORE (3)

.ds Aq ’

NAME

Test::RDF::Trine::Store - A collection of functions to test RDF::Trine::Stores

CONTENTS

VERSION

This document describes RDF::Trine version 1.014

SYNOPSIS

For example, to test a Memory store, do something like:



        use Test::RDF::Trine::Store qw(all_store_tests number_of_tests);
        use Test::More tests => 1 + Test::RDF::Trine::Store::number_of_tests;

        use RDF::Trine qw(iri variable store literal);
        use RDF::Trine::Store;

        my $data = Test::RDF::Trine::Store::create_data;

        my $store       = RDF::Trine::Store::Memory->temporary_store();
        isa_ok( $store, RDF::Trine::Store::Memory );
        Test::RDF::Trine::Store::all_store_tests($store, $data);



DESCRIPTION

This module packages a few functions that you can call to test a RDF::Trine::Store, also if it is outside of the main RDF-Trine distribution.

There are different functions that will test different parts of the functionality, but you should run them all at some point, thus for the most part, you would just like to run the all_store_tests function for quad stores and all_triple_store_tests for triple stores (i.e. stores that doesn’t support named graphs).

All the below functions are exported.

FUNCTIONS

number_of_tests Returns the number of tests run with all_store_tests.
number_of_triple_tests Returns the number of tests run with all_triple_store_tests.
create_data Returns a hashref with generated test data nodes to be used by other tests.
all_store_tests ($store, $data, $todo, $args) Will run all available tests for the given store, given the data from create_data. You may also set a third argument to some true value to mark all tests as TODO in case the store is in development.

Finally, an $args hashref can be passed. Valid keys are update_sleep (see the function with the same name below) and suppress_dupe_tests if the store should skip duplicate detection, quads_unsupported if the store is a triple store.

all_triple_store_tests ($store, $data, $todo, $args) Will run tests for the given <B>tripleB> store, i.e. a store that only accepts triples, given the data from create_data. You may also set a third argument to some true value to mark all tests as TODO in case the store is in development.

For $args, see above.

add_quads($store, $args, @quads) Helper function to add an array of quads to the given store.
add_triples($store, $args, @triples) Helper function to add an array of triples to the given store.
contexts_tests( $store, $args ) Testing contexts (aka. graphs)
add_statement_tests_simple( $store, $args, $data->{ex} ) Tests to check add_statement.
bulk_add_statement_tests_simple( $store, $args, $data->{ex} ) Tests to check add_statement.
literals_tests_simple( $store, $args, $data->{ex}) Tests to check literals support.
blank_node_tests_quads( $store, $args, $data->{ex} ) Tests to check blank node support for quads.
blank_node_tests_triples( $store, $args, $data->{ex} ) Tests to check blank node support for triples.
count_statements_tests_simple( $store, $args,   $data->{ex} ) Tests to check that counts are correct.
count_statements_tests_quads( $store, $args, $data->{ex} ) Count statement tests for quads.
count_statements_tests_triples( $store, $args, $data->{ex}, $data->{nil} ) More tests for counts, with triples.
get_statements_tests_triples( $store, $args, $data->{ex} ) Tests for getting statements using triples.
get_statements_tests_quads( $store, $args, $data->{ex}, $data->{nil}   ) Tests for getting statements using quads.
get_pattern_tests( $store, $args, $data->{ex} ) Tests for getting statements using with get_pattern.
remove_statement_tests( $store, $args, $data->{ex}, @{$data->{names}} ); Tests for removing statements.
update_sleep ( \%args ) If $args{ update_sleep } is defined, sleeps for that many seconds. This function is called after update operations to aid in testing stores that perform updates asynchronously.

BUGS

Please report any bugs or feature requests to through the GitHub web interface at <https://github.com/kasei/perlrdf/issues>.

AUTHOR



 Gregory Todd Williams <gwilliams@cpan.org> and Kjetil Kjernsmo <kjetilk@cpan.org>



Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEST::RDF::TRINE::STORE (3) 2015-05-17

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.