|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414"> |
| 3 | + <hashTree> |
| 4 | + <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="query_dataset_full" enabled="true"> |
| 5 | + <stringProp name="TestPlan.comments">#### Request |
| 6 | + |
| 7 | + 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 |
| 8 | + Host: www.example |
| 9 | + User-agent: sparql-client/0.1 |
| 10 | + Content-Type: application/sparql-query |
| 11 | + Content-Length: XXX |
| 12 | + |
| 13 | + SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } } |
| 14 | + |
| 15 | +#### Response |
| 16 | + |
| 17 | + 2xx or 3xx response |
| 18 | + Content-Type: application/sparql-results+xml or application/sparql-results+json |
| 19 | + |
| 20 | + Contains SPARQL results for variables g x s </stringProp> |
| 21 | + <boolProp name="TestPlan.functional_mode">false</boolProp> |
| 22 | + <boolProp name="TestPlan.tearDown_on_shutdown">true</boolProp> |
| 23 | + <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> |
| 24 | + <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 25 | + <collectionProp name="Arguments.arguments"/> |
| 26 | + </elementProp> |
| 27 | + <stringProp name="TestPlan.user_define_classpath"></stringProp> |
| 28 | + </TestPlan> |
| 29 | + <hashTree> |
| 30 | + <Arguments guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 31 | + <collectionProp name="Arguments.arguments"> |
| 32 | + <elementProp name="HOSTNAME" elementType="Argument"> |
| 33 | + <stringProp name="Argument.name">HOSTNAME</stringProp> |
| 34 | + <stringProp name="Argument.value">${__P(HOSTNAME,172.17.0.3)}</stringProp> |
| 35 | + <stringProp name="Argument.metadata">=</stringProp> |
| 36 | + </elementProp> |
| 37 | + <elementProp name="PORT" elementType="Argument"> |
| 38 | + <stringProp name="Argument.name">PORT</stringProp> |
| 39 | + <stringProp name="Argument.value">${__P(PORT,8890)}</stringProp> |
| 40 | + <stringProp name="Argument.metadata">=</stringProp> |
| 41 | + </elementProp> |
| 42 | + <elementProp name="PATH" elementType="Argument"> |
| 43 | + <stringProp name="Argument.name">PATH</stringProp> |
| 44 | + <stringProp name="Argument.value">${__P(PATH,/)}</stringProp> |
| 45 | + <stringProp name="Argument.metadata">=</stringProp> |
| 46 | + </elementProp> |
| 47 | + </collectionProp> |
| 48 | + </Arguments> |
| 49 | + <hashTree/> |
| 50 | + <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 51 | + <collectionProp name="HeaderManager.headers"> |
| 52 | + <elementProp name="" elementType="Header"> |
| 53 | + <stringProp name="Header.name">User-Agent</stringProp> |
| 54 | + <stringProp name="Header.value">sparql-client/0.1</stringProp> |
| 55 | + </elementProp> |
| 56 | + </collectionProp> |
| 57 | + </HeaderManager> |
| 58 | + <hashTree/> |
| 59 | + <SetupThreadGroup guiclass="SetupThreadGroupGui" testclass="SetupThreadGroup" testname="setUp Thread Group" enabled="true"> |
| 60 | + <stringProp name="ThreadGroup.on_sample_error">stoptest</stringProp> |
| 61 | + <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> |
| 62 | + <boolProp name="LoopController.continue_forever">false</boolProp> |
| 63 | + <stringProp name="LoopController.loops">1</stringProp> |
| 64 | + </elementProp> |
| 65 | + <stringProp name="ThreadGroup.num_threads">1</stringProp> |
| 66 | + <stringProp name="ThreadGroup.ramp_time">1</stringProp> |
| 67 | + <boolProp name="ThreadGroup.scheduler">false</boolProp> |
| 68 | + <stringProp name="ThreadGroup.duration"></stringProp> |
| 69 | + <stringProp name="ThreadGroup.delay"></stringProp> |
| 70 | + </SetupThreadGroup> |
| 71 | + <hashTree> |
| 72 | + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request LOAD" enabled="true"> |
| 73 | + <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 74 | + <collectionProp name="Arguments.arguments"> |
| 75 | + <elementProp name="query" elementType="HTTPArgument"> |
| 76 | + <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 77 | + <stringProp name="Argument.value">LOAD <http://kasei.us/2009/09/sparql/data/data1.rdf>; |
| 78 | +LOAD <http://kasei.us/2009/09/sparql/data/data2.rdf>;</stringProp> |
| 79 | + <stringProp name="Argument.metadata">=</stringProp> |
| 80 | + <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 81 | + <stringProp name="Argument.name">query</stringProp> |
| 82 | + </elementProp> |
| 83 | + </collectionProp> |
| 84 | + </elementProp> |
| 85 | + <stringProp name="HTTPSampler.domain">${HOSTNAME}</stringProp> |
| 86 | + <stringProp name="HTTPSampler.port">${PORT}</stringProp> |
| 87 | + <stringProp name="HTTPSampler.protocol"></stringProp> |
| 88 | + <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 89 | + <stringProp name="HTTPSampler.path">${PATH}sparql/</stringProp> |
| 90 | + <stringProp name="HTTPSampler.method">POST</stringProp> |
| 91 | + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 92 | + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 93 | + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 94 | + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 95 | + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 96 | + <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 97 | + <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 98 | + </HTTPSamplerProxy> |
| 99 | + <hashTree/> |
| 100 | + </hashTree> |
| 101 | + <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true"> |
| 102 | + <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
| 103 | + <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> |
| 104 | + <boolProp name="LoopController.continue_forever">false</boolProp> |
| 105 | + <stringProp name="LoopController.loops">1</stringProp> |
| 106 | + </elementProp> |
| 107 | + <stringProp name="ThreadGroup.num_threads">1</stringProp> |
| 108 | + <stringProp name="ThreadGroup.ramp_time">1</stringProp> |
| 109 | + <boolProp name="ThreadGroup.scheduler">false</boolProp> |
| 110 | + <stringProp name="ThreadGroup.duration"></stringProp> |
| 111 | + <stringProp name="ThreadGroup.delay"></stringProp> |
| 112 | + </ThreadGroup> |
| 113 | + <hashTree> |
| 114 | + <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 115 | + <collectionProp name="HeaderManager.headers"> |
| 116 | + <elementProp name="" elementType="Header"> |
| 117 | + <stringProp name="Header.name">Content-Type</stringProp> |
| 118 | + <stringProp name="Header.value">application/sparql-query</stringProp> |
| 119 | + </elementProp> |
| 120 | + </collectionProp> |
| 121 | + </HeaderManager> |
| 122 | + <hashTree/> |
| 123 | + <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="HTTP Request" enabled="true"> |
| 124 | + <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 125 | + <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 126 | + <collectionProp name="Arguments.arguments"> |
| 127 | + <elementProp name="" elementType="HTTPArgument"> |
| 128 | + <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 129 | + <stringProp name="Argument.value">SELECT ?g ?x ?s { ?x ?y ?o GRAPH ?g { ?s ?p ?o } }</stringProp> |
| 130 | + <stringProp name="Argument.metadata">=</stringProp> |
| 131 | + </elementProp> |
| 132 | + </collectionProp> |
| 133 | + </elementProp> |
| 134 | + <stringProp name="HTTPSampler.domain">${HOSTNAME}</stringProp> |
| 135 | + <stringProp name="HTTPSampler.port">${PORT}</stringProp> |
| 136 | + <stringProp name="HTTPSampler.protocol"></stringProp> |
| 137 | + <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 138 | + <stringProp name="HTTPSampler.path">${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</stringProp> |
| 139 | + <stringProp name="HTTPSampler.method">POST</stringProp> |
| 140 | + <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 141 | + <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 142 | + <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 143 | + <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 144 | + <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 145 | + <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 146 | + <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 147 | + </HTTPSamplerProxy> |
| 148 | + <hashTree> |
| 149 | + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Code Assertion" enabled="true"> |
| 150 | + <collectionProp name="Asserion.test_strings"> |
| 151 | + <stringProp name="1977135218">(2|3)[0-9]{2}</stringProp> |
| 152 | + </collectionProp> |
| 153 | + <stringProp name="Assertion.custom_message">ERROR RESPONSE CODE</stringProp> |
| 154 | + <stringProp name="Assertion.test_field">Assertion.response_code</stringProp> |
| 155 | + <boolProp name="Assertion.assume_success">false</boolProp> |
| 156 | + <intProp name="Assertion.test_type">1</intProp> |
| 157 | + </ResponseAssertion> |
| 158 | + <hashTree/> |
| 159 | + <BeanShellAssertion guiclass="BeanShellAssertionGui" testclass="BeanShellAssertion" testname="Response Type Assertion" enabled="true"> |
| 160 | + <stringProp name="BeanShellAssertion.query">import org.apache.commons.lang3.StringUtils; |
| 161 | +Failure = !(StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+xml") || |
| 162 | + StringUtils.contains(new String(ResponseHeaders), "Content-Type: application/sparql-results+json")); |
| 163 | + |
| 164 | +if(Failure){ |
| 165 | + FailureMessage = "ERROR Response Type Assertion :\n"+ |
| 166 | + "EXPECTED \n"+ |
| 167 | + "Content-Type: application/sparql-results+xml or application/sparql-results+json \n"+ |
| 168 | + "ResponseHeaders :\n"+ |
| 169 | + new String(ResponseHeaders); |
| 170 | +}</stringProp> |
| 171 | + <stringProp name="BeanShellAssertion.filename"></stringProp> |
| 172 | + <stringProp name="BeanShellAssertion.parameters"></stringProp> |
| 173 | + <boolProp name="BeanShellAssertion.resetInterpreter">false</boolProp> |
| 174 | + </BeanShellAssertion> |
| 175 | + <hashTree/> |
| 176 | + <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Response Message Assertion" enabled="true"> |
| 177 | + <collectionProp name="Asserion.test_strings"> |
| 178 | + <stringProp name="103">g</stringProp> |
| 179 | + <stringProp name="120">x</stringProp> |
| 180 | + <stringProp name="115">s</stringProp> |
| 181 | + </collectionProp> |
| 182 | + <stringProp name="Assertion.custom_message"></stringProp> |
| 183 | + <stringProp name="Assertion.test_field">Assertion.response_data</stringProp> |
| 184 | + <boolProp name="Assertion.assume_success">false</boolProp> |
| 185 | + <intProp name="Assertion.test_type">2</intProp> |
| 186 | + </ResponseAssertion> |
| 187 | + <hashTree/> |
| 188 | + </hashTree> |
| 189 | + </hashTree> |
| 190 | + <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 191 | + <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 192 | + <objProp> |
| 193 | + <name>saveConfig</name> |
| 194 | + <value class="SampleSaveConfiguration"> |
| 195 | + <time>true</time> |
| 196 | + <latency>true</latency> |
| 197 | + <timestamp>true</timestamp> |
| 198 | + <success>true</success> |
| 199 | + <label>true</label> |
| 200 | + <code>true</code> |
| 201 | + <message>true</message> |
| 202 | + <threadName>true</threadName> |
| 203 | + <dataType>true</dataType> |
| 204 | + <encoding>false</encoding> |
| 205 | + <assertions>true</assertions> |
| 206 | + <subresults>true</subresults> |
| 207 | + <responseData>false</responseData> |
| 208 | + <samplerData>false</samplerData> |
| 209 | + <xml>false</xml> |
| 210 | + <fieldNames>true</fieldNames> |
| 211 | + <responseHeaders>false</responseHeaders> |
| 212 | + <requestHeaders>false</requestHeaders> |
| 213 | + <responseDataOnError>false</responseDataOnError> |
| 214 | + <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 215 | + <assertionsResultsToSave>0</assertionsResultsToSave> |
| 216 | + <bytes>true</bytes> |
| 217 | + <sentBytes>true</sentBytes> |
| 218 | + <threadCounts>true</threadCounts> |
| 219 | + <idleTime>true</idleTime> |
| 220 | + <connectTime>true</connectTime> |
| 221 | + </value> |
| 222 | + </objProp> |
| 223 | + <stringProp name="filename"></stringProp> |
| 224 | + </ResultCollector> |
| 225 | + <hashTree/> |
| 226 | + </hashTree> |
| 227 | + </hashTree> |
| 228 | +</jmeterTestPlan> |
0 commit comments