1Test::RDF::Trine::StoreU(s3e)r Contributed Perl DocumentaTteisotn::RDF::Trine::Store(3)
2
3
4

NAME

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

VERSION

10       This document describes RDF::Trine version 1.019
11

SYNOPSIS

13       For example, to test a Memory store, do something like:
14
15               use Test::RDF::Trine::Store qw(all_store_tests number_of_tests);
16               use Test::More tests => 1 + Test::RDF::Trine::Store::number_of_tests;
17
18               use RDF::Trine qw(iri variable store literal);
19               use RDF::Trine::Store;
20
21               my $data = Test::RDF::Trine::Store::create_data;
22
23               my $store       = RDF::Trine::Store::Memory->temporary_store();
24               isa_ok( $store, 'RDF::Trine::Store::Memory' );
25               Test::RDF::Trine::Store::all_store_tests($store, $data);
26

DESCRIPTION

28       This module packages a few functions that you can call to test a
29       RDF::Trine::Store, also if it is outside of the main RDF-Trine
30       distribution.
31
32       There are different functions that will test different parts of the
33       functionality, but you should run them all at some point, thus for the
34       most part, you would just like to run the "all_store_tests" function
35       for quad stores and "all_triple_store_tests" for triple stores (i.e.
36       stores that doesn't support named graphs).
37
38       All the below functions are exported.
39

FUNCTIONS

41       "number_of_tests"
42           Returns the number of tests run with "all_store_tests".
43
44       "number_of_triple_tests"
45           Returns the number of tests run with "all_triple_store_tests".
46
47       "create_data"
48           Returns a hashref with generated test data nodes to be used by
49           other tests.
50
51       "all_store_tests ($store, $data, $todo, $args)"
52           Will run all available tests for the given store, given the data
53           from "create_data". You may also set a third argument to some true
54           value to mark all tests as TODO in case the store is in
55           development.
56
57           Finally, an $args hashref can be passed. Valid keys are
58           "update_sleep" (see the function with the same name below) and
59           "suppress_dupe_tests" if the store should skip duplicate detection,
60           "quads_unsupported" if the store is a triple store.
61
62       "all_triple_store_tests ($store, $data, $todo, $args)"
63           Will run tests for the given triple store, i.e. a store that only
64           accepts triples, given the data from "create_data". You may also
65           set a third argument to some true value to mark all tests as TODO
66           in case the store is in development.
67
68           For $args, see above.
69
70       "add_quads($store, $args, @quads)"
71           Helper function to add an array of quads to the given store.
72
73       "add_triples($store, $args, @triples)"
74           Helper function to add an array of triples to the given store.
75
76       "contexts_tests( $store, $args )"
77           Testing contexts (aka. "graphs")
78
79       "add_statement_tests_simple( $store, $args, $data->{ex} )"
80           Tests to check add_statement.
81
82       "bulk_add_statement_tests_simple( $store, $args, $data->{ex} )"
83           Tests to check add_statement.
84
85       "literals_tests_simple( $store, $args, $data->{ex})"
86           Tests to check literals support.
87
88       "blank_node_tests_quads( $store, $args, $data->{ex} )"
89           Tests to check blank node support for quads.
90
91       "blank_node_tests_triples( $store, $args, $data->{ex} )"
92           Tests to check blank node support for triples.
93
94       "count_statements_tests_simple( $store, $args,     $data->{ex} )"
95           Tests to check that counts are correct.
96
97       "count_statements_tests_quads( $store, $args, $data->{ex} )"
98           Count statement tests for quads.
99
100       "count_statements_tests_triples( $store, $args, $data->{ex},
101       $data->{nil} )"
102           More tests for counts, with triples.
103
104       "get_statements_tests_triples( $store, $args, $data->{ex} )"
105           Tests for getting statements using triples.
106
107       "get_statements_tests_quads( $store, $args, $data->{ex},
108       $data->{nil} )"
109           Tests for getting statements using quads.
110
111       "get_pattern_tests( $store, $args, $data->{ex} )"
112           Tests for getting statements using with get_pattern.
113
114       "remove_statement_tests( $store, $args, $data->{ex}, @{$data->{names}}
115       );"
116           Tests for removing statements.
117
118       "update_sleep ( \%args )"
119           If $args{ update_sleep } is defined, sleeps for that many seconds.
120           This function is called after update operations to aid in testing
121           stores that perform updates asynchronously.
122

BUGS

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

AUTHOR

128        Gregory Todd Williams <gwilliams@cpan.org> and Kjetil Kjernsmo <kjetilk@cpan.org>
129
130
131
132perl v5.36.0                      2022-07-22        Test::RDF::Trine::Store(3)
Impressum