From c74a3bd9a6ad17dcdd98974d9b0420b2985cac87 Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Fri, 10 Aug 2018 21:00:36 +0200 Subject: [PATCH 1/7] 5 first protocol tests w3c/rdf-tests#51 --- sparql11/data-sparql11/protocol/manifest.ttl | 117 +++++---- .../query_dataset_default_graphs_get.jmx | 204 ++++++++++++++++ .../query_dataset_default_graphs_post.jmx | 226 ++++++++++++++++++ .../query_dataset_named_graphs_get.jmx | 221 +++++++++++++++++ .../query_dataset_named_graphs_post.jmx | 226 ++++++++++++++++++ .../protocol/query_post_form.jmx | 175 ++++++++++++++ 6 files changed, 1129 insertions(+), 40 deletions(-) create mode 100644 sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx create mode 100644 sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx create mode 100644 sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx create mode 100644 sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx create mode 100644 sparql11/data-sparql11/protocol/query_post_form.jmx diff --git a/sparql11/data-sparql11/protocol/manifest.ttl b/sparql11/data-sparql11/protocol/manifest.ttl index 407ecece..a3ac7656 100644 --- a/sparql11/data-sparql11/protocol/manifest.ttl +++ b/sparql11/data-sparql11/protocol/manifest.ttl @@ -57,7 +57,7 @@ Content-Length: XXX query=ASK%20%7B%7D - + #### Response 2xx or 3xx response @@ -65,10 +65,14 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . + + + :query_dataset_default_graphs_get rdf:type mf:ProtocolTest ; mf:name "GET query with protocol-specified default graph" ; rdfs:comment """ @@ -77,7 +81,7 @@ GET /sparql?query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf Host: www.example User-agent: sparql-client/0.1 - + #### Response 2xx or 3xx response @@ -85,6 +89,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -101,7 +106,7 @@ Content-Length: XXX ASK { ?p ?o . ?p ?o } - + #### Response 2xx or 3xx response @@ -109,6 +114,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -125,7 +131,7 @@ Content-Length: XXX ASK { GRAPH ?g { ?s ?p ?o } } - + #### Response 2xx or 3xx response @@ -133,6 +139,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -145,7 +152,7 @@ GET /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 - + #### Response 2xx or 3xx response @@ -153,6 +160,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -169,7 +177,7 @@ Content-Length: XXX SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } } - + #### Response 2xx or 3xx response @@ -177,6 +185,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -193,7 +202,7 @@ Content-Length: XXX ASK FROM { ?p ?o } - + #### Response 2xx or 3xx response @@ -201,6 +210,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -211,7 +221,7 @@ #### Request GET /sparql?query=ASK%20%7B%7D - + #### Response 2xx or 3xx response @@ -219,6 +229,7 @@ true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -235,12 +246,13 @@ Content-Length: XXX SELECT (1 AS ?value) {} - + #### Response 2xx or 3xx response Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -257,12 +269,13 @@ Content-Length: XXX ASK {} - + #### Response 2xx or 3xx response Content-Type: application/sparql-results+xml or application/sparql-results+json """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -279,12 +292,13 @@ Content-Length: XXX DESCRIBE - + #### Response 2xx or 3xx response Content-Type: application/rdf+xml, application/rdf+json or text/turtle """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -301,12 +315,13 @@ Content-Length: XXX CONSTRUCT {

1 } WHERE {} - + #### Response 2xx or 3xx response Content-Type: application/rdf+xml, application/rdf+json or text/turtle """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -338,7 +353,7 @@ WHERE { ?s a foaf:Document } - + #### Response 2xx or 3xx response @@ -364,9 +379,10 @@ followed by 2xx or 3xx response Content-Type: application/sparql-results+xml - + true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -398,7 +414,7 @@ followed by WHERE { ?s a foaf:Document } - + #### Response 2xx or 3xx response @@ -430,9 +446,10 @@ followed by 2xx or 3xx response Content-Type: application/sparql-results+xml - + true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -466,7 +483,7 @@ followed by ?s a foaf:Document } } - + #### Response 2xx or 3xx response @@ -498,9 +515,10 @@ followed by 2xx or 3xx response Content-Type: application/sparql-results+xml - + true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -540,7 +558,7 @@ followed by BIND("default" AS ?in) } } - + #### Response 2xx or 3xx response @@ -572,9 +590,10 @@ followed by 2xx or 3xx response Content-Type: application/sparql-results+xml - + true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -591,11 +610,12 @@ followed by Content-Length: XXX update=CLEAR%20ALL - + #### Response 2xx or 3xx response """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -612,11 +632,12 @@ followed by Content-Length: XXX CLEAR ALL - + #### Response 2xx or 3xx response """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -634,7 +655,7 @@ followed by CLEAR GRAPH ; INSERT DATA { GRAPH { } } - + #### Response 2xx or 3xx response @@ -658,9 +679,10 @@ followed by 2xx or 3xx response Content-Type: application/sparql-results+xml - + one result with `?o` bound to an IRI that is _not_ `` """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -677,7 +699,7 @@ followed by Content-Length: XXX ASK {} - + #### Response 2xx or 3xx response @@ -685,6 +707,7 @@ followed by true """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -694,12 +717,13 @@ followed by rdfs:comment """ #### Request - PUT /sparql?query=ASK%20%7B%7D - + PUT /sparql?query=ASK%20%7B%7D + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -710,11 +734,12 @@ followed by #### Request GET /sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -731,11 +756,12 @@ followed by Content-Length: XXX ASK {} - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -751,11 +777,12 @@ followed by Content-Length: XXX query=ASK%20%7B%7D - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -771,11 +798,12 @@ followed by Content-Length: XXX ASK {} - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -794,11 +822,12 @@ followed by Content-Length: XXX ASK {} - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -809,11 +838,12 @@ followed by #### Request GET /sparql?query=ASK%20%7B - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -824,11 +854,12 @@ followed by #### Request GET /sparql?update=CLEAR%20ALL - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -845,11 +876,12 @@ followed by Content-Length: XXX update=CLEAR%20NAMED&update=CLEAR%20DEFAULT - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -866,11 +898,12 @@ followed by Content-Length: XXX CLEAR NAMED - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -886,11 +919,12 @@ followed by Content-Length: XXX update=CLEAR%20NAMED - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -909,11 +943,12 @@ followed by Content-Length: XXX CLEAR NAMED - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -930,11 +965,12 @@ followed by Content-Length: XXX update=CLEAR%20XYZ - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -951,11 +987,12 @@ followed by Content-Length: XXX using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%09%09PREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%09%09WITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0A%09%09DELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0A%09%09INSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0A%09%09WHERE%20%7B%0A%09%09%09%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%09%09%7D%0A - + #### Response 4xx """ ; + mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . diff --git a/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx new file mode 100644 index 00000000..bdcdea03 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx @@ -0,0 +1,204 @@ + + + + + #### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + query=ASK%20%7B%7D + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + + + false + ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql + GET + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 16 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx new file mode 100644 index 00000000..3d826ef3 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx @@ -0,0 +1,226 @@ + + + + + #### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + query=ASK%20%7B%7D + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + ASK { <http://kasei.us/2009/09/sparql/data/data1.rdf> ?p ?o . <http://kasei.us/2009/09/sparql/data/data2.rdf> ?p ?o } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 16 + + + + + + true + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx new file mode 100644 index 00000000..e5398cc7 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx @@ -0,0 +1,221 @@ + + + + + #### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + query=ASK%20%7B%7D + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + + + true + + + + false + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D + GET + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 16 + + + + + + true + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx new file mode 100644 index 00000000..fb3fd6ff --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx @@ -0,0 +1,226 @@ + + + + + #### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + query=ASK%20%7B%7D + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + ASK { GRAPH ?g { ?s ?p ?o } } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 16 + + + + + + true + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_post_form.jmx b/sparql11/data-sparql11/protocol/query_post_form.jmx new file mode 100644 index 00000000..1559caf4 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_post_form.jmx @@ -0,0 +1,175 @@ + + + + + #### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + query=ASK%20%7B%7D + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + true + + + + false + query=ASK%20%7B%7D + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 16 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + From aa0083575be1f72c04e6b0eecf9f3a05611fe28c Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Sat, 11 Aug 2018 10:17:49 +0200 Subject: [PATCH 2/7] Fix result in query_dataset_full, add its jmx and fix the comments in all jmeter's files w3c/rdf-tests#51 --- sparql11/data-sparql11/protocol/manifest.ttl | 2 +- .../query_dataset_default_graphs_get.jmx | 8 +- .../query_dataset_default_graphs_post.jmx | 12 +- .../protocol/query_dataset_full.jmx | 228 ++++++++++++++++++ .../query_dataset_named_graphs_get.jmx | 10 +- .../query_dataset_named_graphs_post.jmx | 10 +- 6 files changed, 245 insertions(+), 25 deletions(-) create mode 100644 sparql11/data-sparql11/protocol/query_dataset_full.jmx diff --git a/sparql11/data-sparql11/protocol/manifest.ttl b/sparql11/data-sparql11/protocol/manifest.ttl index a3ac7656..4ef2e50f 100644 --- a/sparql11/data-sparql11/protocol/manifest.ttl +++ b/sparql11/data-sparql11/protocol/manifest.ttl @@ -183,7 +183,7 @@ 2xx or 3xx response Content-Type: application/sparql-results+xml or application/sparql-results+json - true + Contains SPARQL results for variables g x s """ ; mf:action ; dawgt:approval dawgt:Approved ; diff --git a/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx index bdcdea03..179c34ae 100644 --- a/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx +++ b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_get.jmx @@ -1,16 +1,12 @@ - + #### Request - POST /sparql/ HTTP/1.1 + GET /sparql?query=ASK%20%7B%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf%3E%20a%20%3Ftype%20.%20%3Chttp%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf%3E%20a%20%3Ftype%20.%20%7D&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf Host: www.example User-agent: sparql-client/0.1 - Content-Type: application/x-www-url-form-urlencoded - Content-Length: XXX - - query=ASK%20%7B%7D #### Response diff --git a/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx index 3d826ef3..fc34df98 100644 --- a/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx +++ b/sparql11/data-sparql11/protocol/query_dataset_default_graphs_post.jmx @@ -1,16 +1,16 @@ - + #### Request - POST /sparql/ HTTP/1.1 + POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 - Content-Type: application/x-www-url-form-urlencoded + Content-Type: application/sparql-query Content-Length: XXX - query=ASK%20%7B%7D + ASK { <http://kasei.us/2009/09/sparql/data/data1.rdf> ?p ?o . <http://kasei.us/2009/09/sparql/data/data2.rdf> ?p ?o } #### Response @@ -57,7 +57,7 @@ - stoptest + continue false 1 @@ -186,7 +186,7 @@ if(Failure){ - true + false saveConfig diff --git a/sparql11/data-sparql11/protocol/query_dataset_full.jmx b/sparql11/data-sparql11/protocol/query_dataset_full.jmx new file mode 100644 index 00000000..54e268e7 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_dataset_full.jmx @@ -0,0 +1,228 @@ + + + + + #### Request + + POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + Contains SPARQL results for variables g x s + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + g + x + s + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx index e5398cc7..a739dbab 100644 --- a/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx +++ b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_get.jmx @@ -1,16 +1,12 @@ - + #### Request - POST /sparql/ HTTP/1.1 + GET /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 - Content-Type: application/x-www-url-form-urlencoded - Content-Length: XXX - - query=ASK%20%7B%7D #### Response @@ -181,7 +177,7 @@ if(Failure){ - true + false saveConfig diff --git a/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx index fb3fd6ff..0cedcd1e 100644 --- a/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx +++ b/sparql11/data-sparql11/protocol/query_dataset_named_graphs_post.jmx @@ -1,16 +1,16 @@ - + #### Request - POST /sparql/ HTTP/1.1 + POST /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 - Content-Type: application/x-www-url-form-urlencoded + Content-Type: application/sparql-query Content-Length: XXX - query=ASK%20%7B%7D + ASK { GRAPH ?g { ?s ?p ?o } } #### Response @@ -186,7 +186,7 @@ if(Failure){ - true + false saveConfig From 74dcbd0e817385622e5a14ef7175a20fe32a12c2 Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Sat, 11 Aug 2018 14:45:46 +0200 Subject: [PATCH 3/7] All protocol tests implemented exactly as indicated by their descriptions in the manifest w3c/rdf-tests#51 --- .../protocol/bad_multiple_queries.jmx | 176 ++++++++ .../protocol/bad_multiple_updates.jmx | 183 +++++++++ .../protocol/bad_query_method.jmx | 176 ++++++++ .../bad_query_missing_direct_type.jmx | 182 ++++++++ .../protocol/bad_query_missing_form_type.jmx | 224 ++++++++++ .../protocol/bad_query_non_utf8.jmx | 185 +++++++++ .../protocol/bad_query_syntax.jmx | 177 ++++++++ .../protocol/bad_query_wrong_media_type.jmx | 183 +++++++++ .../protocol/bad_update_dataset_conflict.jmx | 183 +++++++++ .../data-sparql11/protocol/bad_update_get.jmx | 177 ++++++++ .../protocol/bad_update_missing_form_type.jmx | 182 ++++++++ .../protocol/bad_update_non_utf8.jmx | 185 +++++++++ .../protocol/bad_update_syntax.jmx | 183 +++++++++ .../protocol/bad_update_wrong_media_type.jmx | 183 +++++++++ .../protocol/query_content_type_ask.jmx | 225 ++++++++++ .../protocol/query_content_type_construct.jmx | 226 ++++++++++ .../protocol/query_content_type_describe.jmx | 226 ++++++++++ .../protocol/query_content_type_select.jmx | 229 +++++++++++ sparql11/data-sparql11/protocol/query_get.jmx | 220 ++++++++++ .../protocol/query_multiple_dataset.jmx | 226 ++++++++++ .../protocol/query_post_direct.jmx | 227 ++++++++++ .../protocol/update_base_uri.jmx | 329 +++++++++++++++ .../protocol/update_dataset_default_graph.jmx | 358 ++++++++++++++++ .../update_dataset_default_graphs.jmx | 370 +++++++++++++++++ .../protocol/update_dataset_full.jmx | 388 ++++++++++++++++++ .../protocol/update_dataset_named_graphs.jmx | 376 +++++++++++++++++ .../protocol/update_post_direct.jmx | 224 ++++++++++ .../protocol/update_post_form.jmx | 226 ++++++++++ 28 files changed, 6429 insertions(+) create mode 100644 sparql11/data-sparql11/protocol/bad_multiple_queries.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_multiple_updates.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_query_method.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_query_missing_direct_type.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_query_missing_form_type.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_query_non_utf8.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_query_syntax.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_query_wrong_media_type.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_update_dataset_conflict.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_update_get.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_update_missing_form_type.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_update_non_utf8.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_update_syntax.jmx create mode 100644 sparql11/data-sparql11/protocol/bad_update_wrong_media_type.jmx create mode 100644 sparql11/data-sparql11/protocol/query_content_type_ask.jmx create mode 100644 sparql11/data-sparql11/protocol/query_content_type_construct.jmx create mode 100644 sparql11/data-sparql11/protocol/query_content_type_describe.jmx create mode 100644 sparql11/data-sparql11/protocol/query_content_type_select.jmx create mode 100644 sparql11/data-sparql11/protocol/query_get.jmx create mode 100644 sparql11/data-sparql11/protocol/query_multiple_dataset.jmx create mode 100644 sparql11/data-sparql11/protocol/query_post_direct.jmx create mode 100644 sparql11/data-sparql11/protocol/update_base_uri.jmx create mode 100644 sparql11/data-sparql11/protocol/update_dataset_default_graph.jmx create mode 100644 sparql11/data-sparql11/protocol/update_dataset_default_graphs.jmx create mode 100644 sparql11/data-sparql11/protocol/update_dataset_full.jmx create mode 100644 sparql11/data-sparql11/protocol/update_dataset_named_graphs.jmx create mode 100644 sparql11/data-sparql11/protocol/update_post_direct.jmx create mode 100644 sparql11/data-sparql11/protocol/update_post_form.jmx diff --git a/sparql11/data-sparql11/protocol/bad_multiple_queries.jmx b/sparql11/data-sparql11/protocol/bad_multiple_queries.jmx new file mode 100644 index 00000000..28c8b2cb --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_multiple_queries.jmx @@ -0,0 +1,176 @@ + + + + + invoke query operation with more than one query string +#### Request + + GET /sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?query=ASK%20%7B%7D&query=SELECT%20%2A%20%7B%7D + GET + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_multiple_updates.jmx b/sparql11/data-sparql11/protocol/bad_multiple_updates.jmx new file mode 100644 index 00000000..2e5e1142 --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_multiple_updates.jmx @@ -0,0 +1,183 @@ + + + + + Invoke update operation with more than one update string + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + update=CLEAR%20NAMED&update=CLEAR%20DEFAULT + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/x-www-url-form-urlencoded + + + + + + true + + + + false + update=CLEAR%20NAMED&update=CLEAR%20DEFAULT + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_query_method.jmx b/sparql11/data-sparql11/protocol/bad_query_method.jmx new file mode 100644 index 00000000..bb978bad --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_query_method.jmx @@ -0,0 +1,176 @@ + + + + + invoke query operation with a method other than GET or POST +#### Request + + PUT /sparql?query=ASK%20%7B%7D + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?query=ASK%20%7B%7D + PUT + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_query_missing_direct_type.jmx b/sparql11/data-sparql11/protocol/bad_query_missing_direct_type.jmx new file mode 100644 index 00000000..d47e6956 --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_query_missing_direct_type.jmx @@ -0,0 +1,182 @@ + + + + + Invoke query operation with SPARQL body, but without application/sparql-query media type + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Length: XXX + + ASK {} + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + ASK {} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_query_missing_form_type.jmx b/sparql11/data-sparql11/protocol/bad_query_missing_form_type.jmx new file mode 100644 index 00000000..932d480c --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_query_missing_form_type.jmx @@ -0,0 +1,224 @@ + + + + + Invoke query operation with url-encoded body, but without application/x-www-url-form-urlencoded media type + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Length: XXX + + query=ASK%20%7B%7D + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + query=ASK%20%7B%7D + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_query_non_utf8.jmx b/sparql11/data-sparql11/protocol/bad_query_non_utf8.jmx new file mode 100644 index 00000000..feca239c --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_query_non_utf8.jmx @@ -0,0 +1,185 @@ + + + + + invoke query operation with direct POST, but with a non-UTF8 encoding (UTF-16) + +(content body encoded in utf-16) + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query; charset=UTF-16 + Content-Length: XXX + + ASK {} + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query; charset=UTF-16 + + + + + + true + + + + false + ASK {} + = + + + + ${HOSTNAME} + ${PORT} + + UTF-16 + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_query_syntax.jmx b/sparql11/data-sparql11/protocol/bad_query_syntax.jmx new file mode 100644 index 00000000..bc3be9de --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_query_syntax.jmx @@ -0,0 +1,177 @@ + + + + + invoke query operation with invalid query syntax (4XX result) + +#### Request + + GET /sparql?query=ASK%20%7B + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?query=ASK%20%7B + GET + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_query_wrong_media_type.jmx b/sparql11/data-sparql11/protocol/bad_query_wrong_media_type.jmx new file mode 100644 index 00000000..4d3621a9 --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_query_wrong_media_type.jmx @@ -0,0 +1,183 @@ + + + + + invoke query operation with a POST with media type that's not url-encoded or application/sparql-query + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: text/plain + Content-Length: XXX + + ASK {} + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + text/plain + + + + + + true + + + + false + ASK {} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_update_dataset_conflict.jmx b/sparql11/data-sparql11/protocol/bad_update_dataset_conflict.jmx new file mode 100644 index 00000000..410920f0 --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_update_dataset_conflict.jmx @@ -0,0 +1,183 @@ + + + + + invoke update with both using-graph-uri/using-named-graph-uri parameter and USING/WITH clause + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%09%09PREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%09%09WITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0A%09%09DELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0A%09%09INSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0A%09%09WHERE%20%7B%0A%09%09%09%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%09%09%7D%0A + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/x-www-url-form-urlencoded + + + + + + true + + + + false + using-named-graph-uri=http%3A%2F%2Fexample%2Fpeople&update=%09%09PREFIX%20foaf%3A%20%20%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%09%09WITH%20%3Chttp%3A%2F%2Fexample%2Faddresses%3E%0A%09%09DELETE%20%7B%20%3Fperson%20foaf%3AgivenName%20%27Bill%27%20%7D%0A%09%09INSERT%20%7B%20%3Fperson%20foaf%3AgivenName%20%27William%27%20%7D%0A%09%09WHERE%20%7B%0A%09%09%09%3Fperson%20foaf%3AgivenName%20%27Bill%27%0A%09%09%7D%0A + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_update_get.jmx b/sparql11/data-sparql11/protocol/bad_update_get.jmx new file mode 100644 index 00000000..ea456afb --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_update_get.jmx @@ -0,0 +1,177 @@ + + + + + invoke update operation with GET + +#### Request + + GET /sparql?update=CLEAR%20ALL + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?update=CLEAR%20ALL + GET + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_update_missing_form_type.jmx b/sparql11/data-sparql11/protocol/bad_update_missing_form_type.jmx new file mode 100644 index 00000000..be06cd61 --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_update_missing_form_type.jmx @@ -0,0 +1,182 @@ + + + + + Invoke update operation with url-encoded body, but without application/x-www-url-form-urlencoded media type + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Length: XXX + + update=CLEAR%20NAMED + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + update=CLEAR%20NAMED + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_update_non_utf8.jmx b/sparql11/data-sparql11/protocol/bad_update_non_utf8.jmx new file mode 100644 index 00000000..1a34192f --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_update_non_utf8.jmx @@ -0,0 +1,185 @@ + + + + + invoke update operation with direct POST, but with a non-UTF8 encoding + +(content body encoded in utf-16) + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update; charset=UTF-16 + Content-Length: XXX + + CLEAR NAMED + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update; charset=UTF-16 + + + + + + true + + + + false + CLEAR NAMED + = + + + + ${HOSTNAME} + ${PORT} + + UTF-16 + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_update_syntax.jmx b/sparql11/data-sparql11/protocol/bad_update_syntax.jmx new file mode 100644 index 00000000..5a65c1fa --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_update_syntax.jmx @@ -0,0 +1,183 @@ + + + + + invoke update operation with invalid update syntax + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + update=CLEAR%20XYZ + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/x-www-url-form-urlencoded + + + + + + true + + + + false + update=CLEAR%20XYZ + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/bad_update_wrong_media_type.jmx b/sparql11/data-sparql11/protocol/bad_update_wrong_media_type.jmx new file mode 100644 index 00000000..c14c3136 --- /dev/null +++ b/sparql11/data-sparql11/protocol/bad_update_wrong_media_type.jmx @@ -0,0 +1,183 @@ + + + + + invoke update operation with a POST with media type that's not url-encoded or application/sparql-update + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: text/plain + Content-Length: XXX + + CLEAR NAMED + +#### Response + + 4xx + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + text/plain + + + + + + true + + + + false + CLEAR NAMED + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + 4[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + true + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_content_type_ask.jmx b/sparql11/data-sparql11/protocol/query_content_type_ask.jmx new file mode 100644 index 00000000..1a601933 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_content_type_ask.jmx @@ -0,0 +1,225 @@ + + + + + query appropriate content type (expect one of: XML, JSON) +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + ASK {} + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + ASK {} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_content_type_construct.jmx b/sparql11/data-sparql11/protocol/query_content_type_construct.jmx new file mode 100644 index 00000000..3fb2d703 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_content_type_construct.jmx @@ -0,0 +1,226 @@ + + + + + query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa) +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + CONSTRUCT { <s> <p> 1 } WHERE {} + +#### Response + + 2xx or 3xx response + Content-Type: application/rdf+xml, application/rdf+json or text/turtle + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + CONSTRUCT { <s> <p> 1 } WHERE {} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/rdf+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/rdf+json")|| + StringUtils.contains(new String(ResponseHeaders), "Content-Type: text/turtle")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/rdf+xml, application/rdf+json or text/turtle \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_content_type_describe.jmx b/sparql11/data-sparql11/protocol/query_content_type_describe.jmx new file mode 100644 index 00000000..722ee479 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_content_type_describe.jmx @@ -0,0 +1,226 @@ + + + + + query appropriate content type (expect one of: RDF/XML, Turtle, N-Triples, RDFa) +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + DESCRIBE <http://example.org/> + +#### Response + + 2xx or 3xx response + Content-Type: application/rdf+xml, application/rdf+json or text/turtle + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + DESCRIBE <http://example.org/> + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/rdf+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/rdf+json")|| + StringUtils.contains(new String(ResponseHeaders), "Content-Type: text/turtle")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/rdf+xml, application/rdf+json or text/turtle \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_content_type_select.jmx b/sparql11/data-sparql11/protocol/query_content_type_select.jmx new file mode 100644 index 00000000..24fadcc2 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_content_type_select.jmx @@ -0,0 +1,229 @@ + + + + + #### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + SELECT (1 AS ?value) {} + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + SELECT (1 AS ?value) {} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: text/tab-separated-values") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: text/csv") + ); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + + + false + + + + + 1 + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_get.jmx b/sparql11/data-sparql11/protocol/query_get.jmx new file mode 100644 index 00000000..f9cf11c9 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_get.jmx @@ -0,0 +1,220 @@ + + + + + #### Request + + GET /sparql?query=ASK%20%7B%7D + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?query=ASK%20%7B%7D + GET + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_multiple_dataset.jmx b/sparql11/data-sparql11/protocol/query_multiple_dataset.jmx new file mode 100644 index 00000000..054e3aa5 --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_multiple_dataset.jmx @@ -0,0 +1,226 @@ + + + + + #### Request + + POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + ASK FROM <http://kasei.us/2009/09/sparql/data/data1.rdf> { <data1.rdf> ?p ?o } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + ASK FROM <http://kasei.us/2009/09/sparql/data/data1.rdf> { <data1.rdf> ?p ?o } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/query_post_direct.jmx b/sparql11/data-sparql11/protocol/query_post_direct.jmx new file mode 100644 index 00000000..ed66ce4a --- /dev/null +++ b/sparql11/data-sparql11/protocol/query_post_direct.jmx @@ -0,0 +1,227 @@ + + + + + query via POST directly +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Content-Length: XXX + + ASK {} + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml or application/sparql-results+json + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + true + + + + false + ASK {} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_base_uri.jmx b/sparql11/data-sparql11/protocol/update_base_uri.jmx new file mode 100644 index 00000000..a8a9b0ba --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_base_uri.jmx @@ -0,0 +1,329 @@ + + + + + test for service-defined BASE URI (which MAY be the service endpoint) +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update + Content-Length: XXX + + CLEAR GRAPH <http://example.org/protocol-base-test/> ; + INSERT DATA { GRAPH <http://example.org/protocol-base-test/> { <http://example.org/s> <http://example.org/p> <test> } } + +#### Response + + 2xx or 3xx response + +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-query + Accept: application/sparql-results+xml + Content-Length: XXX + + SELECT ?o WHERE { + GRAPH <http://example.org/protocol-base-test/> { + <http://example.org/s> <http://example.org/p> ?o + } + } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml + + one result with `?o` bound to an IRI that is _not_ `<test>` + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update + + + + + + true + + + + false + CLEAR GRAPH <http://example.org/protocol-base-test/> ; +INSERT DATA { GRAPH <http://example.org/protocol-base-test/> { <http://example.org/s> <http://example.org/p> <test> } } + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + + Content-Type + application/sparql-query + + + Accept + application/sparql-results+xml + + + + + + true + + + + false + SELECT ?o WHERE { + GRAPH <http://example.org/protocol-base-test/> { + <http://example.org/s> <http://example.org/p> ?o + } +} + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml\n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + <uri>test</uri> + + + Assertion.response_data + false + 6 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_dataset_default_graph.jmx b/sparql11/data-sparql11/protocol/update_dataset_default_graph.jmx new file mode 100644 index 00000000..b16af566 --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_dataset_default_graph.jmx @@ -0,0 +1,358 @@ + + + + + update with protocol-specified default graph +#### Request + + POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update + Content-Length: XXX + + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document + } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-test/> { + ?s a dc:BibliographicResource + } + } + WHERE { + ?s a foaf:Document + } + +#### Response + + 2xx or 3xx response + +followed by + +#### Request + + POST /sparql HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Accept: application/sparql-results+xml + Content-Type: application/sparql-query + Content-Length: XXX + + ASK { + GRAPH <http://example.org/protocol-update-dataset-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> + } + } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update + + + + + + true + + + + false + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document + } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-test/> { + ?s a dc:BibliographicResource + } + } + WHERE { + ?s a foaf:Document + } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + + Content-Type + application/sparql-query + + + Accept + application/sparql-results+xml + + + + + + true + + + + false + ASK { + GRAPH <http://example.org/protocol-update-dataset-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> + } + } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml\n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_dataset_default_graphs.jmx b/sparql11/data-sparql11/protocol/update_dataset_default_graphs.jmx new file mode 100644 index 00000000..2f854b08 --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_dataset_default_graphs.jmx @@ -0,0 +1,370 @@ + + + + + update with protocol-specified default graphs +#### Request + + POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update + Content-Length: XXX + + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-graphs-test/> { + ?s a dc:BibliographicResource + } + } + WHERE { + ?s a foaf:Document + } + +#### Response + + 2xx or 3xx response + +followed by + +#### Request + + POST /sparql HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Accept: application/sparql-results+xml + Content-Type: application/sparql-query + Content-Length: XXX + + ASK { + GRAPH <http://example.org/protocol-update-dataset-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + FILTER NOT EXISTS { + GRAPH <http://example.org/protocol-update-dataset-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + } + } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update + + + + + + true + + + + false + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-graphs-test/> { + ?s a dc:BibliographicResource + } + } + WHERE { + ?s a foaf:Document + } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + + Content-Type + application/sparql-query + + + Accept + application/sparql-results+xml + + + + + + true + + + + false + ASK { + GRAPH <http://example.org/protocol-update-dataset-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + FILTER NOT EXISTS { + GRAPH <http://example.org/protocol-update-dataset-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + } + } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml\n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_dataset_full.jmx b/sparql11/data-sparql11/protocol/update_dataset_full.jmx new file mode 100644 index 00000000..c49527c8 --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_dataset_full.jmx @@ -0,0 +1,388 @@ + + + + + update with protocol-specified dataset (both named and default graphs) +#### Request + + POST /sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update + Content-Length: XXX + + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-full-test/> { + ?s <http://example.org/in> ?in + } + } + WHERE { + { + GRAPH ?g { ?s a foaf:Document } + BIND(?g AS ?in) + } + UNION + { + ?s a foaf:Document . + BIND("default" AS ?in) + } + } + +#### Response + + 2xx or 3xx response + +followed by + +#### Request + + POST /sparql HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Accept: application/sparql-results+xml + Content-Type: application/sparql-query + Content-Length: XXX + + ASK { + GRAPH <http://example.org/protocol-update-dataset-full-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> <http://example.org/in> "default" . + <http://kasei.us/2009/09/sparql/data/data2.rdf> <http://example.org/in> <http://kasei.us/2009/09/sparql/data/data2.rdf> . + } + FILTER NOT EXISTS { + GRAPH <http://example.org/protocol-update-dataset-full-test/> { + <http://kasei.us/2009/09/sparql/data/data3.rdf> ?p ?o + } + } + } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update + + + + + + true + + + + false + PREFIX dc: <http://purl.org/dc/terms/> +PREFIX foaf: <http://xmlns.com/foaf/0.1/> +CLEAR ALL ; +INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document } +} ; +INSERT { + GRAPH <http://example.org/protocol-update-dataset-full-test/> { + ?s <http://example.org/in> ?in + } +} +WHERE { + { + GRAPH ?g { ?s a foaf:Document } + BIND(?g AS ?in) + } + UNION + { + ?s a foaf:Document . + BIND("default" AS ?in) + } +} + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?using-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + + Content-Type + application/sparql-query + + + Accept + application/sparql-results+xml + + + + + + true + + + + false + + ASK { + GRAPH <http://example.org/protocol-update-dataset-full-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> <http://example.org/in> "default" . + <http://kasei.us/2009/09/sparql/data/data2.rdf> <http://example.org/in> <http://kasei.us/2009/09/sparql/data/data2.rdf> . + } + FILTER NOT EXISTS { + GRAPH <http://example.org/protocol-update-dataset-full-test/> { + <http://kasei.us/2009/09/sparql/data/data3.rdf> ?p ?o + } + } + } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml\n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_dataset_named_graphs.jmx b/sparql11/data-sparql11/protocol/update_dataset_named_graphs.jmx new file mode 100644 index 00000000..48b5884c --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_dataset_named_graphs.jmx @@ -0,0 +1,376 @@ + + + + + update with protocol-specified named graphs" ; + rdfs:comment """ +#### Request + + POST /sparql?using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update + Content-Length: XXX + + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> { + ?s a dc:BibliographicResource + } + } + WHERE { + GRAPH ?g { + ?s a foaf:Document + } + } + +#### Response + + 2xx or 3xx response + +followed by + +#### Request + + POST /sparql HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Accept: application/sparql-results+xml + Content-Type: application/sparql-query + Content-Length: XXX + + ASK { + GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + FILTER NOT EXISTS { + GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + } + } + +#### Response + + 2xx or 3xx response + Content-Type: application/sparql-results+xml + + true + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update + + + + + + true + + + + false + PREFIX dc: <http://purl.org/dc/terms/> + PREFIX foaf: <http://xmlns.com/foaf/0.1/> + CLEAR ALL ; + INSERT DATA { + GRAPH <http://kasei.us/2009/09/sparql/data/data1.rdf> { <http://kasei.us/2009/09/sparql/data/data1.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data2.rdf> { <http://kasei.us/2009/09/sparql/data/data2.rdf> a foaf:Document } + GRAPH <http://kasei.us/2009/09/sparql/data/data3.rdf> { <http://kasei.us/2009/09/sparql/data/data3.rdf> a foaf:Document } + } ; + INSERT { + GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> { + ?s a dc:BibliographicResource + } + } + WHERE { + GRAPH ?g { + ?s a foaf:Document + } + } + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql?using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&using-named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + + Content-Type + application/sparql-query + + + Accept + application/sparql-results+xml + + + + + + true + + + + false + ASK { + GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data1.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + <http://kasei.us/2009/09/sparql/data/data2.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + FILTER NOT EXISTS { + GRAPH <http://example.org/protocol-update-dataset-named-graphs-test/> { + <http://kasei.us/2009/09/sparql/data/data3.rdf> a <http://purl.org/dc/terms/BibliographicResource> . + } + } + } + + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml\n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + <uri>test</uri> + + + Assertion.response_data + false + 6 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_post_direct.jmx b/sparql11/data-sparql11/protocol/update_post_direct.jmx new file mode 100644 index 00000000..025e4a44 --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_post_direct.jmx @@ -0,0 +1,224 @@ + + + + + update via POST directly +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/sparql-update + Content-Length: XXX + + CLEAR ALL + +#### Response + + 2xx or 3xx response + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-update + + + + + + true + + + + false + CLEAR ALL + = + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + diff --git a/sparql11/data-sparql11/protocol/update_post_form.jmx b/sparql11/data-sparql11/protocol/update_post_form.jmx new file mode 100644 index 00000000..d3aa2299 --- /dev/null +++ b/sparql11/data-sparql11/protocol/update_post_form.jmx @@ -0,0 +1,226 @@ + + + + + update via URL-encoded POST" ; + rdfs:comment """ +#### Request + + POST /sparql/ HTTP/1.1 + Host: www.example + User-agent: sparql-client/0.1 + Content-Type: application/x-www-url-form-urlencoded + Content-Length: XXX + + update=CLEAR%20ALL + +#### Response + + 2xx or 3xx response + false + true + false + + + + + + + + + + HOSTNAME + ${__P(HOSTNAME,172.17.0.3)} + = + + + PORT + ${__P(PORT,8890)} + = + + + PATH + ${__P(PATH,/)} + = + + + + + + + + User-Agent + sparql-client/0.1 + + + + + + stoptest + + false + 1 + + 1 + 1 + false + + + + + + + + + true + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + = + true + query + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + continue + + false + 1 + + 1 + 1 + false + + + + + + + + Content-Type + application/sparql-query + + + + + + + + + false + CLEAR%20ALL + = + true + update + + + + ${HOSTNAME} + ${PORT} + + + ${PATH}sparql/ + POST + true + false + true + false + + + + + + + + (2|3)[0-9]{2} + + ERROR RESPONSE CODE + Assertion.response_code + false + 1 + + + + import org.apache.commons.lang3.StringUtils; +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); + +if(Failure){ + FailureMessage = "ERROR Response Type Assertion :\n"+ + "EXPECTED \n"+ + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ + "ResponseHeaders :\n"+ + new String(ResponseHeaders); +} + + + false + + + + + true + + + Assertion.response_data + false + 2 + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + true + false + false + false + true + 0 + true + true + true + true + true + + + + + + + + From c37753efae2171422c93bfeb0a687353eda389ac Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Sat, 18 Aug 2018 15:01:53 +0200 Subject: [PATCH 4/7] distinction between compulsory tests and the others with dawgt:ApprovedMustToHave In manifest, replace /sparql/ by /sparql and insert new status dawgt:ApprovedMustToHave for 3 tests. fix 3 tests jmx w3c/rdf-tests#51 --- sparql11/data-sparql11/protocol/manifest.ttl | 115 +++++++++--------- sparql11/data-sparql11/protocol/query_get.jmx | 21 ++-- .../protocol/query_post_form.jmx | 6 +- .../protocol/update_post_form.jmx | 12 +- 4 files changed, 75 insertions(+), 79 deletions(-) diff --git a/sparql11/data-sparql11/protocol/manifest.ttl b/sparql11/data-sparql11/protocol/manifest.ttl index 4ef2e50f..8a4c162d 100644 --- a/sparql11/data-sparql11/protocol/manifest.ttl +++ b/sparql11/data-sparql11/protocol/manifest.ttl @@ -50,7 +50,7 @@ rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/x-www-url-form-urlencoded @@ -68,6 +68,7 @@ mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; + dawgt:approval dawgt:ApprovedMustToHave ; . @@ -89,7 +90,7 @@ true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -99,7 +100,7 @@ rdfs:comment """ #### Request - POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + POST /sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -114,7 +115,7 @@ true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -124,7 +125,7 @@ rdfs:comment """ #### Request - POST /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + POST /sparql?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -139,7 +140,7 @@ true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -149,7 +150,7 @@ rdfs:comment """ #### Request - GET /sparql/?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D HTTP/1.1 + GET /sparql?named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf&query=ASK%20%7B%20GRAPH%20%3Fg%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20%7D HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 @@ -160,7 +161,7 @@ true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -170,7 +171,7 @@ rdfs:comment """ #### Request - POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + POST /sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata3.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata1.rdf&named-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -185,7 +186,7 @@ Contains SPARQL results for variables g x s """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -195,7 +196,7 @@ rdfs:comment """ #### Request - POST /sparql/?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 + POST /sparql?default-graph-uri=http%3A%2F%2Fkasei.us%2F2009%2F09%2Fsparql%2Fdata%2Fdata2.rdf HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -210,7 +211,7 @@ true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -232,6 +233,7 @@ mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; + dawgt:approval dawgt:ApprovedMustToHave ; . :query_content_type_select rdf:type mf:ProtocolTest ; @@ -239,7 +241,7 @@ rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -252,7 +254,7 @@ 2xx or 3xx response Content-Type: application/sparql-results+xml, application/sparql-results+json, text/tab-separated-values, or text/csv """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -262,7 +264,7 @@ rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -275,7 +277,7 @@ 2xx or 3xx response Content-Type: application/sparql-results+xml or application/sparql-results+json """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -285,7 +287,7 @@ rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -298,7 +300,7 @@ 2xx or 3xx response Content-Type: application/rdf+xml, application/rdf+json or text/turtle """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -308,7 +310,7 @@ rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -321,7 +323,7 @@ 2xx or 3xx response Content-Type: application/rdf+xml, application/rdf+json or text/turtle """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -382,7 +384,7 @@ followed by true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -449,7 +451,7 @@ followed by true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -518,7 +520,7 @@ followed by true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -593,7 +595,7 @@ followed by true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -603,7 +605,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/x-www-url-form-urlencoded @@ -618,6 +620,7 @@ followed by mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; + dawgt:approval dawgt:ApprovedMustToHave ; . :update_post_direct rdf:type mf:ProtocolTest ; @@ -625,7 +628,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-update @@ -637,7 +640,7 @@ followed by 2xx or 3xx response """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -647,7 +650,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-update @@ -662,7 +665,7 @@ followed by #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -682,7 +685,7 @@ followed by one result with `?o` bound to an IRI that is _not_ `` """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -692,7 +695,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query @@ -707,7 +710,7 @@ followed by true """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -723,7 +726,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -739,7 +742,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -749,7 +752,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: text/plain @@ -761,7 +764,7 @@ followed by 4xx """ ; - mf:action ; + ##mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -771,7 +774,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Length: XXX @@ -782,7 +785,7 @@ followed by 4xx """ ; - mf:action ; + ##mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -792,7 +795,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Length: XXX @@ -803,7 +806,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -815,7 +818,7 @@ followed by #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-query; charset=UTF-16 @@ -827,7 +830,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -843,7 +846,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -859,7 +862,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -869,7 +872,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/x-www-url-form-urlencoded @@ -881,7 +884,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -891,7 +894,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: text/plain @@ -903,7 +906,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -913,7 +916,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Length: XXX @@ -924,7 +927,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -936,7 +939,7 @@ followed by #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/sparql-update; charset=UTF-16 @@ -948,7 +951,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -958,7 +961,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/x-www-url-form-urlencoded @@ -970,7 +973,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . @@ -980,7 +983,7 @@ followed by rdfs:comment """ #### Request - POST /sparql/ HTTP/1.1 + POST /sparql HTTP/1.1 Host: www.example User-agent: sparql-client/0.1 Content-Type: application/x-www-url-form-urlencoded @@ -992,7 +995,7 @@ followed by 4xx """ ; - mf:action ; + #mf:action ; dawgt:approval dawgt:Approved ; dawgt:approvedBy ; . diff --git a/sparql11/data-sparql11/protocol/query_get.jmx b/sparql11/data-sparql11/protocol/query_get.jmx index f9cf11c9..39ba43bd 100644 --- a/sparql11/data-sparql11/protocol/query_get.jmx +++ b/sparql11/data-sparql11/protocol/query_get.jmx @@ -25,12 +25,12 @@ HOSTNAME - ${__P(HOSTNAME,172.17.0.3)} + ${__P(HOSTNAME,172.17.0.2)} = PORT - ${__P(PORT,8890)} + ${__P(PORT,80)} = @@ -66,13 +66,13 @@ - + true LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; = true - query + update @@ -80,7 +80,7 @@ LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; ${PORT} - ${PATH}sparql/ + ${PATH}sparql POST true false @@ -115,15 +115,8 @@ LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; - true - - - - false - - = - - + + ${HOSTNAME} ${PORT} diff --git a/sparql11/data-sparql11/protocol/query_post_form.jmx b/sparql11/data-sparql11/protocol/query_post_form.jmx index 1559caf4..a06fbfe1 100644 --- a/sparql11/data-sparql11/protocol/query_post_form.jmx +++ b/sparql11/data-sparql11/protocol/query_post_form.jmx @@ -31,12 +31,12 @@ HOSTNAME - ${__P(HOSTNAME,172.17.0.3)} + ${__P(HOSTNAME,172.17.0.2)} = PORT - ${__P(PORT,8890)} + ${__P(PORT,80)} = @@ -84,7 +84,7 @@ ${PORT} - ${PATH}sparql/ + ${PATH}sparql POST true false diff --git a/sparql11/data-sparql11/protocol/update_post_form.jmx b/sparql11/data-sparql11/protocol/update_post_form.jmx index d3aa2299..a4a35839 100644 --- a/sparql11/data-sparql11/protocol/update_post_form.jmx +++ b/sparql11/data-sparql11/protocol/update_post_form.jmx @@ -30,12 +30,12 @@ HOSTNAME - ${__P(HOSTNAME,172.17.0.3)} + ${__P(HOSTNAME,172.17.0.2)} = PORT - ${__P(PORT,8890)} + ${__P(PORT,80)} = @@ -71,13 +71,13 @@ - + true LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; = true - query + update @@ -85,7 +85,7 @@ LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; ${PORT} - ${PATH}sparql/ + ${PATH}sparql POST true false @@ -135,7 +135,7 @@ LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; ${PORT} - ${PATH}sparql/ + ${PATH}sparql POST true false From bf1bbc6c5b142e68a0b8d9b37f2d1fe8b781beb9 Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Sun, 5 Jan 2020 16:05:08 +0100 Subject: [PATCH 5/7] Update for jmeter 5 --- sparql11/data-sparql11/protocol/query_get.jmx | 4 +++- .../data-sparql11/protocol/query_post_form.jmx | 14 ++++++++------ .../data-sparql11/protocol/update_post_form.jmx | 7 ++++--- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/sparql11/data-sparql11/protocol/query_get.jmx b/sparql11/data-sparql11/protocol/query_get.jmx index 39ba43bd..0c0799bb 100644 --- a/sparql11/data-sparql11/protocol/query_get.jmx +++ b/sparql11/data-sparql11/protocol/query_get.jmx @@ -1,5 +1,5 @@ - + #### Request @@ -61,6 +61,7 @@ false + true @@ -103,6 +104,7 @@ LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; false + true diff --git a/sparql11/data-sparql11/protocol/query_post_form.jmx b/sparql11/data-sparql11/protocol/query_post_form.jmx index a06fbfe1..82f1248c 100644 --- a/sparql11/data-sparql11/protocol/query_post_form.jmx +++ b/sparql11/data-sparql11/protocol/query_post_form.jmx @@ -1,5 +1,5 @@ - + #### Request @@ -58,6 +58,7 @@ false + true @@ -70,13 +71,14 @@ - true - + - - false - query=ASK%20%7B%7D + + true + ASK {} = + true + query diff --git a/sparql11/data-sparql11/protocol/update_post_form.jmx b/sparql11/data-sparql11/protocol/update_post_form.jmx index a4a35839..ff2f8813 100644 --- a/sparql11/data-sparql11/protocol/update_post_form.jmx +++ b/sparql11/data-sparql11/protocol/update_post_form.jmx @@ -1,5 +1,5 @@ - + update via URL-encoded POST" ; @@ -66,6 +66,7 @@ false + true @@ -73,8 +74,7 @@ true - LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; -LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; + LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; = true update @@ -108,6 +108,7 @@ LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>; false + true From bf62ca7afb18603ed963e91a79dc5a0cbfd1522b Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Thu, 13 May 2021 14:47:47 +0200 Subject: [PATCH 6/7] The type "typed-literal" is wrong in SPARQL result (https://www.w3.org/TR/sparql11-results-json/) Replace the type "typed-literal" with "literal" --- sparql11/data-sparql11/json-res/jsonres01.srj | 6 +++--- sparql11/data-sparql11/json-res/jsonres02.srj | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sparql11/data-sparql11/json-res/jsonres01.srj b/sparql11/data-sparql11/json-res/jsonres01.srj index af188953..bcfd68b3 100644 --- a/sparql11/data-sparql11/json-res/jsonres01.srj +++ b/sparql11/data-sparql11/json-res/jsonres01.srj @@ -17,17 +17,17 @@ { "s": { "type": "uri" , "value": "http://example.org/s3" } , "p": { "type": "uri" , "value": "http://example.org/p2" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "typed-literal" , "value": "bar" } + "o": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "literal" , "value": "bar" } } , { "s": { "type": "uri" , "value": "http://example.org/s4" } , "p": { "type": "uri" , "value": "http://example.org/p4" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "type": "typed-literal" , "value": "4" } + "o": { "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "type": "literal" , "value": "4" } } , { "s": { "type": "uri" , "value": "http://example.org/s5" } , "p": { "type": "uri" , "value": "http://example.org/p5" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#decimal" , "type": "typed-literal" , "value": "5" } + "o": { "datatype": "http://www.w3.org/2001/XMLSchema#decimal" , "type": "literal" , "value": "5" } } , { "s": { "type": "uri" , "value": "http://example.org/s6" } , diff --git a/sparql11/data-sparql11/json-res/jsonres02.srj b/sparql11/data-sparql11/json-res/jsonres02.srj index a834dc9e..c7fc2cbb 100644 --- a/sparql11/data-sparql11/json-res/jsonres02.srj +++ b/sparql11/data-sparql11/json-res/jsonres02.srj @@ -19,17 +19,17 @@ { "s": { "type": "uri" , "value": "http://example.org/s3" } , "p": { "type": "uri" , "value": "http://example.org/p2" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "typed-literal" , "value": "bar" } + "o": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "literal" , "value": "bar" } } , { "s": { "type": "uri" , "value": "http://example.org/s4" } , "p": { "type": "uri" , "value": "http://example.org/p4" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "type": "typed-literal" , "value": "4" } + "o": { "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "type": "literal" , "value": "4" } } , { "s": { "type": "uri" , "value": "http://example.org/s5" } , "p": { "type": "uri" , "value": "http://example.org/p5" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#decimal" , "type": "typed-literal" , "value": "5" } + "o": { "datatype": "http://www.w3.org/2001/XMLSchema#decimal" , "type": "literal" , "value": "5" } } , { "s": { "type": "uri" , "value": "http://example.org/s6" } , From 4d8aea9cd85d76589442da7e7a56a6bcb8a160f9 Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Fri, 14 May 2021 19:06:06 +0200 Subject: [PATCH 7/7] xsd:string is the datatype by default and becomes implicit in sparql results --- sparql11/data-sparql11/csv-tsv-res/csvtsv01.tsv | 2 +- sparql11/data-sparql11/csv-tsv-res/csvtsv02.tsv | 2 +- sparql11/data-sparql11/csv-tsv-res/csvtsv03.tsv | 4 ++-- sparql11/data-sparql11/functions/concat01.srx | 2 +- sparql11/data-sparql11/functions/concat02.srx | 8 ++++---- sparql11/data-sparql11/functions/contains01.srx | 2 +- sparql11/data-sparql11/functions/encode01.srx | 4 ++-- sparql11/data-sparql11/functions/ends01.srx | 2 +- sparql11/data-sparql11/functions/if01.srx | 4 ++-- sparql11/data-sparql11/functions/lcase01.srx | 4 ++-- sparql11/data-sparql11/functions/length01.srx | 4 ++-- sparql11/data-sparql11/functions/plus-1.srx | 4 ++-- sparql11/data-sparql11/functions/plus-2.srx | 4 ++-- sparql11/data-sparql11/functions/replace01.srx | 4 ++-- sparql11/data-sparql11/functions/strafter01.srx | 4 ++-- sparql11/data-sparql11/functions/strafter01a.srx | 2 +- sparql11/data-sparql11/functions/strafter02.srx | 10 +++++----- sparql11/data-sparql11/functions/strbefore01.srx | 4 ++-- sparql11/data-sparql11/functions/strbefore02.srx | 10 +++++----- sparql11/data-sparql11/functions/strdt02.srx | 2 +- sparql11/data-sparql11/functions/strdt03-rdf11.srx | 10 +++++----- sparql11/data-sparql11/functions/strdt03.srx | 8 ++++---- sparql11/data-sparql11/functions/substring01.srx | 8 ++++---- sparql11/data-sparql11/functions/substring02.srx | 8 ++++---- sparql11/data-sparql11/functions/ucase01.srx | 4 ++-- sparql11/data-sparql11/json-res/jsonres01.srj | 4 ++-- sparql11/data-sparql11/json-res/jsonres02.srj | 2 +- 27 files changed, 63 insertions(+), 63 deletions(-) diff --git a/sparql11/data-sparql11/csv-tsv-res/csvtsv01.tsv b/sparql11/data-sparql11/csv-tsv-res/csvtsv01.tsv index ab6c64bb..96b42383 100644 --- a/sparql11/data-sparql11/csv-tsv-res/csvtsv01.tsv +++ b/sparql11/data-sparql11/csv-tsv-res/csvtsv01.tsv @@ -1,7 +1,7 @@ ?s ?p ?o "foo" - "bar"^^ + "bar" 4 5.5 _:b0 diff --git a/sparql11/data-sparql11/csv-tsv-res/csvtsv02.tsv b/sparql11/data-sparql11/csv-tsv-res/csvtsv02.tsv index 54c65d20..78acacc1 100644 --- a/sparql11/data-sparql11/csv-tsv-res/csvtsv02.tsv +++ b/sparql11/data-sparql11/csv-tsv-res/csvtsv02.tsv @@ -1,7 +1,7 @@ ?s ?p ?o ?p2 ?o2 "foo" "foo" - "bar"^^ + "bar" 4 5.5 _:b0 diff --git a/sparql11/data-sparql11/csv-tsv-res/csvtsv03.tsv b/sparql11/data-sparql11/csv-tsv-res/csvtsv03.tsv index ca43605a..a69c9fc5 100644 --- a/sparql11/data-sparql11/csv-tsv-res/csvtsv03.tsv +++ b/sparql11/data-sparql11/csv-tsv-res/csvtsv03.tsv @@ -1,8 +1,8 @@ ?s ?p ?o - "1"^^ + "1" 2.2 "-3"^^ - "4,4"^^ + "4,4" "5,5"^^ 1.0e6 "a7"^^ diff --git a/sparql11/data-sparql11/functions/concat01.srx b/sparql11/data-sparql11/functions/concat01.srx index 6e94cde0..0152d9bd 100644 --- a/sparql11/data-sparql11/functions/concat01.srx +++ b/sparql11/data-sparql11/functions/concat01.srx @@ -5,7 +5,7 @@ - abcDEF + abcDEF diff --git a/sparql11/data-sparql11/functions/concat02.srx b/sparql11/data-sparql11/functions/concat02.srx index 59d60ca9..d577638b 100644 --- a/sparql11/data-sparql11/functions/concat02.srx +++ b/sparql11/data-sparql11/functions/concat02.srx @@ -4,10 +4,10 @@ - abcabc - abcdef - defabc - defdef + abcabc + abcdef + defabc + defdef englishenglish françaisfrançais 日本語日本語 diff --git a/sparql11/data-sparql11/functions/contains01.srx b/sparql11/data-sparql11/functions/contains01.srx index edf262ab..db56e338 100644 --- a/sparql11/data-sparql11/functions/contains01.srx +++ b/sparql11/data-sparql11/functions/contains01.srx @@ -11,7 +11,7 @@ http://example.org/s6 - abc + abc diff --git a/sparql11/data-sparql11/functions/encode01.srx b/sparql11/data-sparql11/functions/encode01.srx index 09d62ab9..50f821f1 100644 --- a/sparql11/data-sparql11/functions/encode01.srx +++ b/sparql11/data-sparql11/functions/encode01.srx @@ -33,12 +33,12 @@ http://example.org/s6 - abc + abc abc http://example.org/s7 - DEF + DEF DEF diff --git a/sparql11/data-sparql11/functions/ends01.srx b/sparql11/data-sparql11/functions/ends01.srx index 3ead2670..fb3669c0 100644 --- a/sparql11/data-sparql11/functions/ends01.srx +++ b/sparql11/data-sparql11/functions/ends01.srx @@ -7,7 +7,7 @@ http://example.org/s6 - abc + abc diff --git a/sparql11/data-sparql11/functions/if01.srx b/sparql11/data-sparql11/functions/if01.srx index c309cc2f..447e0606 100644 --- a/sparql11/data-sparql11/functions/if01.srx +++ b/sparql11/data-sparql11/functions/if01.srx @@ -15,7 +15,7 @@ - def + def false @@ -47,7 +47,7 @@ - abc + abc false diff --git a/sparql11/data-sparql11/functions/lcase01.srx b/sparql11/data-sparql11/functions/lcase01.srx index e1a0ad47..40424060 100644 --- a/sparql11/data-sparql11/functions/lcase01.srx +++ b/sparql11/data-sparql11/functions/lcase01.srx @@ -15,7 +15,7 @@ http://example.org/s7 - def + def http://example.org/s3 @@ -27,7 +27,7 @@ http://example.org/s6 - abc + abc http://example.org/s1 diff --git a/sparql11/data-sparql11/functions/length01.srx b/sparql11/data-sparql11/functions/length01.srx index bb504fad..958e867f 100644 --- a/sparql11/data-sparql11/functions/length01.srx +++ b/sparql11/data-sparql11/functions/length01.srx @@ -14,7 +14,7 @@ 3 - DEF + DEF 3 @@ -26,7 +26,7 @@ 4 - abc + abc 3 diff --git a/sparql11/data-sparql11/functions/plus-1.srx b/sparql11/data-sparql11/functions/plus-1.srx index 6437b3f7..672734a0 100644 --- a/sparql11/data-sparql11/functions/plus-1.srx +++ b/sparql11/data-sparql11/functions/plus-1.srx @@ -43,7 +43,7 @@ - 1 + 1 2 @@ -51,7 +51,7 @@ - 1 + 1 2 diff --git a/sparql11/data-sparql11/functions/plus-2.srx b/sparql11/data-sparql11/functions/plus-2.srx index 56a8424a..c31ea553 100644 --- a/sparql11/data-sparql11/functions/plus-2.srx +++ b/sparql11/data-sparql11/functions/plus-2.srx @@ -40,7 +40,7 @@ - 1 + 1 2 @@ -48,7 +48,7 @@ - 1 + 1 2 diff --git a/sparql11/data-sparql11/functions/replace01.srx b/sparql11/data-sparql11/functions/replace01.srx index 664e86af..5c6f4a7d 100644 --- a/sparql11/data-sparql11/functions/replace01.srx +++ b/sparql11/data-sparql11/functions/replace01.srx @@ -23,11 +23,11 @@ http://example.org/s5 - abc + abc http://example.org/s6 - def + def http://example.org/s7 diff --git a/sparql11/data-sparql11/functions/strafter01.srx b/sparql11/data-sparql11/functions/strafter01.srx index c8acd3b3..fda08aa4 100644 --- a/sparql11/data-sparql11/functions/strafter01.srx +++ b/sparql11/data-sparql11/functions/strafter01.srx @@ -23,11 +23,11 @@ http://example.org/s5 - + http://example.org/s6 - f + f http://example.org/s7 diff --git a/sparql11/data-sparql11/functions/strafter01a.srx b/sparql11/data-sparql11/functions/strafter01a.srx index df6c4eaa..4e2642d7 100644 --- a/sparql11/data-sparql11/functions/strafter01a.srx +++ b/sparql11/data-sparql11/functions/strafter01a.srx @@ -27,7 +27,7 @@ http://example.org/s6 - f + f http://example.org/s7 diff --git a/sparql11/data-sparql11/functions/strafter02.srx b/sparql11/data-sparql11/functions/strafter02.srx index 7189ade8..4571b5ef 100644 --- a/sparql11/data-sparql11/functions/strafter02.srx +++ b/sparql11/data-sparql11/functions/strafter02.srx @@ -33,11 +33,11 @@ http://example.org/s3 - abc - c - c - abc - c + abc + c + c + abc + c diff --git a/sparql11/data-sparql11/functions/strbefore01.srx b/sparql11/data-sparql11/functions/strbefore01.srx index a00e7620..0bbb77a8 100644 --- a/sparql11/data-sparql11/functions/strbefore01.srx +++ b/sparql11/data-sparql11/functions/strbefore01.srx @@ -23,11 +23,11 @@ http://example.org/s5 - + http://example.org/s6 - + http://example.org/s7 diff --git a/sparql11/data-sparql11/functions/strbefore02.srx b/sparql11/data-sparql11/functions/strbefore02.srx index 5961d27e..79ad9df3 100644 --- a/sparql11/data-sparql11/functions/strbefore02.srx +++ b/sparql11/data-sparql11/functions/strbefore02.srx @@ -33,11 +33,11 @@ http://example.org/s3 - abc - a - a - - a + abc + a + a + + a diff --git a/sparql11/data-sparql11/functions/strdt02.srx b/sparql11/data-sparql11/functions/strdt02.srx index 5f9d0dfe..a4e23b4b 100644 --- a/sparql11/data-sparql11/functions/strdt02.srx +++ b/sparql11/data-sparql11/functions/strdt02.srx @@ -7,7 +7,7 @@ http://example.org/s2 - bar + bar diff --git a/sparql11/data-sparql11/functions/strdt03-rdf11.srx b/sparql11/data-sparql11/functions/strdt03-rdf11.srx index 5760c534..6418f290 100644 --- a/sparql11/data-sparql11/functions/strdt03-rdf11.srx +++ b/sparql11/data-sparql11/functions/strdt03-rdf11.srx @@ -13,24 +13,24 @@ http://example.org/s1 - foo + foo http://example.org/s2 http://example.org/s3 - BAZ + BAZ http://example.org/s4 - 食べ物 + 食べ物 http://example.org/s5 - 100% + 100% http://example.org/s6 - abc + abc http://example.org/s7 diff --git a/sparql11/data-sparql11/functions/strdt03.srx b/sparql11/data-sparql11/functions/strdt03.srx index e02332d2..b00519a8 100644 --- a/sparql11/data-sparql11/functions/strdt03.srx +++ b/sparql11/data-sparql11/functions/strdt03.srx @@ -13,20 +13,20 @@ http://example.org/s1 - foo + foo http://example.org/s2 http://example.org/s3 - BAZ + BAZ http://example.org/s4 - 食べ物 + 食べ物 http://example.org/s5 - 100% + 100% http://example.org/s6 http://example.org/s7 diff --git a/sparql11/data-sparql11/functions/substring01.srx b/sparql11/data-sparql11/functions/substring01.srx index c4882f57..5994addd 100644 --- a/sparql11/data-sparql11/functions/substring01.srx +++ b/sparql11/data-sparql11/functions/substring01.srx @@ -18,8 +18,8 @@ http://example.org/s7 - DEF - D + DEF + D http://example.org/s3 @@ -33,8 +33,8 @@ http://example.org/s6 - abc - a + abc + a http://example.org/s1 diff --git a/sparql11/data-sparql11/functions/substring02.srx b/sparql11/data-sparql11/functions/substring02.srx index 52c3d354..d5a72d00 100644 --- a/sparql11/data-sparql11/functions/substring02.srx +++ b/sparql11/data-sparql11/functions/substring02.srx @@ -18,8 +18,8 @@ http://example.org/s7 - DEF - EF + DEF + EF http://example.org/s3 @@ -33,8 +33,8 @@ http://example.org/s6 - abc - bc + abc + bc http://example.org/s1 diff --git a/sparql11/data-sparql11/functions/ucase01.srx b/sparql11/data-sparql11/functions/ucase01.srx index 97bd253a..79872962 100644 --- a/sparql11/data-sparql11/functions/ucase01.srx +++ b/sparql11/data-sparql11/functions/ucase01.srx @@ -15,7 +15,7 @@ http://example.org/s7 - DEF + DEF http://example.org/s3 @@ -27,7 +27,7 @@ http://example.org/s6 - ABC + ABC http://example.org/s1 diff --git a/sparql11/data-sparql11/json-res/jsonres01.srj b/sparql11/data-sparql11/json-res/jsonres01.srj index bcfd68b3..d58ebad8 100644 --- a/sparql11/data-sparql11/json-res/jsonres01.srj +++ b/sparql11/data-sparql11/json-res/jsonres01.srj @@ -17,12 +17,12 @@ { "s": { "type": "uri" , "value": "http://example.org/s3" } , "p": { "type": "uri" , "value": "http://example.org/p2" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "literal" , "value": "bar" } + "o": { "type": "literal" , "value": "bar" } } , { "s": { "type": "uri" , "value": "http://example.org/s4" } , "p": { "type": "uri" , "value": "http://example.org/p4" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#integer" , "type": "literal" , "value": "4" } + "o": { "type": "literal" , "value": "4" } } , { "s": { "type": "uri" , "value": "http://example.org/s5" } , diff --git a/sparql11/data-sparql11/json-res/jsonres02.srj b/sparql11/data-sparql11/json-res/jsonres02.srj index c7fc2cbb..8fc8cbaf 100644 --- a/sparql11/data-sparql11/json-res/jsonres02.srj +++ b/sparql11/data-sparql11/json-res/jsonres02.srj @@ -19,7 +19,7 @@ { "s": { "type": "uri" , "value": "http://example.org/s3" } , "p": { "type": "uri" , "value": "http://example.org/p2" } , - "o": { "datatype": "http://www.w3.org/2001/XMLSchema#string" , "type": "literal" , "value": "bar" } + "o": { "type": "literal" , "value": "bar" } } , { "s": { "type": "uri" , "value": "http://example.org/s4" } ,