From 74dcbd0e817385622e5a14ef7175a20fe32a12c2 Mon Sep 17 00:00:00 2001 From: Karima Rafes Date: Sat, 11 Aug 2018 14:45:46 +0200 Subject: [PATCH] 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 + + + + + + + +