You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 04-tests.bs
+41-37Lines changed: 41 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -11,39 +11,39 @@ Mailing List Archives: https://lists.w3.org/Archives/Public/public-treecg/
11
11
Editor:
12
12
- Pieter Colpaert, https://pietercolpaert.be
13
13
- Xueying Deng, https://xdxxxdx.github.io/
14
-
Abstract: The TREE Test Specification offers a test plan for Tree Client implementations, enabling implementers to validate their conformance with the TREE Specification. This test specification will be regularly updated to reflect changes and enhancements in the TREE specification.
14
+
Abstract: The TREE Test Specification offers a test plan for TREE Client implementations, enabling implementers to validate their conformance with the TREE Specification. This test specification will be regularly updated to reflect changes and enhancements in the TREE specification.
15
15
</pre>
16
16
# Overview # {#overview}
17
-
This specification targets implementations of TREE client services and outlines a comprehensive suite of test cases to assess their compliance with the TREE specification.
18
-
It covers functional, boundary, error handling, and nonfunctional performance testing.
19
-
Each test case specifies its purpose, input data, expected output, and clear pass/fail criteria.
17
+
This specification targets implementations of TREE clients and outlines a comprehensive suite of test cases to assess their compliance with the TREE specification.
18
+
It covers functional, boundary, error handling, and optional non-functional performance testing.
19
+
Each test case specifies its purpose, input data, expected output, and pass/fail criteria.
### Test Case 1.1.1 : tree client initialization without redirection ### {#test-case-1-1-1-tree-client-initialization}
25
+
### Test Case 1.1.1 : TREE client initialization without redirection ### {#test-case-1-1-1-tree-client-initialization}
26
26
27
-
* **Test Description**: Verify that the client initializes correctly with a Tree Stream endpoint.
27
+
* **Test Description**: Verify that the client initializes correctly with a TREE view endpoint.
28
28
* **Test Prerequisites**:
29
-
* A valid Tree Stream endpoint URL, the URL that is the IRI of the root `tree:Node`, and there is no redirection.
29
+
* A valid TREE view endpoint URL, the URL that is the IRI of the root `tree:Node`, and there is no redirection.
30
30
* The TREE client service is up and running.
31
31
* **Test Steps**:
32
-
1. Initialize the TREE client with the provided Tree Stream endpoint URL.
32
+
1. Initialize the TREE client with the provided TREE view endpoint URL.
33
33
* **Expected Output**: Client initializes without errors and is ready to make requests.
34
34
* **Pass/Fail Criteria**: Pass if the client initializes successfully; fail if any errors occur during initialization.
35
35
36
36
---
37
37
38
-
### Test Case 1.1.2 : tree client initialization with redirection ### {#test-case-1-1-2-tree-client-initialization-redirection}
38
+
### Test Case 1.1.2 : TREE client initialization with redirection ### {#test-case-1-1-2-tree-client-initialization-redirection}
39
39
40
-
* **Test Description**: Verify that the client initializes correctly with a Tree Stream endpoint that involves redirection.
40
+
* **Test Description**: Verify that the client initializes correctly with a TREE view endpoint that involves redirection.
41
41
* **Test Prerequisites**:
42
-
* A valid Tree Stream endpoint URL, the URL leads to the IRI of the root `tree:Node` with one or more HTTP redirections.
42
+
* A valid TREE view endpoint URL, the URL leads to the IRI of the root `tree:Node` with one or more HTTP redirects.
43
43
* The TREE client service is up and running.
44
44
* **Test Steps**:
45
-
1. Initialize the TREE client with the provided Tree Stream endpoint URL.
46
-
* **Expected Output**: Client initializes without errors and is ready to make requests following any redirections as necessary. The final IRI after all HTTP redirects corresponds to the object of a `tree:view` triple linking it to a `tree:Collection`.
45
+
1. Initialize the TREE client with the provided TREE view endpoint URL.
46
+
* **Expected Output**: Client initializes without errors and is ready to make requests following any redirects as necessary. The final IRI after all HTTP redirects corresponds to the object of a `tree:view` triple that links it to a `tree:Collection`.
47
47
* **Pass/Fail Criteria**: Pass if the client initializes successfully; fail if any errors occur during initialization.
48
48
49
49
---
@@ -52,38 +52,40 @@ Each test case specifies its purpose, input data, expected output, and clear pas
52
52
53
53
* **Test Description**: Verify that the client handles invalid initialization parameters gracefully.
54
54
* **Test Prerequisites**:
55
-
* An invalid Tree Stream endpoint URL (e.g., the content is an invalid `tree:Node`).
55
+
* An invalid TREE view endpoint URL (e.g., the content is an invalid `tree:Node`).
56
56
* The TREE client service is up and running.
57
57
* **Test Steps**:
58
-
1. Attempt to initialize the TREE client with the invalid Tree Stream endpoint URL.
58
+
1. Attempt to initialize the TREE client with the invalid TREE view endpoint URL.
59
59
* **Expected Output**: Client returns an appropriate error message indicating why the initialization failed, such as "Invalid `tree:Node`".
60
60
* **Pass/Fail Criteria**: Pass if the client returns an error message; fail if it initializes without an error message.
61
61
62
62
---
63
63
64
-
## Traverse Search Tree ## {#traverse-search-tree}
64
+
## Traversing the TREE ## {#traverse-search-tree}
65
65
66
-
### Test Case 1.2.1 : Retrieve members from a Tree Stream ### {#test-case-1-2-1-retrieve-data-from-a-tree-stream}
66
+
### Test Case 1.2.1 : Retrieve members from a TREE view ### {#test-case-1-2-1-retrieve-data-from-a-tree-stream}
67
67
68
-
* **Test Description**: Verify that the client can successfully retrieve members from a Tree Stream.
68
+
* **Test Description**: Verify that the client can successfully retrieve members from a TREE view.
69
69
* **Test Prerequisites**:
70
-
* A valid Tree Stream endpoint URL with a known number of members.
70
+
* A valid TREE view endpoint URL with a known number of members.
71
71
* The TREE client service is up and running.
72
72
* **Test Steps**:
73
-
1. Initialize the TREE client with the Tree Stream endpoint URL.
73
+
1. Initialize the TREE client with the TREE view endpoint URL.
74
74
2. Wait for the client synchronization to complete.
75
75
3. Collect retrieved members.
76
-
* **Expected Output**: Client retrieves all members from the Tree Stream, and the number of retrieved members matches the expected count.
76
+
* **Expected Output**: Client retrieves all members from the TREE view, and the number of retrieved members matches the expected count.
77
77
* **Pass/Fail Criteria**: Pass if the client retrieves the expected number of members; fail if the count does not match or if any errors occur during retrieval.
The following test cases are optional to implement and depend on the type of relation used in your TREE.
81
83
82
84
### Test Case 1.3.1 : tree:PrefixRelation ### {#test-case-1-3-1-prefix-relation}
83
85
84
86
* **Test Description**: Verify that the client handles `tree:PrefixRelation`.
85
87
* **Test Prerequisites**:
86
-
* A Tree Stream containing a single `tree:PrefixRelation` with a `tree:value` (e.g., `"abc"`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:PrefixRelation` points to a `tree:Node` whose members' `tree:path`'s value all start with `"abc"` consistent with the `STRSTARTS` SPARQL function.
88
+
* A TREE view containing a single `tree:PrefixRelation` with a `tree:value` (e.g., "abc") for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:PrefixRelation` points to a `tree:Node` whose members have `tree:path` values that all start with "abc", consistent with the `STRSTARTS` SPARQL function.
87
89
* The number of members of the TREE is known.
88
90
* **Test Steps**:
89
91
1. Initialize the TREE client.
@@ -98,7 +100,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
98
100
99
101
* **Test Description**: Verify that the client handles `tree:SubstringRelation`.
100
102
* **Test Prerequisites**:
101
-
* A Tree Stream containing a single `tree:SubstringRelation` with a `tree:value` (e.g., `"mid"`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:SubstringRelation` points to a `tree:Node` whose members' `tree:path`'s values all contain `"mid"`, consistent with the `SUBSTR` SPARQL function.
103
+
* A TREE view containing a single `tree:SubstringRelation` with a `tree:value` (e.g., `"mid"`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:SubstringRelation` points to a `tree:Node` whose members have `tree:path` values that all contain `"mid"`, consistent with the `CONTAINS` SPARQL function.
102
104
* The number of members of the TREE is known.
103
105
* **Test Steps**:
104
106
1. Initialize the TREE client.
@@ -113,7 +115,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
113
115
114
116
* **Test Description**: Verify that the client handles `tree:SuffixRelation`.
115
117
* **Test Prerequisites**:
116
-
* A Tree Stream containing a single `tree:SuffixRelation` with a `tree:value` (e.g., `"xyz"`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:SuffixRelation` points to a `tree:Node` whose members' `tree:path`'s values all end with `"xyz"`, consistent with the `STRENDS` SPARQL function.
118
+
* A TREE view containing a single `tree:SuffixRelation` with a `tree:value` (e.g., "xyz") for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:SuffixRelation` points to a `tree:Node` whose members have `tree:path` values that all end with "xyz", consistent with the `STRENDS` SPARQL function.
117
119
* The number of members of the TREE is known.
118
120
* **Test Steps**:
119
121
1. Initialize the TREE client.
@@ -129,7 +131,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
129
131
* **Test Description**: Verify that the client handles `tree:GreaterThanRelation`.
130
132
131
133
* **Test Prerequisites**:
132
-
* A Tree Stream containing a single `tree:GreaterThanRelation` with a `tree:value` (e.g., `10`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:GreaterThanRelation` points to a `tree:Node` whose members' `tree:path`'s values all are greater than `10`.
134
+
* A TREE view containing a single `tree:GreaterThanRelation` with a `tree:value` (e.g., `10`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:GreaterThanRelation` points to a `tree:Node` whose members have `tree:path` values that are all greater than `10`.
133
135
* The number of members of the TREE is known.
134
136
* **Test Steps**:
135
137
1. Initialize the TREE client.
@@ -144,7 +146,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
144
146
145
147
* **Test Description**: Verify that the client handles `tree:GreaterThanOrEqualToRelation`.
146
148
* **Test Prerequisites**:
147
-
* A Tree Stream containing a single `tree:GreaterThanOrEqualToRelation` with a `tree:value` (e.g., `10`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:GreaterThanOrEqualToRelation` points to a `tree:Node` whose members' `tree:path`'s values all are greater than or equal to `10`.
149
+
* A TREE view containing a single `tree:GreaterThanOrEqualToRelation` with a `tree:value` (e.g., `10`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:GreaterThanOrEqualToRelation` points to a `tree:Node` whose members have `tree:path` values that are all greater than or equal to `10`.
148
150
* The number of members of the TREE is known.
149
151
* **Test Steps**:
150
152
1. Initialize the TREE client.
@@ -159,7 +161,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
159
161
160
162
* **Test Description**: Verify that the client handles `tree:LessThanRelation`.
161
163
* **Test Prerequisites**:
162
-
* A Tree Stream containing a single `tree:LessThanRelation` with a `tree:value` (e.g., `20`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:LessThanRelation` points to a `tree:Node` whose members' `tree:path`'s values all are less than `20`.
164
+
* A TREE view containing a single `tree:LessThanRelation` with a `tree:value` (e.g., `20`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:LessThanRelation` points to a `tree:Node` whose members have `tree:path` values that are all less than `20`.
163
165
* The number of members of the TREE is known.
164
166
* **Test Steps**:
165
167
1. Initialize the TREE client.
@@ -170,11 +172,11 @@ Each test case specifies its purpose, input data, expected output, and clear pas
170
172
171
173
---
172
174
173
-
### Test Case 1.3.7 : tree:LessThanOrEqualToRelation ### {#test-case-1-3-7-less-than-equal-relation}
175
+
### Test Case 1.3.7 : tree:LessThanOrEqualToRelation ### {#test-case-1-3-7-less-than-equal-relation}
174
176
175
177
* **Test Description**: Verify that the client handles `tree:LessThanOrEqualToRelation`.
176
178
* **Test Prerequisites**:
177
-
* A Tree Stream containing a single `tree:LessThanOrEqualToRelation` with a `tree:value` (e.g., `20`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:LessThanOrEqualToRelation` points to a `tree:Node` whose members' `tree:path`'s values all are less than or equal to `20`.
179
+
* A TREE view containing a single `tree:LessThanOrEqualToRelation` with a `tree:value` (e.g., `20`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:LessThanOrEqualToRelation` points to a `tree:Node` whose members have `tree:path` values that are all less than or equal to `20`.
178
180
* The number of members of the TREE is known.
179
181
* **Test Steps**:
180
182
1. Initialize the TREE client.
@@ -189,7 +191,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
189
191
190
192
* **Test Description**: Verify that the client handles `tree:EqualToRelation`.
191
193
* **Test Prerequisites**:
192
-
* A Tree Stream containing a single `tree:EqualToRelation` with a `tree:value` (e.g., `15`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:EqualToRelation` points to a `tree:Node` whose members' `tree:path`'s values are all equal to `15`.
194
+
* A TREE view containing a single `tree:EqualToRelation` with a `tree:value` (e.g., `15`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:EqualToRelation` points to a `tree:Node` whose members have `tree:path` values that are all equal to `15`.
193
195
* The number of members of the TREE is known.
194
196
* **Test Steps**:
195
197
1. Initialize the TREE client.
@@ -204,7 +206,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
204
206
205
207
* **Test Description**: Verify that the client handles `tree:NotEqualToRelation`.
206
208
* **Test Prerequisites**:
207
-
* A Tree Stream containing a single `tree:NotEqualToRelation` with a `tree:value` (e.g., `14`) for a specific `tree:path`. This short Tree Stream has only one `tree:Relation`: the `tree:NotEqualToRelation` points to a `tree:Node` whose members' `tree:path`'s values are all not equal to `14`.
209
+
* A TREE view containing a single `tree:NotEqualToRelation` with a `tree:value` (e.g., `14`) for a specific `tree:path`. This TREE view has only one `tree:Relation`: the `tree:NotEqualToRelation` points to a `tree:Node` whose members have `tree:path` values that are all not equal to `14`.
208
210
* The number of members of the TREE is known.
209
211
* **Test Steps**:
210
212
1. Initialize the TREE client.
@@ -221,7 +223,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
221
223
222
224
* **Test Description**: Verify client behavior when a node has no members.
223
225
* **Test Prerequisites**:
224
-
* A Tree Stream endpoint only linking to an empty `tree:Node`.
226
+
* A TREE view endpoint only linking to an empty `tree:Node`.
225
227
* **Test Steps**:
226
228
1. Initialize the TREE client.
227
229
2. Traverse to the empty node.
@@ -234,7 +236,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
234
236
235
237
* **Test Description**: Verify client behavior when relations form a circular loop.
236
238
* **Test Prerequisites**:
237
-
* A Tree Stream endpoint with circular relation between nodes.
239
+
* A TREE view endpoint with a circular relation between nodes.
238
240
* **Test Steps**:
239
241
1. Initialize the TREE client.
240
242
2. Traverse the graph.
@@ -247,7 +249,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
247
249
248
250
* **Test Description**: Verify client behavior when relation value is malformed (e.g., string instead of number).
249
251
* **Test Prerequisites**:
250
-
* A Tree Stream endpoint with invalid relation definition.
252
+
* A TREE view endpoint with invalid relation definition.
251
253
* **Test Steps**:
252
254
1. Initialize the TREE client.
253
255
2. Traverse the malformed relation.
@@ -259,9 +261,11 @@ Each test case specifies its purpose, input data, expected output, and clear pas
259
261
260
262
## Non-Functional Testing ## {#non-functional}
261
263
264
+
The following tests are optional to implement and should align with the non-functional requirements of your implementation. This section is provided for suggestion purposes only.
265
+
262
266
### Test Case 1.5.1 : Performance under load ### {#test-case-1-5-1-performance}
263
267
264
-
* **Test Description**: Verify client performance when traversing a large Tree Stream.
268
+
* **Test Description**: Verify client performance when traversing a large TREE view.
265
269
* **Test Prerequisites**:
266
270
* Endpoint with ≥ 10,000 members.
267
271
* **Test Steps**:
@@ -276,7 +280,7 @@ Each test case specifies its purpose, input data, expected output, and clear pas
276
280
277
281
* **Test Description**: Verify client scalability with increasing members and relations.
278
282
* **Test Prerequisites**:
279
-
* Endpoint with multiple large fragments and complex relations, please refer to [ldes-registry](https://imec-int.github.io/ldes-registry/dashboard.html) for example endpoints.
283
+
* Endpoint with multiple large fragments and complex relations; refer to [ldes-registry](https://imec-int.github.io/ldes-registry/dashboard.html) for example endpoints.
0 commit comments