Scott Seabolt | 89e2e61 | 2018-03-09 22:55:58 -0500 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | ============LICENSE_START========================================== |
| 4 | ONAP : APPC |
| 5 | =================================================================== |
| 6 | Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. |
| 7 | =================================================================== |
| 8 | |
| 9 | Unless otherwise specified, all software contained herein is licensed |
| 10 | under the Apache License, Version 2.0 (the License); |
| 11 | you may not use this software except in compliance with the License. |
| 12 | You may obtain a copy of the License at |
| 13 | |
| 14 | http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | |
| 16 | Unless required by applicable law or agreed to in writing, software |
| 17 | distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 19 | See the License for the specific language governing permissions and |
| 20 | limitations under the License. |
| 21 | |
| 22 | ECOMP is a trademark and service mark of AT&T Intellectual Property. |
| 23 | ============LICENSE_END============================================ |
| 24 | --> |
| 25 | <jmeterTestPlan version="1.2" properties="4.0" jmeter="4.0 r1823414"> |
| 26 | <hashTree> |
| 27 | <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true"> |
| 28 | <stringProp name="TestPlan.comments"></stringProp> |
| 29 | <boolProp name="TestPlan.functional_mode">false</boolProp> |
| 30 | <boolProp name="TestPlan.serialize_threadgroups">false</boolProp> |
| 31 | <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 32 | <collectionProp name="Arguments.arguments"/> |
| 33 | </elementProp> |
| 34 | <stringProp name="TestPlan.user_define_classpath"></stringProp> |
| 35 | </TestPlan> |
| 36 | <hashTree> |
| 37 | <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Stability-Test-VM1 LCM Group" enabled="true"> |
| 38 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
| 39 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> |
| 40 | <boolProp name="LoopController.continue_forever">false</boolProp> |
| 41 | <stringProp name="LoopController.loops">1</stringProp> |
| 42 | </elementProp> |
| 43 | <stringProp name="ThreadGroup.num_threads">1</stringProp> |
| 44 | <stringProp name="ThreadGroup.ramp_time">1</stringProp> |
| 45 | <longProp name="ThreadGroup.start_time">1518473958000</longProp> |
| 46 | <longProp name="ThreadGroup.end_time">1518473958000</longProp> |
| 47 | <boolProp name="ThreadGroup.scheduler">false</boolProp> |
| 48 | <stringProp name="ThreadGroup.duration"></stringProp> |
| 49 | <stringProp name="ThreadGroup.delay"></stringProp> |
| 50 | </ThreadGroup> |
| 51 | <hashTree> |
| 52 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="RequestNumber" enabled="true"> |
| 53 | <stringProp name="CounterConfig.start">1</stringProp> |
| 54 | <stringProp name="CounterConfig.end"></stringProp> |
| 55 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 56 | <stringProp name="CounterConfig.name">request_number</stringProp> |
| 57 | <stringProp name="CounterConfig.format">000</stringProp> |
| 58 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 59 | </CounterConfig> |
| 60 | <hashTree/> |
| 61 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true"> |
| 62 | <stringProp name="delimiter">,</stringProp> |
| 63 | <stringProp name="fileEncoding"></stringProp> |
| 64 | <stringProp name="filename">appc-lcm-test.csv</stringProp> |
| 65 | <boolProp name="ignoreFirstLine">false</boolProp> |
| 66 | <boolProp name="quotedData">false</boolProp> |
| 67 | <boolProp name="recycle">true</boolProp> |
| 68 | <stringProp name="shareMode">shareMode.all</stringProp> |
| 69 | <boolProp name="stopThread">true</boolProp> |
| 70 | <stringProp name="variableNames">dmaap_ip,dmaap_topic_post,dmaap_topic_get,vnf_id,vm_id</stringProp> |
| 71 | </CSVDataSet> |
| 72 | <hashTree/> |
| 73 | <ConfigTestElement guiclass="SimpleConfigGui" testclass="ConfigTestElement" testname="Simple Config Element" enabled="true"/> |
| 74 | <hashTree/> |
| 75 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 76 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 77 | <objProp> |
| 78 | <name>saveConfig</name> |
| 79 | <value class="SampleSaveConfiguration"> |
| 80 | <time>true</time> |
| 81 | <latency>true</latency> |
| 82 | <timestamp>true</timestamp> |
| 83 | <success>true</success> |
| 84 | <label>true</label> |
| 85 | <code>true</code> |
| 86 | <message>true</message> |
| 87 | <threadName>true</threadName> |
| 88 | <dataType>true</dataType> |
| 89 | <encoding>false</encoding> |
| 90 | <assertions>true</assertions> |
| 91 | <subresults>true</subresults> |
| 92 | <responseData>false</responseData> |
| 93 | <samplerData>false</samplerData> |
| 94 | <xml>false</xml> |
| 95 | <fieldNames>false</fieldNames> |
| 96 | <responseHeaders>false</responseHeaders> |
| 97 | <requestHeaders>false</requestHeaders> |
| 98 | <responseDataOnError>false</responseDataOnError> |
| 99 | <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> |
| 100 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 101 | <bytes>true</bytes> |
| 102 | </value> |
| 103 | </objProp> |
| 104 | <stringProp name="filename"></stringProp> |
| 105 | </ResultCollector> |
| 106 | <hashTree/> |
| 107 | <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="false"> |
| 108 | <boolProp name="LoopController.continue_forever">true</boolProp> |
| 109 | <stringProp name="LoopController.loops">3</stringProp> |
| 110 | </LoopController> |
| 111 | <hashTree> |
| 112 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Restart Transaction Controller" enabled="false"> |
| 113 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 114 | <boolProp name="TransactionController.parent">false</boolProp> |
| 115 | </TransactionController> |
| 116 | <hashTree> |
| 117 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 118 | <boolProp name="resetInterpreter">false</boolProp> |
| 119 | <stringProp name="parameters"></stringProp> |
| 120 | <stringProp name="filename"></stringProp> |
| 121 | <stringProp name="script">vars.put("RESTART_ACCEPTED","WAITING"); |
| 122 | |
| 123 | StringBuilder timestamp = new StringBuilder(); |
| 124 | //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</stringProp> |
| 125 | </BeanShellPreProcessor> |
| 126 | <hashTree/> |
| 127 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Restart HTTP Request" enabled="true"> |
| 128 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 129 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 130 | <collectionProp name="Arguments.arguments"> |
| 131 | <elementProp name="" elementType="HTTPArgument"> |
| 132 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 133 | <stringProp name="Argument.value">{
 |
| 134 | "version": "2.01",
 |
| 135 | "rpc-name": "restart",
 |
| 136 | "correlation-id": "${request_id}",
 |
| 137 | "type": "request",
 |
| 138 | "body": {
 |
| 139 | "input": {
 |
| 140 | "common-header": {
 |
| 141 | "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z",
 |
| 142 | "api-ver": "2.05",
 |
| 143 | "originator-id": "${request_id}",
 |
| 144 | "request-id": "${request_id}",
 |
| 145 | "sub-request-id": "1",
 |
| 146 | "flags": {
 |
| 147 | "force": "TRUE",
 |
| 148 | "ttl": 60000
 |
| 149 | }
 |
| 150 | },
 |
| 151 | "action": "Restart",
 |
| 152 | "action-identifiers": {
 |
| 153 | "vnf-id": "${vnf_id}",
 |
| 154 | "vserver-id": "${vm-id}"
 |
| 155 | },
 |
| 156 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/799ea611-bb36-4e49-b043-964f20c442d5\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 157 | }
 |
| 158 | }
 |
| 159 | }</stringProp> |
| 160 | <stringProp name="Argument.metadata">=</stringProp> |
| 161 | </elementProp> |
| 162 | </collectionProp> |
| 163 | </elementProp> |
| 164 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 165 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 166 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 167 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 168 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-READ</stringProp> |
| 169 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 170 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 171 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 172 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 173 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 174 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 175 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 176 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 177 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 178 | </HTTPSamplerProxy> |
| 179 | <hashTree> |
| 180 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor - ReqeustJSON Generator" enabled="true"> |
| 181 | <stringProp name="filename"></stringProp> |
| 182 | <stringProp name="parameters"></stringProp> |
| 183 | <boolProp name="resetInterpreter">false</boolProp> |
| 184 | <stringProp name="script">StringBuilder result = new StringBuilder(); |
| 185 | String newline = System.getProperty("line.separator"); |
| 186 | //int max = Integer.parseInt(Parameters); |
| 187 | //Random random = new Random(); |
| 188 | |
| 189 | //int counter = Integer.parseInt(vars.get("request-id")); |
| 190 | |
| 191 | result.append("{"); |
| 192 | //result.append("\"version\": \"2.01\","); |
| 193 | //result.append("\"rpc-name\": \"restart\","); |
| 194 | //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); |
| 195 | //result.append(newline); |
| 196 | //result.append("\"type\": \"request\","); |
| 197 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 198 | //result.append(newline); |
| 199 | //result.append("\"body\": {"); |
| 200 | //result.append(newline); |
| 201 | //result.append("\"input\": {"); |
| 202 | //result.append(newline); |
| 203 | //result.append("\"common-header\": {"); |
| 204 | //result.append(newline); |
| 205 | //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); |
| 206 | //result.append(newline); |
| 207 | //result.append("\"api-ver\": \"2.05\","); |
| 208 | //result.append(newline); |
| 209 | //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 210 | //result.append(newline); |
| 211 | //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 212 | //result.append(newline); |
| 213 | //result.append("\"sub-request-id\": \"1\","); |
| 214 | //result.append(newline); |
| 215 | //result.append("\"flags\": {"); |
| 216 | //result.append(newline); |
| 217 | //result.append("\"force\": \"TRUE\","); |
| 218 | //result.append(newline); |
| 219 | //result.append("\"ttl\": 60000"); |
| 220 | //result.append(newline); |
| 221 | //result.append("}"); |
| 222 | //result.append(newline); |
| 223 | //result.append("},"); |
| 224 | //result.append(newline); |
| 225 | //result.append("\"action\": \"Restart\","); |
| 226 | //result.append(newline); |
| 227 | //result.append("\"action-identifiers\": {"); |
| 228 | //result.append(newline); |
| 229 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 230 | //result.append(newline); |
| 231 | //result.append("}"); |
| 232 | //result.append(newline); |
| 233 | //result.append("}"); |
| 234 | //result.append(newline); |
| 235 | //result.append("}"); |
| 236 | result.append(newline); |
| 237 | result.append("}"); |
| 238 | |
| 239 | vars.put("json",result.toString());</stringProp> |
| 240 | </BeanShellPreProcessor> |
| 241 | <hashTree/> |
| 242 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 243 | <collectionProp name="HeaderManager.headers"> |
| 244 | <elementProp name="" elementType="Header"> |
| 245 | <stringProp name="Header.name">Content-Type</stringProp> |
| 246 | <stringProp name="Header.value">application/json</stringProp> |
| 247 | </elementProp> |
| 248 | </collectionProp> |
| 249 | </HeaderManager> |
| 250 | <hashTree/> |
| 251 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 252 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 253 | <objProp> |
| 254 | <name>saveConfig</name> |
| 255 | <value class="SampleSaveConfiguration"> |
| 256 | <time>true</time> |
| 257 | <latency>true</latency> |
| 258 | <timestamp>true</timestamp> |
| 259 | <success>true</success> |
| 260 | <label>true</label> |
| 261 | <code>true</code> |
| 262 | <message>true</message> |
| 263 | <threadName>true</threadName> |
| 264 | <dataType>true</dataType> |
| 265 | <encoding>false</encoding> |
| 266 | <assertions>true</assertions> |
| 267 | <subresults>true</subresults> |
| 268 | <responseData>false</responseData> |
| 269 | <samplerData>false</samplerData> |
| 270 | <xml>false</xml> |
| 271 | <fieldNames>true</fieldNames> |
| 272 | <responseHeaders>false</responseHeaders> |
| 273 | <requestHeaders>false</requestHeaders> |
| 274 | <responseDataOnError>false</responseDataOnError> |
| 275 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 276 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 277 | <bytes>true</bytes> |
| 278 | <sentBytes>true</sentBytes> |
| 279 | <threadCounts>true</threadCounts> |
| 280 | <idleTime>true</idleTime> |
| 281 | <connectTime>true</connectTime> |
| 282 | </value> |
| 283 | </objProp> |
| 284 | <stringProp name="filename"></stringProp> |
| 285 | </ResultCollector> |
| 286 | <hashTree/> |
| 287 | </hashTree> |
| 288 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response" enabled="true"> |
| 289 | <stringProp name="WhileController.condition">${__javaScript("${RESTART_ACCEPTED}"=="WAITING")}</stringProp> |
| 290 | </WhileController> |
| 291 | <hashTree> |
| 292 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 293 | <stringProp name="CounterConfig.start">1</stringProp> |
| 294 | <stringProp name="CounterConfig.end"></stringProp> |
| 295 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 296 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 297 | <stringProp name="CounterConfig.format"></stringProp> |
| 298 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 299 | </CounterConfig> |
| 300 | <hashTree/> |
| 301 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Restart HTTP Accepted" enabled="true"> |
| 302 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 303 | <collectionProp name="Arguments.arguments"> |
| 304 | <elementProp name="filter" elementType="HTTPArgument"> |
| 305 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 306 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${request_id}"}</stringProp> |
| 307 | <stringProp name="Argument.metadata">=</stringProp> |
| 308 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 309 | <stringProp name="Argument.name">filter</stringProp> |
| 310 | </elementProp> |
| 311 | </collectionProp> |
| 312 | </elementProp> |
| 313 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 314 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 315 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 316 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 317 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-WRITE/appc-jmeter/${__threadNum}</stringProp> |
| 318 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 319 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 320 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 321 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 322 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 323 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 324 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 325 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 326 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 327 | </HTTPSamplerProxy> |
| 328 | <hashTree> |
| 329 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 330 | <collectionProp name="HeaderManager.headers"> |
| 331 | <elementProp name="" elementType="Header"> |
| 332 | <stringProp name="Header.name">Content-Type</stringProp> |
| 333 | <stringProp name="Header.value">application/json</stringProp> |
| 334 | </elementProp> |
| 335 | </collectionProp> |
| 336 | </HeaderManager> |
| 337 | <hashTree/> |
| 338 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 339 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 340 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 341 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 342 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 343 | </JSONPostProcessor> |
| 344 | <hashTree/> |
| 345 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 346 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 347 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 348 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 349 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 350 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 351 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 352 | </RegexExtractor> |
| 353 | <hashTree/> |
| 354 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 355 | <stringProp name="cacheKey">true</stringProp> |
| 356 | <stringProp name="filename"></stringProp> |
| 357 | <stringProp name="parameters"></stringProp> |
| 358 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 359 | String requestId = vars.get("request_id"); |
| 360 | |
| 361 | log.info("Restart " + requestId + " acceptance response = " + jsonMessage); |
| 362 | |
| 363 | if(jsonMessage != "WAITING"){ |
| 364 | vars.put("RESTART_ACCEPTED",jsonMessage); |
| 365 | } |
| 366 | </stringProp> |
| 367 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 368 | </JSR223Assertion> |
| 369 | <hashTree/> |
| 370 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 371 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 372 | <objProp> |
| 373 | <name>saveConfig</name> |
| 374 | <value class="SampleSaveConfiguration"> |
| 375 | <time>true</time> |
| 376 | <latency>true</latency> |
| 377 | <timestamp>true</timestamp> |
| 378 | <success>true</success> |
| 379 | <label>true</label> |
| 380 | <code>true</code> |
| 381 | <message>true</message> |
| 382 | <threadName>true</threadName> |
| 383 | <dataType>true</dataType> |
| 384 | <encoding>false</encoding> |
| 385 | <assertions>true</assertions> |
| 386 | <subresults>true</subresults> |
| 387 | <responseData>false</responseData> |
| 388 | <samplerData>false</samplerData> |
| 389 | <xml>false</xml> |
| 390 | <fieldNames>true</fieldNames> |
| 391 | <responseHeaders>false</responseHeaders> |
| 392 | <requestHeaders>false</requestHeaders> |
| 393 | <responseDataOnError>false</responseDataOnError> |
| 394 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 395 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 396 | <bytes>true</bytes> |
| 397 | <sentBytes>true</sentBytes> |
| 398 | <threadCounts>true</threadCounts> |
| 399 | <idleTime>true</idleTime> |
| 400 | <connectTime>true</connectTime> |
| 401 | </value> |
| 402 | </objProp> |
| 403 | <stringProp name="filename"></stringProp> |
| 404 | </ResultCollector> |
| 405 | <hashTree/> |
| 406 | </hashTree> |
| 407 | </hashTree> |
| 408 | </hashTree> |
| 409 | </hashTree> |
| 410 | <RandomController guiclass="RandomControlGui" testclass="RandomController" testname="Random Controller" enabled="true"> |
| 411 | <intProp name="InterleaveControl.style">1</intProp> |
| 412 | </RandomController> |
| 413 | <hashTree> |
| 414 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Restart Transaction Controller" enabled="true"> |
| 415 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 416 | <boolProp name="TransactionController.parent">false</boolProp> |
| 417 | </TransactionController> |
| 418 | <hashTree> |
| 419 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 420 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 421 | <objProp> |
| 422 | <name>saveConfig</name> |
| 423 | <value class="SampleSaveConfiguration"> |
| 424 | <time>true</time> |
| 425 | <latency>true</latency> |
| 426 | <timestamp>true</timestamp> |
| 427 | <success>true</success> |
| 428 | <label>true</label> |
| 429 | <code>true</code> |
| 430 | <message>true</message> |
| 431 | <threadName>true</threadName> |
| 432 | <dataType>true</dataType> |
| 433 | <encoding>false</encoding> |
| 434 | <assertions>true</assertions> |
| 435 | <subresults>true</subresults> |
| 436 | <responseData>false</responseData> |
| 437 | <samplerData>false</samplerData> |
| 438 | <xml>false</xml> |
| 439 | <fieldNames>true</fieldNames> |
| 440 | <responseHeaders>false</responseHeaders> |
| 441 | <requestHeaders>false</requestHeaders> |
| 442 | <responseDataOnError>false</responseDataOnError> |
| 443 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 444 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 445 | <bytes>true</bytes> |
| 446 | <sentBytes>true</sentBytes> |
| 447 | <threadCounts>true</threadCounts> |
| 448 | <idleTime>true</idleTime> |
| 449 | <connectTime>true</connectTime> |
| 450 | </value> |
| 451 | </objProp> |
| 452 | <stringProp name="filename"></stringProp> |
| 453 | </ResultCollector> |
| 454 | <hashTree/> |
| 455 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Submit request via DMaaP" enabled="true"> |
| 456 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 457 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 458 | <collectionProp name="Arguments.arguments"> |
| 459 | <elementProp name="" elementType="HTTPArgument"> |
| 460 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 461 | <stringProp name="Argument.value">{
 |
| 462 | "version": "2.01",
 |
| 463 | "rpc-name": "restart",
 |
| 464 | "correlation-id": "${transaction_id}",
 |
| 465 | "type": "request",
 |
| 466 | "body": {
 |
| 467 | "input": {
 |
| 468 | "common-header": {
 |
| 469 | "timestamp": "${reqeust_timestamp}",
 |
| 470 | "api-ver": "2.05",
 |
| 471 | "originator-id": "${transaction_id}",
 |
| 472 | "request-id": "${transaction_id}",
 |
| 473 | "sub-request-id": "1",
 |
| 474 | "flags": {
 |
| 475 | "force": "TRUE",
 |
| 476 | "ttl": 60000
 |
| 477 | }
 |
| 478 | },
 |
| 479 | "action": "Restart",
 |
| 480 | "action-identifiers": {
 |
| 481 | "vnf-id": "${vnf_id}",
 |
| 482 | "vserver-id": "${vm-id}"
 |
| 483 | },
 |
| 484 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/799ea611-bb36-4e49-b043-964f20c442d5\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 485 | }
 |
| 486 | }
 |
| 487 | }</stringProp> |
| 488 | <stringProp name="Argument.metadata">=</stringProp> |
| 489 | </elementProp> |
| 490 | </collectionProp> |
| 491 | </elementProp> |
| 492 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 493 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 494 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 495 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 496 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_post}</stringProp> |
| 497 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 498 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 499 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 500 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 501 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 502 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 503 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 504 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 505 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 506 | </HTTPSamplerProxy> |
| 507 | <hashTree> |
| 508 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 509 | <boolProp name="resetInterpreter">false</boolProp> |
| 510 | <stringProp name="parameters"></stringProp> |
| 511 | <stringProp name="filename"></stringProp> |
| 512 | <stringProp name="script">import java.text.SimpleDateFormat; |
| 513 | |
| 514 | String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; |
| 515 | SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); |
| 516 | isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); |
| 517 | |
| 518 | Calendar currentTime = Calendar.getInstance(); |
| 519 | |
| 520 | String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); |
| 521 | vars.put("reqeust_timestamp",timeStampZuluStr); |
| 522 | vars.put("action_accepted","WAITING"); |
| 523 | vars.put("action_completed","WAITING"); |
| 524 | vars.put("accepted_retry_limit","3"); |
| 525 | vars.put("completed_retry_limit","20"); |
| 526 | vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); |
| 527 | |
| 528 | log.info(vars.get("reqeust_timestamp") + " Begin Restart transaction : " + vars.get("transaction_id"));</stringProp> |
| 529 | </BeanShellPreProcessor> |
| 530 | <hashTree/> |
| 531 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 532 | <collectionProp name="HeaderManager.headers"> |
| 533 | <elementProp name="" elementType="Header"> |
| 534 | <stringProp name="Header.name">Content-Type</stringProp> |
| 535 | <stringProp name="Header.value">application/json</stringProp> |
| 536 | </elementProp> |
| 537 | </collectionProp> |
| 538 | </HeaderManager> |
| 539 | <hashTree/> |
| 540 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 541 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 542 | <objProp> |
| 543 | <name>saveConfig</name> |
| 544 | <value class="SampleSaveConfiguration"> |
| 545 | <time>true</time> |
| 546 | <latency>true</latency> |
| 547 | <timestamp>true</timestamp> |
| 548 | <success>true</success> |
| 549 | <label>true</label> |
| 550 | <code>true</code> |
| 551 | <message>true</message> |
| 552 | <threadName>true</threadName> |
| 553 | <dataType>true</dataType> |
| 554 | <encoding>false</encoding> |
| 555 | <assertions>true</assertions> |
| 556 | <subresults>true</subresults> |
| 557 | <responseData>false</responseData> |
| 558 | <samplerData>false</samplerData> |
| 559 | <xml>false</xml> |
| 560 | <fieldNames>true</fieldNames> |
| 561 | <responseHeaders>false</responseHeaders> |
| 562 | <requestHeaders>false</requestHeaders> |
| 563 | <responseDataOnError>false</responseDataOnError> |
| 564 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 565 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 566 | <bytes>true</bytes> |
| 567 | <sentBytes>true</sentBytes> |
| 568 | <threadCounts>true</threadCounts> |
| 569 | <idleTime>true</idleTime> |
| 570 | <connectTime>true</connectTime> |
| 571 | </value> |
| 572 | </objProp> |
| 573 | <stringProp name="filename"></stringProp> |
| 574 | </ResultCollector> |
| 575 | <hashTree/> |
| 576 | </hashTree> |
| 577 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response via DMaaP" enabled="true"> |
| 578 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="WAITING")}</stringProp> |
| 579 | </WhileController> |
| 580 | <hashTree> |
| 581 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 582 | <stringProp name="ConstantTimer.delay">3000</stringProp> |
| 583 | </ConstantTimer> |
| 584 | <hashTree/> |
| 585 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 586 | <stringProp name="CounterConfig.start">1</stringProp> |
| 587 | <stringProp name="CounterConfig.end"></stringProp> |
| 588 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 589 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 590 | <stringProp name="CounterConfig.format"></stringProp> |
| 591 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 592 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 593 | </CounterConfig> |
| 594 | <hashTree/> |
| 595 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SYNC(accepted/rejectd) response via DMaaP" enabled="true"> |
| 596 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 597 | <collectionProp name="Arguments.arguments"> |
| 598 | <elementProp name="filter" elementType="HTTPArgument"> |
| 599 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 600 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${transaction_id}"}</stringProp> |
| 601 | <stringProp name="Argument.metadata">=</stringProp> |
| 602 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 603 | <stringProp name="Argument.name">filter</stringProp> |
| 604 | </elementProp> |
| 605 | </collectionProp> |
| 606 | </elementProp> |
| 607 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 608 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 609 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 610 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 611 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 612 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 613 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 614 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 615 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 616 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 617 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 618 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 619 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 620 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 621 | </HTTPSamplerProxy> |
| 622 | <hashTree> |
| 623 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 624 | <collectionProp name="HeaderManager.headers"> |
| 625 | <elementProp name="" elementType="Header"> |
| 626 | <stringProp name="Header.name">Content-Type</stringProp> |
| 627 | <stringProp name="Header.value">application/json</stringProp> |
| 628 | </elementProp> |
| 629 | </collectionProp> |
| 630 | </HeaderManager> |
| 631 | <hashTree/> |
| 632 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 633 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 634 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 635 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 636 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 637 | </JSONPostProcessor> |
| 638 | <hashTree/> |
| 639 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 640 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 641 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 642 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 643 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 644 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 645 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 646 | </RegexExtractor> |
| 647 | <hashTree/> |
| 648 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 649 | <stringProp name="cacheKey">true</stringProp> |
| 650 | <stringProp name="filename"></stringProp> |
| 651 | <stringProp name="parameters"></stringProp> |
| 652 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 653 | String requestId = vars.get("transaction_id"); |
| 654 | int retries = Integer.parseInt(vars.get("acceptance_retry")); |
| 655 | int limit = Integer.parseInt(vars.get("accepted_retry_limit")); |
| 656 | |
| 657 | log.info("Restart " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); |
| 658 | log.info("action_accepted=" + vars.get("action_accepted")); |
| 659 | log.info("action_completed=" + vars.get("action_completed")); |
| 660 | |
| 661 | if(jsonMessage != "WAITING"){ |
| 662 | log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); |
| 663 | vars.put("action_accepted",jsonMessage); |
| 664 | }else if(retries >= limit){ |
| 665 | log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); |
| 666 | vars.put("action_accepted","TIMEOUT"); |
| 667 | } |
| 668 | |
| 669 | </stringProp> |
| 670 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 671 | </JSR223Assertion> |
| 672 | <hashTree/> |
| 673 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 674 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 675 | <objProp> |
| 676 | <name>saveConfig</name> |
| 677 | <value class="SampleSaveConfiguration"> |
| 678 | <time>true</time> |
| 679 | <latency>true</latency> |
| 680 | <timestamp>true</timestamp> |
| 681 | <success>true</success> |
| 682 | <label>true</label> |
| 683 | <code>true</code> |
| 684 | <message>true</message> |
| 685 | <threadName>true</threadName> |
| 686 | <dataType>true</dataType> |
| 687 | <encoding>false</encoding> |
| 688 | <assertions>true</assertions> |
| 689 | <subresults>true</subresults> |
| 690 | <responseData>false</responseData> |
| 691 | <samplerData>false</samplerData> |
| 692 | <xml>false</xml> |
| 693 | <fieldNames>true</fieldNames> |
| 694 | <responseHeaders>false</responseHeaders> |
| 695 | <requestHeaders>false</requestHeaders> |
| 696 | <responseDataOnError>false</responseDataOnError> |
| 697 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 698 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 699 | <bytes>true</bytes> |
| 700 | <sentBytes>true</sentBytes> |
| 701 | <threadCounts>true</threadCounts> |
| 702 | <idleTime>true</idleTime> |
| 703 | <connectTime>true</connectTime> |
| 704 | </value> |
| 705 | </objProp> |
| 706 | <stringProp name="filename"></stringProp> |
| 707 | </ResultCollector> |
| 708 | <hashTree/> |
| 709 | </hashTree> |
| 710 | </hashTree> |
| 711 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Final Response via DMaaP" enabled="true"> |
| 712 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")}</stringProp> |
| 713 | </WhileController> |
| 714 | <hashTree> |
| 715 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 716 | <stringProp name="ConstantTimer.delay">10000</stringProp> |
| 717 | </ConstantTimer> |
| 718 | <hashTree/> |
| 719 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="completed_retry" enabled="true"> |
| 720 | <stringProp name="CounterConfig.start">1</stringProp> |
| 721 | <stringProp name="CounterConfig.end"></stringProp> |
| 722 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 723 | <stringProp name="CounterConfig.name">completed_retry</stringProp> |
| 724 | <stringProp name="CounterConfig.format"></stringProp> |
| 725 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 726 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 727 | </CounterConfig> |
| 728 | <hashTree/> |
| 729 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="ASYNC(completed) response via DMaaP " enabled="true"> |
| 730 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 731 | <collectionProp name="Arguments.arguments"/> |
| 732 | </elementProp> |
| 733 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 734 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 735 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 736 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 737 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 738 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 739 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 740 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 741 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 742 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 743 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 744 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 745 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 746 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 747 | </HTTPSamplerProxy> |
| 748 | <hashTree> |
| 749 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 750 | <collectionProp name="HeaderManager.headers"> |
| 751 | <elementProp name="" elementType="Header"> |
| 752 | <stringProp name="Header.name">Content-Type</stringProp> |
| 753 | <stringProp name="Header.value">application/json</stringProp> |
| 754 | </elementProp> |
| 755 | </collectionProp> |
| 756 | </HeaderManager> |
| 757 | <hashTree/> |
| 758 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 759 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 760 | <stringProp name="RegexExtractor.refname">finished_message</stringProp> |
| 761 | <stringProp name="RegexExtractor.regex">"reason\\":\\"(.*?)\\"</stringProp> |
| 762 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 763 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 764 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 765 | </RegexExtractor> |
| 766 | <hashTree/> |
| 767 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 768 | <stringProp name="cacheKey">true</stringProp> |
| 769 | <stringProp name="filename"></stringProp> |
| 770 | <stringProp name="parameters"></stringProp> |
| 771 | <stringProp name="script">String jsonMessage = vars.get("finished_message"); |
| 772 | String requestId = vars.get("transaction_id"); |
| 773 | int retries = Integer.parseInt(vars.get("completed_retry")); |
| 774 | int limit = Integer.parseInt(vars.get("completed_retry_limit")); |
| 775 | |
| 776 | log.info("Restart " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); |
| 777 | |
| 778 | if(jsonMessage != "WAITING"){ |
| 779 | vars.put("action_completed",jsonMessage); |
| 780 | }else if(retries >= limit){ |
| 781 | vars.put("action_completed","TIMEOUT"); |
| 782 | } |
| 783 | |
| 784 | </stringProp> |
| 785 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 786 | </JSR223Assertion> |
| 787 | <hashTree/> |
| 788 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 789 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 790 | <objProp> |
| 791 | <name>saveConfig</name> |
| 792 | <value class="SampleSaveConfiguration"> |
| 793 | <time>true</time> |
| 794 | <latency>true</latency> |
| 795 | <timestamp>true</timestamp> |
| 796 | <success>true</success> |
| 797 | <label>true</label> |
| 798 | <code>true</code> |
| 799 | <message>true</message> |
| 800 | <threadName>true</threadName> |
| 801 | <dataType>true</dataType> |
| 802 | <encoding>false</encoding> |
| 803 | <assertions>true</assertions> |
| 804 | <subresults>true</subresults> |
| 805 | <responseData>false</responseData> |
| 806 | <samplerData>false</samplerData> |
| 807 | <xml>false</xml> |
| 808 | <fieldNames>true</fieldNames> |
| 809 | <responseHeaders>false</responseHeaders> |
| 810 | <requestHeaders>false</requestHeaders> |
| 811 | <responseDataOnError>false</responseDataOnError> |
| 812 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 813 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 814 | <bytes>true</bytes> |
| 815 | <sentBytes>true</sentBytes> |
| 816 | <threadCounts>true</threadCounts> |
| 817 | <idleTime>true</idleTime> |
| 818 | <connectTime>true</connectTime> |
| 819 | </value> |
| 820 | </objProp> |
| 821 | <stringProp name="filename"></stringProp> |
| 822 | </ResultCollector> |
| 823 | <hashTree/> |
| 824 | </hashTree> |
| 825 | </hashTree> |
| 826 | </hashTree> |
| 827 | </hashTree> |
| 828 | </hashTree> |
| 829 | <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Stability-Test-VM2 LCM Group" enabled="true"> |
| 830 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
| 831 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> |
| 832 | <boolProp name="LoopController.continue_forever">false</boolProp> |
| 833 | <stringProp name="LoopController.loops">1</stringProp> |
| 834 | </elementProp> |
| 835 | <stringProp name="ThreadGroup.num_threads">1</stringProp> |
| 836 | <stringProp name="ThreadGroup.ramp_time">1</stringProp> |
| 837 | <longProp name="ThreadGroup.start_time">1518473958000</longProp> |
| 838 | <longProp name="ThreadGroup.end_time">1518473958000</longProp> |
| 839 | <boolProp name="ThreadGroup.scheduler">false</boolProp> |
| 840 | <stringProp name="ThreadGroup.duration"></stringProp> |
| 841 | <stringProp name="ThreadGroup.delay"></stringProp> |
| 842 | </ThreadGroup> |
| 843 | <hashTree> |
| 844 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="RequestNumber" enabled="true"> |
| 845 | <stringProp name="CounterConfig.start">1</stringProp> |
| 846 | <stringProp name="CounterConfig.end"></stringProp> |
| 847 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 848 | <stringProp name="CounterConfig.name">request_number</stringProp> |
| 849 | <stringProp name="CounterConfig.format">000</stringProp> |
| 850 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 851 | </CounterConfig> |
| 852 | <hashTree/> |
| 853 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true"> |
| 854 | <stringProp name="delimiter">,</stringProp> |
| 855 | <stringProp name="fileEncoding"></stringProp> |
| 856 | <stringProp name="filename">/home/ubuntu/appc-lcm-test-Stability-Test-VM2.csv</stringProp> |
| 857 | <boolProp name="ignoreFirstLine">false</boolProp> |
| 858 | <boolProp name="quotedData">false</boolProp> |
| 859 | <boolProp name="recycle">true</boolProp> |
| 860 | <stringProp name="shareMode">shareMode.all</stringProp> |
| 861 | <boolProp name="stopThread">true</boolProp> |
| 862 | <stringProp name="variableNames">dmaap_ip,dmaap_topic_post,dmaap_topic_get,vnf_id,vm_id</stringProp> |
| 863 | </CSVDataSet> |
| 864 | <hashTree/> |
| 865 | <ConfigTestElement guiclass="SimpleConfigGui" testclass="ConfigTestElement" testname="Simple Config Element" enabled="true"/> |
| 866 | <hashTree/> |
| 867 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 868 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 869 | <objProp> |
| 870 | <name>saveConfig</name> |
| 871 | <value class="SampleSaveConfiguration"> |
| 872 | <time>true</time> |
| 873 | <latency>true</latency> |
| 874 | <timestamp>true</timestamp> |
| 875 | <success>true</success> |
| 876 | <label>true</label> |
| 877 | <code>true</code> |
| 878 | <message>true</message> |
| 879 | <threadName>true</threadName> |
| 880 | <dataType>true</dataType> |
| 881 | <encoding>false</encoding> |
| 882 | <assertions>true</assertions> |
| 883 | <subresults>true</subresults> |
| 884 | <responseData>false</responseData> |
| 885 | <samplerData>false</samplerData> |
| 886 | <xml>false</xml> |
| 887 | <fieldNames>false</fieldNames> |
| 888 | <responseHeaders>false</responseHeaders> |
| 889 | <requestHeaders>false</requestHeaders> |
| 890 | <responseDataOnError>false</responseDataOnError> |
| 891 | <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> |
| 892 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 893 | <bytes>true</bytes> |
| 894 | </value> |
| 895 | </objProp> |
| 896 | <stringProp name="filename"></stringProp> |
| 897 | </ResultCollector> |
| 898 | <hashTree/> |
| 899 | <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Stop Loop Controller" enabled="false"> |
| 900 | <boolProp name="LoopController.continue_forever">true</boolProp> |
| 901 | <stringProp name="LoopController.loops">3</stringProp> |
| 902 | </LoopController> |
| 903 | <hashTree> |
| 904 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Stop Transaction Controller" enabled="false"> |
| 905 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 906 | <boolProp name="TransactionController.parent">false</boolProp> |
| 907 | </TransactionController> |
| 908 | <hashTree> |
| 909 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 910 | <boolProp name="resetInterpreter">false</boolProp> |
| 911 | <stringProp name="parameters"></stringProp> |
| 912 | <stringProp name="filename"></stringProp> |
| 913 | <stringProp name="script">vars.put("STOP_ACCEPTED","WAITING"); |
| 914 | |
| 915 | StringBuilder timestamp = new StringBuilder(); |
| 916 | //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</stringProp> |
| 917 | </BeanShellPreProcessor> |
| 918 | <hashTree/> |
| 919 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop HTTP Request" enabled="true"> |
| 920 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 921 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 922 | <collectionProp name="Arguments.arguments"> |
| 923 | <elementProp name="" elementType="HTTPArgument"> |
| 924 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 925 | <stringProp name="Argument.value">{
 |
| 926 | "version": "2.01",
 |
| 927 | "rpc-name": "stop",
 |
| 928 | "correlation-id": "${request_id}",
 |
| 929 | "type": "request",
 |
| 930 | "body": {
 |
| 931 | "input": {
 |
| 932 | "common-header": {
 |
| 933 | "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z",
 |
| 934 | "api-ver": "2.05",
 |
| 935 | "originator-id": "${request_id}",
 |
| 936 | "request-id": "${request_id}",
 |
| 937 | "sub-request-id": "1",
 |
| 938 | "flags": {
 |
| 939 | "force": "TRUE",
 |
| 940 | "ttl": 60000
 |
| 941 | }
 |
| 942 | },
 |
| 943 | "action": "Stop",
 |
| 944 | "action-identifiers": {
 |
| 945 | "vnf-id": "${vnf_id}",
 |
| 946 | "vserver-id": "${vm-id}"
 |
| 947 | },
 |
| 948 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/c0d9b8c7-9534-4a22-b464-d6aa2c930847\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 949 | }
 |
| 950 | }
 |
| 951 | }</stringProp> |
| 952 | <stringProp name="Argument.metadata">=</stringProp> |
| 953 | </elementProp> |
| 954 | </collectionProp> |
| 955 | </elementProp> |
| 956 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 957 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 958 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 959 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 960 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-READ</stringProp> |
| 961 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 962 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 963 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 964 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 965 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 966 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 967 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 968 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 969 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 970 | </HTTPSamplerProxy> |
| 971 | <hashTree> |
| 972 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor - ReqeustJSON Generator" enabled="true"> |
| 973 | <stringProp name="filename"></stringProp> |
| 974 | <stringProp name="parameters"></stringProp> |
| 975 | <boolProp name="resetInterpreter">false</boolProp> |
| 976 | <stringProp name="script">StringBuilder result = new StringBuilder(); |
| 977 | String newline = System.getProperty("line.separator"); |
| 978 | //int max = Integer.parseInt(Parameters); |
| 979 | //Random random = new Random(); |
| 980 | |
| 981 | //int counter = Integer.parseInt(vars.get("request-id")); |
| 982 | |
| 983 | result.append("{"); |
| 984 | //result.append("\"version\": \"2.01\","); |
| 985 | //result.append("\"rpc-name\": \"restart\","); |
| 986 | //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); |
| 987 | //result.append(newline); |
| 988 | //result.append("\"type\": \"request\","); |
| 989 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 990 | //result.append(newline); |
| 991 | //result.append("\"body\": {"); |
| 992 | //result.append(newline); |
| 993 | //result.append("\"input\": {"); |
| 994 | //result.append(newline); |
| 995 | //result.append("\"common-header\": {"); |
| 996 | //result.append(newline); |
| 997 | //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); |
| 998 | //result.append(newline); |
| 999 | //result.append("\"api-ver\": \"2.05\","); |
| 1000 | //result.append(newline); |
| 1001 | //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 1002 | //result.append(newline); |
| 1003 | //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 1004 | //result.append(newline); |
| 1005 | //result.append("\"sub-request-id\": \"1\","); |
| 1006 | //result.append(newline); |
| 1007 | //result.append("\"flags\": {"); |
| 1008 | //result.append(newline); |
| 1009 | //result.append("\"force\": \"TRUE\","); |
| 1010 | //result.append(newline); |
| 1011 | //result.append("\"ttl\": 60000"); |
| 1012 | //result.append(newline); |
| 1013 | //result.append("}"); |
| 1014 | //result.append(newline); |
| 1015 | //result.append("},"); |
| 1016 | //result.append(newline); |
| 1017 | //result.append("\"action\": \"Restart\","); |
| 1018 | //result.append(newline); |
| 1019 | //result.append("\"action-identifiers\": {"); |
| 1020 | //result.append(newline); |
| 1021 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 1022 | //result.append(newline); |
| 1023 | //result.append("}"); |
| 1024 | //result.append(newline); |
| 1025 | //result.append("}"); |
| 1026 | //result.append(newline); |
| 1027 | //result.append("}"); |
| 1028 | result.append(newline); |
| 1029 | result.append("}"); |
| 1030 | |
| 1031 | vars.put("json",result.toString());</stringProp> |
| 1032 | </BeanShellPreProcessor> |
| 1033 | <hashTree/> |
| 1034 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1035 | <collectionProp name="HeaderManager.headers"> |
| 1036 | <elementProp name="" elementType="Header"> |
| 1037 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1038 | <stringProp name="Header.value">application/json</stringProp> |
| 1039 | </elementProp> |
| 1040 | </collectionProp> |
| 1041 | </HeaderManager> |
| 1042 | <hashTree/> |
| 1043 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1044 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1045 | <objProp> |
| 1046 | <name>saveConfig</name> |
| 1047 | <value class="SampleSaveConfiguration"> |
| 1048 | <time>true</time> |
| 1049 | <latency>true</latency> |
| 1050 | <timestamp>true</timestamp> |
| 1051 | <success>true</success> |
| 1052 | <label>true</label> |
| 1053 | <code>true</code> |
| 1054 | <message>true</message> |
| 1055 | <threadName>true</threadName> |
| 1056 | <dataType>true</dataType> |
| 1057 | <encoding>false</encoding> |
| 1058 | <assertions>true</assertions> |
| 1059 | <subresults>true</subresults> |
| 1060 | <responseData>false</responseData> |
| 1061 | <samplerData>false</samplerData> |
| 1062 | <xml>false</xml> |
| 1063 | <fieldNames>true</fieldNames> |
| 1064 | <responseHeaders>false</responseHeaders> |
| 1065 | <requestHeaders>false</requestHeaders> |
| 1066 | <responseDataOnError>false</responseDataOnError> |
| 1067 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1068 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1069 | <bytes>true</bytes> |
| 1070 | <sentBytes>true</sentBytes> |
| 1071 | <threadCounts>true</threadCounts> |
| 1072 | <idleTime>true</idleTime> |
| 1073 | <connectTime>true</connectTime> |
| 1074 | </value> |
| 1075 | </objProp> |
| 1076 | <stringProp name="filename"></stringProp> |
| 1077 | </ResultCollector> |
| 1078 | <hashTree/> |
| 1079 | </hashTree> |
| 1080 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response" enabled="true"> |
| 1081 | <stringProp name="WhileController.condition">${__javaScript("${STOP_ACCEPTED}"=="WAITING")}</stringProp> |
| 1082 | </WhileController> |
| 1083 | <hashTree> |
| 1084 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 1085 | <stringProp name="CounterConfig.start">1</stringProp> |
| 1086 | <stringProp name="CounterConfig.end"></stringProp> |
| 1087 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 1088 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 1089 | <stringProp name="CounterConfig.format"></stringProp> |
| 1090 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 1091 | </CounterConfig> |
| 1092 | <hashTree/> |
| 1093 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Stop HTTP Accepted" enabled="true"> |
| 1094 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 1095 | <collectionProp name="Arguments.arguments"> |
| 1096 | <elementProp name="filter" elementType="HTTPArgument"> |
| 1097 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 1098 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${request_id}"}</stringProp> |
| 1099 | <stringProp name="Argument.metadata">=</stringProp> |
| 1100 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 1101 | <stringProp name="Argument.name">filter</stringProp> |
| 1102 | </elementProp> |
| 1103 | </collectionProp> |
| 1104 | </elementProp> |
| 1105 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 1106 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 1107 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 1108 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 1109 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-WRITE/appc-jmeter/${__threadNum}</stringProp> |
| 1110 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 1111 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 1112 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 1113 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 1114 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 1115 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 1116 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 1117 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 1118 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 1119 | </HTTPSamplerProxy> |
| 1120 | <hashTree> |
| 1121 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1122 | <collectionProp name="HeaderManager.headers"> |
| 1123 | <elementProp name="" elementType="Header"> |
| 1124 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1125 | <stringProp name="Header.value">application/json</stringProp> |
| 1126 | </elementProp> |
| 1127 | </collectionProp> |
| 1128 | </HeaderManager> |
| 1129 | <hashTree/> |
| 1130 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 1131 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 1132 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 1133 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 1134 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 1135 | </JSONPostProcessor> |
| 1136 | <hashTree/> |
| 1137 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 1138 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 1139 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 1140 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 1141 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 1142 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 1143 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 1144 | </RegexExtractor> |
| 1145 | <hashTree/> |
| 1146 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 1147 | <stringProp name="cacheKey">true</stringProp> |
| 1148 | <stringProp name="filename"></stringProp> |
| 1149 | <stringProp name="parameters"></stringProp> |
| 1150 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 1151 | String requestId = vars.get("request_id"); |
| 1152 | |
| 1153 | log.info("Stop " + requestId + " acceptance response = " + jsonMessage); |
| 1154 | |
| 1155 | if(jsonMessage != "WAITING"){ |
| 1156 | vars.put("STOP_ACCEPTED",jsonMessage); |
| 1157 | } |
| 1158 | </stringProp> |
| 1159 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 1160 | </JSR223Assertion> |
| 1161 | <hashTree/> |
| 1162 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1163 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1164 | <objProp> |
| 1165 | <name>saveConfig</name> |
| 1166 | <value class="SampleSaveConfiguration"> |
| 1167 | <time>true</time> |
| 1168 | <latency>true</latency> |
| 1169 | <timestamp>true</timestamp> |
| 1170 | <success>true</success> |
| 1171 | <label>true</label> |
| 1172 | <code>true</code> |
| 1173 | <message>true</message> |
| 1174 | <threadName>true</threadName> |
| 1175 | <dataType>true</dataType> |
| 1176 | <encoding>false</encoding> |
| 1177 | <assertions>true</assertions> |
| 1178 | <subresults>true</subresults> |
| 1179 | <responseData>false</responseData> |
| 1180 | <samplerData>false</samplerData> |
| 1181 | <xml>false</xml> |
| 1182 | <fieldNames>true</fieldNames> |
| 1183 | <responseHeaders>false</responseHeaders> |
| 1184 | <requestHeaders>false</requestHeaders> |
| 1185 | <responseDataOnError>false</responseDataOnError> |
| 1186 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1187 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1188 | <bytes>true</bytes> |
| 1189 | <sentBytes>true</sentBytes> |
| 1190 | <threadCounts>true</threadCounts> |
| 1191 | <idleTime>true</idleTime> |
| 1192 | <connectTime>true</connectTime> |
| 1193 | </value> |
| 1194 | </objProp> |
| 1195 | <stringProp name="filename"></stringProp> |
| 1196 | </ResultCollector> |
| 1197 | <hashTree/> |
| 1198 | </hashTree> |
| 1199 | </hashTree> |
| 1200 | </hashTree> |
| 1201 | </hashTree> |
| 1202 | <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Start Loop Controller" enabled="false"> |
| 1203 | <boolProp name="LoopController.continue_forever">true</boolProp> |
| 1204 | <stringProp name="LoopController.loops">3</stringProp> |
| 1205 | </LoopController> |
| 1206 | <hashTree> |
| 1207 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Start Transaction Controller" enabled="false"> |
| 1208 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 1209 | <boolProp name="TransactionController.parent">false</boolProp> |
| 1210 | </TransactionController> |
| 1211 | <hashTree> |
| 1212 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 1213 | <boolProp name="resetInterpreter">false</boolProp> |
| 1214 | <stringProp name="parameters"></stringProp> |
| 1215 | <stringProp name="filename"></stringProp> |
| 1216 | <stringProp name="script">vars.put("START_ACCEPTED","WAITING"); |
| 1217 | |
| 1218 | StringBuilder timestamp = new StringBuilder(); |
| 1219 | //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</stringProp> |
| 1220 | </BeanShellPreProcessor> |
| 1221 | <hashTree/> |
| 1222 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Start HTTP Request" enabled="true"> |
| 1223 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 1224 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 1225 | <collectionProp name="Arguments.arguments"> |
| 1226 | <elementProp name="" elementType="HTTPArgument"> |
| 1227 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 1228 | <stringProp name="Argument.value">{
 |
| 1229 | "version": "2.01",
 |
| 1230 | "rpc-name": "start",
 |
| 1231 | "correlation-id": "${request_id}",
 |
| 1232 | "type": "request",
 |
| 1233 | "body": {
 |
| 1234 | "input": {
 |
| 1235 | "common-header": {
 |
| 1236 | "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z",
 |
| 1237 | "api-ver": "2.05",
 |
| 1238 | "originator-id": "${request_id}",
 |
| 1239 | "request-id": "${request_id}",
 |
| 1240 | "sub-request-id": "1",
 |
| 1241 | "flags": {
 |
| 1242 | "force": "TRUE",
 |
| 1243 | "ttl": 60000
 |
| 1244 | }
 |
| 1245 | },
 |
| 1246 | "action": "Start",
 |
| 1247 | "action-identifiers": {
 |
| 1248 | "vnf-id": "${vnf_id}",
 |
| 1249 | "vserver-id": "${vm-id}"
 |
| 1250 | },
 |
| 1251 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/c0d9b8c7-9534-4a22-b464-d6aa2c930847\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 1252 | }
 |
| 1253 | }
 |
| 1254 | }</stringProp> |
| 1255 | <stringProp name="Argument.metadata">=</stringProp> |
| 1256 | </elementProp> |
| 1257 | </collectionProp> |
| 1258 | </elementProp> |
| 1259 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 1260 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 1261 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 1262 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 1263 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-READ</stringProp> |
| 1264 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 1265 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 1266 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 1267 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 1268 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 1269 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 1270 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 1271 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 1272 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 1273 | </HTTPSamplerProxy> |
| 1274 | <hashTree> |
| 1275 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor - ReqeustJSON Generator" enabled="true"> |
| 1276 | <stringProp name="filename"></stringProp> |
| 1277 | <stringProp name="parameters"></stringProp> |
| 1278 | <boolProp name="resetInterpreter">false</boolProp> |
| 1279 | <stringProp name="script">StringBuilder result = new StringBuilder(); |
| 1280 | String newline = System.getProperty("line.separator"); |
| 1281 | //int max = Integer.parseInt(Parameters); |
| 1282 | //Random random = new Random(); |
| 1283 | |
| 1284 | //int counter = Integer.parseInt(vars.get("request-id")); |
| 1285 | |
| 1286 | result.append("{"); |
| 1287 | //result.append("\"version\": \"2.01\","); |
| 1288 | //result.append("\"rpc-name\": \"restart\","); |
| 1289 | //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); |
| 1290 | //result.append(newline); |
| 1291 | //result.append("\"type\": \"request\","); |
| 1292 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 1293 | //result.append(newline); |
| 1294 | //result.append("\"body\": {"); |
| 1295 | //result.append(newline); |
| 1296 | //result.append("\"input\": {"); |
| 1297 | //result.append(newline); |
| 1298 | //result.append("\"common-header\": {"); |
| 1299 | //result.append(newline); |
| 1300 | //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); |
| 1301 | //result.append(newline); |
| 1302 | //result.append("\"api-ver\": \"2.05\","); |
| 1303 | //result.append(newline); |
| 1304 | //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 1305 | //result.append(newline); |
| 1306 | //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 1307 | //result.append(newline); |
| 1308 | //result.append("\"sub-request-id\": \"1\","); |
| 1309 | //result.append(newline); |
| 1310 | //result.append("\"flags\": {"); |
| 1311 | //result.append(newline); |
| 1312 | //result.append("\"force\": \"TRUE\","); |
| 1313 | //result.append(newline); |
| 1314 | //result.append("\"ttl\": 60000"); |
| 1315 | //result.append(newline); |
| 1316 | //result.append("}"); |
| 1317 | //result.append(newline); |
| 1318 | //result.append("},"); |
| 1319 | //result.append(newline); |
| 1320 | //result.append("\"action\": \"Restart\","); |
| 1321 | //result.append(newline); |
| 1322 | //result.append("\"action-identifiers\": {"); |
| 1323 | //result.append(newline); |
| 1324 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 1325 | //result.append(newline); |
| 1326 | //result.append("}"); |
| 1327 | //result.append(newline); |
| 1328 | //result.append("}"); |
| 1329 | //result.append(newline); |
| 1330 | //result.append("}"); |
| 1331 | result.append(newline); |
| 1332 | result.append("}"); |
| 1333 | |
| 1334 | vars.put("json",result.toString());</stringProp> |
| 1335 | </BeanShellPreProcessor> |
| 1336 | <hashTree/> |
| 1337 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1338 | <collectionProp name="HeaderManager.headers"> |
| 1339 | <elementProp name="" elementType="Header"> |
| 1340 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1341 | <stringProp name="Header.value">application/json</stringProp> |
| 1342 | </elementProp> |
| 1343 | </collectionProp> |
| 1344 | </HeaderManager> |
| 1345 | <hashTree/> |
| 1346 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1347 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1348 | <objProp> |
| 1349 | <name>saveConfig</name> |
| 1350 | <value class="SampleSaveConfiguration"> |
| 1351 | <time>true</time> |
| 1352 | <latency>true</latency> |
| 1353 | <timestamp>true</timestamp> |
| 1354 | <success>true</success> |
| 1355 | <label>true</label> |
| 1356 | <code>true</code> |
| 1357 | <message>true</message> |
| 1358 | <threadName>true</threadName> |
| 1359 | <dataType>true</dataType> |
| 1360 | <encoding>false</encoding> |
| 1361 | <assertions>true</assertions> |
| 1362 | <subresults>true</subresults> |
| 1363 | <responseData>false</responseData> |
| 1364 | <samplerData>false</samplerData> |
| 1365 | <xml>false</xml> |
| 1366 | <fieldNames>true</fieldNames> |
| 1367 | <responseHeaders>false</responseHeaders> |
| 1368 | <requestHeaders>false</requestHeaders> |
| 1369 | <responseDataOnError>false</responseDataOnError> |
| 1370 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1371 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1372 | <bytes>true</bytes> |
| 1373 | <sentBytes>true</sentBytes> |
| 1374 | <threadCounts>true</threadCounts> |
| 1375 | <idleTime>true</idleTime> |
| 1376 | <connectTime>true</connectTime> |
| 1377 | </value> |
| 1378 | </objProp> |
| 1379 | <stringProp name="filename"></stringProp> |
| 1380 | </ResultCollector> |
| 1381 | <hashTree/> |
| 1382 | </hashTree> |
| 1383 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response" enabled="true"> |
| 1384 | <stringProp name="WhileController.condition">${__javaScript("${START_ACCEPTED}"=="WAITING")}</stringProp> |
| 1385 | </WhileController> |
| 1386 | <hashTree> |
| 1387 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 1388 | <stringProp name="CounterConfig.start">1</stringProp> |
| 1389 | <stringProp name="CounterConfig.end"></stringProp> |
| 1390 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 1391 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 1392 | <stringProp name="CounterConfig.format"></stringProp> |
| 1393 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 1394 | </CounterConfig> |
| 1395 | <hashTree/> |
| 1396 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Restart HTTP Accepted" enabled="true"> |
| 1397 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 1398 | <collectionProp name="Arguments.arguments"> |
| 1399 | <elementProp name="filter" elementType="HTTPArgument"> |
| 1400 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 1401 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${request_id}"}</stringProp> |
| 1402 | <stringProp name="Argument.metadata">=</stringProp> |
| 1403 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 1404 | <stringProp name="Argument.name">filter</stringProp> |
| 1405 | </elementProp> |
| 1406 | </collectionProp> |
| 1407 | </elementProp> |
| 1408 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 1409 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 1410 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 1411 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 1412 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-WRITE/appc-jmeter/${__threadNum}</stringProp> |
| 1413 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 1414 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 1415 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 1416 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 1417 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 1418 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 1419 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 1420 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 1421 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 1422 | </HTTPSamplerProxy> |
| 1423 | <hashTree> |
| 1424 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1425 | <collectionProp name="HeaderManager.headers"> |
| 1426 | <elementProp name="" elementType="Header"> |
| 1427 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1428 | <stringProp name="Header.value">application/json</stringProp> |
| 1429 | </elementProp> |
| 1430 | </collectionProp> |
| 1431 | </HeaderManager> |
| 1432 | <hashTree/> |
| 1433 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 1434 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 1435 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 1436 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 1437 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 1438 | </JSONPostProcessor> |
| 1439 | <hashTree/> |
| 1440 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 1441 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 1442 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 1443 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 1444 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 1445 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 1446 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 1447 | </RegexExtractor> |
| 1448 | <hashTree/> |
| 1449 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 1450 | <stringProp name="cacheKey">true</stringProp> |
| 1451 | <stringProp name="filename"></stringProp> |
| 1452 | <stringProp name="parameters"></stringProp> |
| 1453 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 1454 | String requestId = vars.get("request_id"); |
| 1455 | |
| 1456 | log.info("Start " + requestId + " acceptance response = " + jsonMessage); |
| 1457 | |
| 1458 | if(jsonMessage != "WAITING"){ |
| 1459 | vars.put("START_ACCEPTED",jsonMessage); |
| 1460 | } |
| 1461 | </stringProp> |
| 1462 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 1463 | </JSR223Assertion> |
| 1464 | <hashTree/> |
| 1465 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1466 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1467 | <objProp> |
| 1468 | <name>saveConfig</name> |
| 1469 | <value class="SampleSaveConfiguration"> |
| 1470 | <time>true</time> |
| 1471 | <latency>true</latency> |
| 1472 | <timestamp>true</timestamp> |
| 1473 | <success>true</success> |
| 1474 | <label>true</label> |
| 1475 | <code>true</code> |
| 1476 | <message>true</message> |
| 1477 | <threadName>true</threadName> |
| 1478 | <dataType>true</dataType> |
| 1479 | <encoding>false</encoding> |
| 1480 | <assertions>true</assertions> |
| 1481 | <subresults>true</subresults> |
| 1482 | <responseData>false</responseData> |
| 1483 | <samplerData>false</samplerData> |
| 1484 | <xml>false</xml> |
| 1485 | <fieldNames>true</fieldNames> |
| 1486 | <responseHeaders>false</responseHeaders> |
| 1487 | <requestHeaders>false</requestHeaders> |
| 1488 | <responseDataOnError>false</responseDataOnError> |
| 1489 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1490 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1491 | <bytes>true</bytes> |
| 1492 | <sentBytes>true</sentBytes> |
| 1493 | <threadCounts>true</threadCounts> |
| 1494 | <idleTime>true</idleTime> |
| 1495 | <connectTime>true</connectTime> |
| 1496 | </value> |
| 1497 | </objProp> |
| 1498 | <stringProp name="filename"></stringProp> |
| 1499 | </ResultCollector> |
| 1500 | <hashTree/> |
| 1501 | </hashTree> |
| 1502 | </hashTree> |
| 1503 | </hashTree> |
| 1504 | </hashTree> |
| 1505 | <RandomController guiclass="RandomControlGui" testclass="RandomController" testname="Random Controller" enabled="true"> |
| 1506 | <intProp name="InterleaveControl.style">1</intProp> |
| 1507 | </RandomController> |
| 1508 | <hashTree> |
| 1509 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Stop Transaction Controller" enabled="true"> |
| 1510 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 1511 | <boolProp name="TransactionController.parent">false</boolProp> |
| 1512 | </TransactionController> |
| 1513 | <hashTree> |
| 1514 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1515 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1516 | <objProp> |
| 1517 | <name>saveConfig</name> |
| 1518 | <value class="SampleSaveConfiguration"> |
| 1519 | <time>true</time> |
| 1520 | <latency>true</latency> |
| 1521 | <timestamp>true</timestamp> |
| 1522 | <success>true</success> |
| 1523 | <label>true</label> |
| 1524 | <code>true</code> |
| 1525 | <message>true</message> |
| 1526 | <threadName>true</threadName> |
| 1527 | <dataType>true</dataType> |
| 1528 | <encoding>false</encoding> |
| 1529 | <assertions>true</assertions> |
| 1530 | <subresults>true</subresults> |
| 1531 | <responseData>false</responseData> |
| 1532 | <samplerData>false</samplerData> |
| 1533 | <xml>false</xml> |
| 1534 | <fieldNames>true</fieldNames> |
| 1535 | <responseHeaders>false</responseHeaders> |
| 1536 | <requestHeaders>false</requestHeaders> |
| 1537 | <responseDataOnError>false</responseDataOnError> |
| 1538 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1539 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1540 | <bytes>true</bytes> |
| 1541 | <sentBytes>true</sentBytes> |
| 1542 | <threadCounts>true</threadCounts> |
| 1543 | <idleTime>true</idleTime> |
| 1544 | <connectTime>true</connectTime> |
| 1545 | </value> |
| 1546 | </objProp> |
| 1547 | <stringProp name="filename"></stringProp> |
| 1548 | </ResultCollector> |
| 1549 | <hashTree/> |
| 1550 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Submit request via DMaaP" enabled="true"> |
| 1551 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 1552 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 1553 | <collectionProp name="Arguments.arguments"> |
| 1554 | <elementProp name="" elementType="HTTPArgument"> |
| 1555 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 1556 | <stringProp name="Argument.value">{
 |
| 1557 | "version": "2.01",
 |
| 1558 | "rpc-name": "stop",
 |
| 1559 | "correlation-id": "${transaction_id}",
 |
| 1560 | "type": "request",
 |
| 1561 | "body": {
 |
| 1562 | "input": {
 |
| 1563 | "common-header": {
 |
| 1564 | "timestamp": "${reqeust_timestamp}",
 |
| 1565 | "api-ver": "2.05",
 |
| 1566 | "originator-id": "${transaction_id}",
 |
| 1567 | "request-id": "${transaction_id}",
 |
| 1568 | "sub-request-id": "1",
 |
| 1569 | "flags": {
 |
| 1570 | "force": "TRUE",
 |
| 1571 | "ttl": 60000
 |
| 1572 | }
 |
| 1573 | },
 |
| 1574 | "action": "Stop",
 |
| 1575 | "action-identifiers": {
 |
| 1576 | "vnf-id": "${vnf_id}",
 |
| 1577 | "vserver-id": "${vm-id}"
 |
| 1578 | },
 |
| 1579 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/c0d9b8c7-9534-4a22-b464-d6aa2c930847\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 1580 | }
 |
| 1581 | }
 |
| 1582 | }</stringProp> |
| 1583 | <stringProp name="Argument.metadata">=</stringProp> |
| 1584 | </elementProp> |
| 1585 | </collectionProp> |
| 1586 | </elementProp> |
| 1587 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 1588 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 1589 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 1590 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 1591 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_post}</stringProp> |
| 1592 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 1593 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 1594 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 1595 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 1596 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 1597 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 1598 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 1599 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 1600 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 1601 | </HTTPSamplerProxy> |
| 1602 | <hashTree> |
| 1603 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 1604 | <boolProp name="resetInterpreter">false</boolProp> |
| 1605 | <stringProp name="parameters"></stringProp> |
| 1606 | <stringProp name="filename"></stringProp> |
| 1607 | <stringProp name="script">import java.text.SimpleDateFormat; |
| 1608 | |
| 1609 | String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; |
| 1610 | SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); |
| 1611 | isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); |
| 1612 | |
| 1613 | Calendar currentTime = Calendar.getInstance(); |
| 1614 | |
| 1615 | String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); |
| 1616 | vars.put("reqeust_timestamp",timeStampZuluStr); |
| 1617 | vars.put("action_accepted","WAITING"); |
| 1618 | vars.put("action_completed","WAITING"); |
| 1619 | vars.put("accepted_retry_limit","3"); |
| 1620 | vars.put("completed_retry_limit","20"); |
| 1621 | vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); |
| 1622 | |
| 1623 | log.info(vars.get("reqeust_timestamp") + " Begin Stop transaction : " + vars.get("transaction_id"));</stringProp> |
| 1624 | </BeanShellPreProcessor> |
| 1625 | <hashTree/> |
| 1626 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1627 | <collectionProp name="HeaderManager.headers"> |
| 1628 | <elementProp name="" elementType="Header"> |
| 1629 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1630 | <stringProp name="Header.value">application/json</stringProp> |
| 1631 | </elementProp> |
| 1632 | </collectionProp> |
| 1633 | </HeaderManager> |
| 1634 | <hashTree/> |
| 1635 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1636 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1637 | <objProp> |
| 1638 | <name>saveConfig</name> |
| 1639 | <value class="SampleSaveConfiguration"> |
| 1640 | <time>true</time> |
| 1641 | <latency>true</latency> |
| 1642 | <timestamp>true</timestamp> |
| 1643 | <success>true</success> |
| 1644 | <label>true</label> |
| 1645 | <code>true</code> |
| 1646 | <message>true</message> |
| 1647 | <threadName>true</threadName> |
| 1648 | <dataType>true</dataType> |
| 1649 | <encoding>false</encoding> |
| 1650 | <assertions>true</assertions> |
| 1651 | <subresults>true</subresults> |
| 1652 | <responseData>false</responseData> |
| 1653 | <samplerData>false</samplerData> |
| 1654 | <xml>false</xml> |
| 1655 | <fieldNames>true</fieldNames> |
| 1656 | <responseHeaders>false</responseHeaders> |
| 1657 | <requestHeaders>false</requestHeaders> |
| 1658 | <responseDataOnError>false</responseDataOnError> |
| 1659 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1660 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1661 | <bytes>true</bytes> |
| 1662 | <sentBytes>true</sentBytes> |
| 1663 | <threadCounts>true</threadCounts> |
| 1664 | <idleTime>true</idleTime> |
| 1665 | <connectTime>true</connectTime> |
| 1666 | </value> |
| 1667 | </objProp> |
| 1668 | <stringProp name="filename"></stringProp> |
| 1669 | </ResultCollector> |
| 1670 | <hashTree/> |
| 1671 | </hashTree> |
| 1672 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response via DMaaP" enabled="true"> |
| 1673 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="WAITING")}</stringProp> |
| 1674 | </WhileController> |
| 1675 | <hashTree> |
| 1676 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 1677 | <stringProp name="ConstantTimer.delay">3000</stringProp> |
| 1678 | </ConstantTimer> |
| 1679 | <hashTree/> |
| 1680 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 1681 | <stringProp name="CounterConfig.start">1</stringProp> |
| 1682 | <stringProp name="CounterConfig.end"></stringProp> |
| 1683 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 1684 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 1685 | <stringProp name="CounterConfig.format"></stringProp> |
| 1686 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 1687 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 1688 | </CounterConfig> |
| 1689 | <hashTree/> |
| 1690 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SYNC(accepted/rejectd) response via DMaaP" enabled="true"> |
| 1691 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 1692 | <collectionProp name="Arguments.arguments"> |
| 1693 | <elementProp name="filter" elementType="HTTPArgument"> |
| 1694 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 1695 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${transaction_id}"}</stringProp> |
| 1696 | <stringProp name="Argument.metadata">=</stringProp> |
| 1697 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 1698 | <stringProp name="Argument.name">filter</stringProp> |
| 1699 | </elementProp> |
| 1700 | </collectionProp> |
| 1701 | </elementProp> |
| 1702 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 1703 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 1704 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 1705 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 1706 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 1707 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 1708 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 1709 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 1710 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 1711 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 1712 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 1713 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 1714 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 1715 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 1716 | </HTTPSamplerProxy> |
| 1717 | <hashTree> |
| 1718 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1719 | <collectionProp name="HeaderManager.headers"> |
| 1720 | <elementProp name="" elementType="Header"> |
| 1721 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1722 | <stringProp name="Header.value">application/json</stringProp> |
| 1723 | </elementProp> |
| 1724 | </collectionProp> |
| 1725 | </HeaderManager> |
| 1726 | <hashTree/> |
| 1727 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 1728 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 1729 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 1730 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 1731 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 1732 | </JSONPostProcessor> |
| 1733 | <hashTree/> |
| 1734 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 1735 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 1736 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 1737 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 1738 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 1739 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 1740 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 1741 | </RegexExtractor> |
| 1742 | <hashTree/> |
| 1743 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 1744 | <stringProp name="cacheKey">true</stringProp> |
| 1745 | <stringProp name="filename"></stringProp> |
| 1746 | <stringProp name="parameters"></stringProp> |
| 1747 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 1748 | String requestId = vars.get("transaction_id"); |
| 1749 | int retries = Integer.parseInt(vars.get("acceptance_retry")); |
| 1750 | int limit = Integer.parseInt(vars.get("accepted_retry_limit")); |
| 1751 | |
| 1752 | log.info("Stop " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); |
| 1753 | log.info("action_accepted=" + vars.get("action_accepted")); |
| 1754 | log.info("action_completed=" + vars.get("action_completed")); |
| 1755 | |
| 1756 | if(jsonMessage != "WAITING"){ |
| 1757 | log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); |
| 1758 | vars.put("action_accepted",jsonMessage); |
| 1759 | }else if(retries >= limit){ |
| 1760 | log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); |
| 1761 | vars.put("action_accepted","TIMEOUT"); |
| 1762 | } |
| 1763 | |
| 1764 | </stringProp> |
| 1765 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 1766 | </JSR223Assertion> |
| 1767 | <hashTree/> |
| 1768 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1769 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1770 | <objProp> |
| 1771 | <name>saveConfig</name> |
| 1772 | <value class="SampleSaveConfiguration"> |
| 1773 | <time>true</time> |
| 1774 | <latency>true</latency> |
| 1775 | <timestamp>true</timestamp> |
| 1776 | <success>true</success> |
| 1777 | <label>true</label> |
| 1778 | <code>true</code> |
| 1779 | <message>true</message> |
| 1780 | <threadName>true</threadName> |
| 1781 | <dataType>true</dataType> |
| 1782 | <encoding>false</encoding> |
| 1783 | <assertions>true</assertions> |
| 1784 | <subresults>true</subresults> |
| 1785 | <responseData>false</responseData> |
| 1786 | <samplerData>false</samplerData> |
| 1787 | <xml>false</xml> |
| 1788 | <fieldNames>true</fieldNames> |
| 1789 | <responseHeaders>false</responseHeaders> |
| 1790 | <requestHeaders>false</requestHeaders> |
| 1791 | <responseDataOnError>false</responseDataOnError> |
| 1792 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1793 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1794 | <bytes>true</bytes> |
| 1795 | <sentBytes>true</sentBytes> |
| 1796 | <threadCounts>true</threadCounts> |
| 1797 | <idleTime>true</idleTime> |
| 1798 | <connectTime>true</connectTime> |
| 1799 | </value> |
| 1800 | </objProp> |
| 1801 | <stringProp name="filename"></stringProp> |
| 1802 | </ResultCollector> |
| 1803 | <hashTree/> |
| 1804 | </hashTree> |
| 1805 | </hashTree> |
| 1806 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Final Response via DMaaP" enabled="true"> |
| 1807 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")}</stringProp> |
| 1808 | </WhileController> |
| 1809 | <hashTree> |
| 1810 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 1811 | <stringProp name="ConstantTimer.delay">10000</stringProp> |
| 1812 | </ConstantTimer> |
| 1813 | <hashTree/> |
| 1814 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="completed_retry" enabled="true"> |
| 1815 | <stringProp name="CounterConfig.start">1</stringProp> |
| 1816 | <stringProp name="CounterConfig.end"></stringProp> |
| 1817 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 1818 | <stringProp name="CounterConfig.name">completed_retry</stringProp> |
| 1819 | <stringProp name="CounterConfig.format"></stringProp> |
| 1820 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 1821 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 1822 | </CounterConfig> |
| 1823 | <hashTree/> |
| 1824 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="ASYNC(completed) response via DMaaP " enabled="true"> |
| 1825 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 1826 | <collectionProp name="Arguments.arguments"/> |
| 1827 | </elementProp> |
| 1828 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 1829 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 1830 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 1831 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 1832 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 1833 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 1834 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 1835 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 1836 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 1837 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 1838 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 1839 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 1840 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 1841 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 1842 | </HTTPSamplerProxy> |
| 1843 | <hashTree> |
| 1844 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 1845 | <collectionProp name="HeaderManager.headers"> |
| 1846 | <elementProp name="" elementType="Header"> |
| 1847 | <stringProp name="Header.name">Content-Type</stringProp> |
| 1848 | <stringProp name="Header.value">application/json</stringProp> |
| 1849 | </elementProp> |
| 1850 | </collectionProp> |
| 1851 | </HeaderManager> |
| 1852 | <hashTree/> |
| 1853 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 1854 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 1855 | <stringProp name="RegexExtractor.refname">finished_message</stringProp> |
| 1856 | <stringProp name="RegexExtractor.regex">"reason\\":\\"(.*?)\\"</stringProp> |
| 1857 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 1858 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 1859 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 1860 | </RegexExtractor> |
| 1861 | <hashTree/> |
| 1862 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 1863 | <stringProp name="cacheKey">true</stringProp> |
| 1864 | <stringProp name="filename"></stringProp> |
| 1865 | <stringProp name="parameters"></stringProp> |
| 1866 | <stringProp name="script">String jsonMessage = vars.get("finished_message"); |
| 1867 | String requestId = vars.get("transaction_id"); |
| 1868 | int retries = Integer.parseInt(vars.get("completed_retry")); |
| 1869 | int limit = Integer.parseInt(vars.get("completed_retry_limit")); |
| 1870 | |
| 1871 | log.info("Stop " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); |
| 1872 | |
| 1873 | if(jsonMessage != "WAITING"){ |
| 1874 | vars.put("action_completed",jsonMessage); |
| 1875 | }else if(retries >= limit){ |
| 1876 | vars.put("action_completed","TIMEOUT"); |
| 1877 | } |
| 1878 | |
| 1879 | </stringProp> |
| 1880 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 1881 | </JSR223Assertion> |
| 1882 | <hashTree/> |
| 1883 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1884 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1885 | <objProp> |
| 1886 | <name>saveConfig</name> |
| 1887 | <value class="SampleSaveConfiguration"> |
| 1888 | <time>true</time> |
| 1889 | <latency>true</latency> |
| 1890 | <timestamp>true</timestamp> |
| 1891 | <success>true</success> |
| 1892 | <label>true</label> |
| 1893 | <code>true</code> |
| 1894 | <message>true</message> |
| 1895 | <threadName>true</threadName> |
| 1896 | <dataType>true</dataType> |
| 1897 | <encoding>false</encoding> |
| 1898 | <assertions>true</assertions> |
| 1899 | <subresults>true</subresults> |
| 1900 | <responseData>false</responseData> |
| 1901 | <samplerData>false</samplerData> |
| 1902 | <xml>false</xml> |
| 1903 | <fieldNames>true</fieldNames> |
| 1904 | <responseHeaders>false</responseHeaders> |
| 1905 | <requestHeaders>false</requestHeaders> |
| 1906 | <responseDataOnError>false</responseDataOnError> |
| 1907 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1908 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1909 | <bytes>true</bytes> |
| 1910 | <sentBytes>true</sentBytes> |
| 1911 | <threadCounts>true</threadCounts> |
| 1912 | <idleTime>true</idleTime> |
| 1913 | <connectTime>true</connectTime> |
| 1914 | </value> |
| 1915 | </objProp> |
| 1916 | <stringProp name="filename"></stringProp> |
| 1917 | </ResultCollector> |
| 1918 | <hashTree/> |
| 1919 | </hashTree> |
| 1920 | </hashTree> |
| 1921 | </hashTree> |
| 1922 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Start Transaction Controller" enabled="true"> |
| 1923 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 1924 | <boolProp name="TransactionController.parent">false</boolProp> |
| 1925 | </TransactionController> |
| 1926 | <hashTree> |
| 1927 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 1928 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 1929 | <objProp> |
| 1930 | <name>saveConfig</name> |
| 1931 | <value class="SampleSaveConfiguration"> |
| 1932 | <time>true</time> |
| 1933 | <latency>true</latency> |
| 1934 | <timestamp>true</timestamp> |
| 1935 | <success>true</success> |
| 1936 | <label>true</label> |
| 1937 | <code>true</code> |
| 1938 | <message>true</message> |
| 1939 | <threadName>true</threadName> |
| 1940 | <dataType>true</dataType> |
| 1941 | <encoding>false</encoding> |
| 1942 | <assertions>true</assertions> |
| 1943 | <subresults>true</subresults> |
| 1944 | <responseData>false</responseData> |
| 1945 | <samplerData>false</samplerData> |
| 1946 | <xml>false</xml> |
| 1947 | <fieldNames>true</fieldNames> |
| 1948 | <responseHeaders>false</responseHeaders> |
| 1949 | <requestHeaders>false</requestHeaders> |
| 1950 | <responseDataOnError>false</responseDataOnError> |
| 1951 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 1952 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 1953 | <bytes>true</bytes> |
| 1954 | <sentBytes>true</sentBytes> |
| 1955 | <threadCounts>true</threadCounts> |
| 1956 | <idleTime>true</idleTime> |
| 1957 | <connectTime>true</connectTime> |
| 1958 | </value> |
| 1959 | </objProp> |
| 1960 | <stringProp name="filename"></stringProp> |
| 1961 | </ResultCollector> |
| 1962 | <hashTree/> |
| 1963 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Submit request via DMaaP" enabled="true"> |
| 1964 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 1965 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 1966 | <collectionProp name="Arguments.arguments"> |
| 1967 | <elementProp name="" elementType="HTTPArgument"> |
| 1968 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 1969 | <stringProp name="Argument.value">{
 |
| 1970 | "version": "2.01",
 |
| 1971 | "rpc-name": "start",
 |
| 1972 | "correlation-id": "${transaction_id}",
 |
| 1973 | "type": "request",
 |
| 1974 | "body": {
 |
| 1975 | "input": {
 |
| 1976 | "common-header": {
 |
| 1977 | "timestamp": "${reqeust_timestamp}",
 |
| 1978 | "api-ver": "2.05",
 |
| 1979 | "originator-id": "${transaction_id}",
 |
| 1980 | "request-id": "${transaction_id}",
 |
| 1981 | "sub-request-id": "1",
 |
| 1982 | "flags": {
 |
| 1983 | "force": "TRUE",
 |
| 1984 | "ttl": 60000
 |
| 1985 | }
 |
| 1986 | },
 |
| 1987 | "action": "Start",
 |
| 1988 | "action-identifiers": {
 |
| 1989 | "vnf-id": "${vnf_id}",
 |
| 1990 | "vserver-id": "${vm-id}"
 |
| 1991 | },
 |
| 1992 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/c0d9b8c7-9534-4a22-b464-d6aa2c930847\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 1993 | }
 |
| 1994 | }
 |
| 1995 | }</stringProp> |
| 1996 | <stringProp name="Argument.metadata">=</stringProp> |
| 1997 | </elementProp> |
| 1998 | </collectionProp> |
| 1999 | </elementProp> |
| 2000 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 2001 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2002 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2003 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2004 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_post}</stringProp> |
| 2005 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 2006 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2007 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2008 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2009 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2010 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2011 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2012 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2013 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2014 | </HTTPSamplerProxy> |
| 2015 | <hashTree> |
| 2016 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 2017 | <boolProp name="resetInterpreter">false</boolProp> |
| 2018 | <stringProp name="parameters"></stringProp> |
| 2019 | <stringProp name="filename"></stringProp> |
| 2020 | <stringProp name="script">import java.text.SimpleDateFormat; |
| 2021 | |
| 2022 | String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; |
| 2023 | SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); |
| 2024 | isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); |
| 2025 | |
| 2026 | Calendar currentTime = Calendar.getInstance(); |
| 2027 | |
| 2028 | String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); |
| 2029 | vars.put("reqeust_timestamp",timeStampZuluStr); |
| 2030 | vars.put("action_accepted","WAITING"); |
| 2031 | vars.put("action_completed","WAITING"); |
| 2032 | vars.put("accepted_retry_limit","3"); |
| 2033 | vars.put("completed_retry_limit","20"); |
| 2034 | vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); |
| 2035 | |
| 2036 | log.info(vars.get("reqeust_timestamp") + " Begin Start transaction : " + vars.get("transaction_id"));</stringProp> |
| 2037 | </BeanShellPreProcessor> |
| 2038 | <hashTree/> |
| 2039 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2040 | <collectionProp name="HeaderManager.headers"> |
| 2041 | <elementProp name="" elementType="Header"> |
| 2042 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2043 | <stringProp name="Header.value">application/json</stringProp> |
| 2044 | </elementProp> |
| 2045 | </collectionProp> |
| 2046 | </HeaderManager> |
| 2047 | <hashTree/> |
| 2048 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2049 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2050 | <objProp> |
| 2051 | <name>saveConfig</name> |
| 2052 | <value class="SampleSaveConfiguration"> |
| 2053 | <time>true</time> |
| 2054 | <latency>true</latency> |
| 2055 | <timestamp>true</timestamp> |
| 2056 | <success>true</success> |
| 2057 | <label>true</label> |
| 2058 | <code>true</code> |
| 2059 | <message>true</message> |
| 2060 | <threadName>true</threadName> |
| 2061 | <dataType>true</dataType> |
| 2062 | <encoding>false</encoding> |
| 2063 | <assertions>true</assertions> |
| 2064 | <subresults>true</subresults> |
| 2065 | <responseData>false</responseData> |
| 2066 | <samplerData>false</samplerData> |
| 2067 | <xml>false</xml> |
| 2068 | <fieldNames>true</fieldNames> |
| 2069 | <responseHeaders>false</responseHeaders> |
| 2070 | <requestHeaders>false</requestHeaders> |
| 2071 | <responseDataOnError>false</responseDataOnError> |
| 2072 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2073 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2074 | <bytes>true</bytes> |
| 2075 | <sentBytes>true</sentBytes> |
| 2076 | <threadCounts>true</threadCounts> |
| 2077 | <idleTime>true</idleTime> |
| 2078 | <connectTime>true</connectTime> |
| 2079 | </value> |
| 2080 | </objProp> |
| 2081 | <stringProp name="filename"></stringProp> |
| 2082 | </ResultCollector> |
| 2083 | <hashTree/> |
| 2084 | </hashTree> |
| 2085 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response via DMaaP" enabled="true"> |
| 2086 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="WAITING")}</stringProp> |
| 2087 | </WhileController> |
| 2088 | <hashTree> |
| 2089 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 2090 | <stringProp name="ConstantTimer.delay">3000</stringProp> |
| 2091 | </ConstantTimer> |
| 2092 | <hashTree/> |
| 2093 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 2094 | <stringProp name="CounterConfig.start">1</stringProp> |
| 2095 | <stringProp name="CounterConfig.end"></stringProp> |
| 2096 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 2097 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 2098 | <stringProp name="CounterConfig.format"></stringProp> |
| 2099 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 2100 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 2101 | </CounterConfig> |
| 2102 | <hashTree/> |
| 2103 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SYNC(accepted/rejectd) response via DMaaP" enabled="true"> |
| 2104 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 2105 | <collectionProp name="Arguments.arguments"> |
| 2106 | <elementProp name="filter" elementType="HTTPArgument"> |
| 2107 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 2108 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${transaction_id}"}</stringProp> |
| 2109 | <stringProp name="Argument.metadata">=</stringProp> |
| 2110 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 2111 | <stringProp name="Argument.name">filter</stringProp> |
| 2112 | </elementProp> |
| 2113 | </collectionProp> |
| 2114 | </elementProp> |
| 2115 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 2116 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2117 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2118 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2119 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 2120 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 2121 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2122 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2123 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2124 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2125 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2126 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2127 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2128 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2129 | </HTTPSamplerProxy> |
| 2130 | <hashTree> |
| 2131 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2132 | <collectionProp name="HeaderManager.headers"> |
| 2133 | <elementProp name="" elementType="Header"> |
| 2134 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2135 | <stringProp name="Header.value">application/json</stringProp> |
| 2136 | </elementProp> |
| 2137 | </collectionProp> |
| 2138 | </HeaderManager> |
| 2139 | <hashTree/> |
| 2140 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 2141 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 2142 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 2143 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 2144 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 2145 | </JSONPostProcessor> |
| 2146 | <hashTree/> |
| 2147 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 2148 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 2149 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 2150 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 2151 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 2152 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 2153 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 2154 | </RegexExtractor> |
| 2155 | <hashTree/> |
| 2156 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 2157 | <stringProp name="cacheKey">true</stringProp> |
| 2158 | <stringProp name="filename"></stringProp> |
| 2159 | <stringProp name="parameters"></stringProp> |
| 2160 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 2161 | String requestId = vars.get("transaction_id"); |
| 2162 | int retries = Integer.parseInt(vars.get("acceptance_retry")); |
| 2163 | int limit = Integer.parseInt(vars.get("accepted_retry_limit")); |
| 2164 | |
| 2165 | log.info("Start " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); |
| 2166 | log.info("action_accepted=" + vars.get("action_accepted")); |
| 2167 | log.info("action_completed=" + vars.get("action_completed")); |
| 2168 | |
| 2169 | if(jsonMessage != "WAITING"){ |
| 2170 | log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); |
| 2171 | vars.put("action_accepted",jsonMessage); |
| 2172 | }else if(retries >= limit){ |
| 2173 | log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); |
| 2174 | vars.put("action_accepted","TIMEOUT"); |
| 2175 | } |
| 2176 | |
| 2177 | </stringProp> |
| 2178 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 2179 | </JSR223Assertion> |
| 2180 | <hashTree/> |
| 2181 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2182 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2183 | <objProp> |
| 2184 | <name>saveConfig</name> |
| 2185 | <value class="SampleSaveConfiguration"> |
| 2186 | <time>true</time> |
| 2187 | <latency>true</latency> |
| 2188 | <timestamp>true</timestamp> |
| 2189 | <success>true</success> |
| 2190 | <label>true</label> |
| 2191 | <code>true</code> |
| 2192 | <message>true</message> |
| 2193 | <threadName>true</threadName> |
| 2194 | <dataType>true</dataType> |
| 2195 | <encoding>false</encoding> |
| 2196 | <assertions>true</assertions> |
| 2197 | <subresults>true</subresults> |
| 2198 | <responseData>false</responseData> |
| 2199 | <samplerData>false</samplerData> |
| 2200 | <xml>false</xml> |
| 2201 | <fieldNames>true</fieldNames> |
| 2202 | <responseHeaders>false</responseHeaders> |
| 2203 | <requestHeaders>false</requestHeaders> |
| 2204 | <responseDataOnError>false</responseDataOnError> |
| 2205 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2206 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2207 | <bytes>true</bytes> |
| 2208 | <sentBytes>true</sentBytes> |
| 2209 | <threadCounts>true</threadCounts> |
| 2210 | <idleTime>true</idleTime> |
| 2211 | <connectTime>true</connectTime> |
| 2212 | </value> |
| 2213 | </objProp> |
| 2214 | <stringProp name="filename"></stringProp> |
| 2215 | </ResultCollector> |
| 2216 | <hashTree/> |
| 2217 | </hashTree> |
| 2218 | </hashTree> |
| 2219 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Final Response via DMaaP" enabled="true"> |
| 2220 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")}</stringProp> |
| 2221 | </WhileController> |
| 2222 | <hashTree> |
| 2223 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 2224 | <stringProp name="ConstantTimer.delay">10000</stringProp> |
| 2225 | </ConstantTimer> |
| 2226 | <hashTree/> |
| 2227 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="completed_retry" enabled="true"> |
| 2228 | <stringProp name="CounterConfig.start">1</stringProp> |
| 2229 | <stringProp name="CounterConfig.end"></stringProp> |
| 2230 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 2231 | <stringProp name="CounterConfig.name">completed_retry</stringProp> |
| 2232 | <stringProp name="CounterConfig.format"></stringProp> |
| 2233 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 2234 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 2235 | </CounterConfig> |
| 2236 | <hashTree/> |
| 2237 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="ASYNC(completed) response via DMaaP " enabled="true"> |
| 2238 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 2239 | <collectionProp name="Arguments.arguments"/> |
| 2240 | </elementProp> |
| 2241 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 2242 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2243 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2244 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2245 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 2246 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 2247 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2248 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2249 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2250 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2251 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2252 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2253 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2254 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2255 | </HTTPSamplerProxy> |
| 2256 | <hashTree> |
| 2257 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2258 | <collectionProp name="HeaderManager.headers"> |
| 2259 | <elementProp name="" elementType="Header"> |
| 2260 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2261 | <stringProp name="Header.value">application/json</stringProp> |
| 2262 | </elementProp> |
| 2263 | </collectionProp> |
| 2264 | </HeaderManager> |
| 2265 | <hashTree/> |
| 2266 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 2267 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 2268 | <stringProp name="RegexExtractor.refname">finished_message</stringProp> |
| 2269 | <stringProp name="RegexExtractor.regex">"reason\\":\\"(.*?)\\"</stringProp> |
| 2270 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 2271 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 2272 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 2273 | </RegexExtractor> |
| 2274 | <hashTree/> |
| 2275 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 2276 | <stringProp name="cacheKey">true</stringProp> |
| 2277 | <stringProp name="filename"></stringProp> |
| 2278 | <stringProp name="parameters"></stringProp> |
| 2279 | <stringProp name="script">String jsonMessage = vars.get("finished_message"); |
| 2280 | String requestId = vars.get("transaction_id"); |
| 2281 | int retries = Integer.parseInt(vars.get("completed_retry")); |
| 2282 | int limit = Integer.parseInt(vars.get("completed_retry_limit")); |
| 2283 | |
| 2284 | log.info("Start " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); |
| 2285 | |
| 2286 | if(jsonMessage != "WAITING"){ |
| 2287 | vars.put("action_completed",jsonMessage); |
| 2288 | }else if(retries >= limit){ |
| 2289 | vars.put("action_completed","TIMEOUT"); |
| 2290 | } |
| 2291 | |
| 2292 | </stringProp> |
| 2293 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 2294 | </JSR223Assertion> |
| 2295 | <hashTree/> |
| 2296 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2297 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2298 | <objProp> |
| 2299 | <name>saveConfig</name> |
| 2300 | <value class="SampleSaveConfiguration"> |
| 2301 | <time>true</time> |
| 2302 | <latency>true</latency> |
| 2303 | <timestamp>true</timestamp> |
| 2304 | <success>true</success> |
| 2305 | <label>true</label> |
| 2306 | <code>true</code> |
| 2307 | <message>true</message> |
| 2308 | <threadName>true</threadName> |
| 2309 | <dataType>true</dataType> |
| 2310 | <encoding>false</encoding> |
| 2311 | <assertions>true</assertions> |
| 2312 | <subresults>true</subresults> |
| 2313 | <responseData>false</responseData> |
| 2314 | <samplerData>false</samplerData> |
| 2315 | <xml>false</xml> |
| 2316 | <fieldNames>true</fieldNames> |
| 2317 | <responseHeaders>false</responseHeaders> |
| 2318 | <requestHeaders>false</requestHeaders> |
| 2319 | <responseDataOnError>false</responseDataOnError> |
| 2320 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2321 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2322 | <bytes>true</bytes> |
| 2323 | <sentBytes>true</sentBytes> |
| 2324 | <threadCounts>true</threadCounts> |
| 2325 | <idleTime>true</idleTime> |
| 2326 | <connectTime>true</connectTime> |
| 2327 | </value> |
| 2328 | </objProp> |
| 2329 | <stringProp name="filename"></stringProp> |
| 2330 | </ResultCollector> |
| 2331 | <hashTree/> |
| 2332 | </hashTree> |
| 2333 | </hashTree> |
| 2334 | </hashTree> |
| 2335 | </hashTree> |
| 2336 | </hashTree> |
| 2337 | <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Stability-Test-VM3 LCM Group" enabled="true"> |
| 2338 | <stringProp name="ThreadGroup.on_sample_error">continue</stringProp> |
| 2339 | <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true"> |
| 2340 | <boolProp name="LoopController.continue_forever">false</boolProp> |
| 2341 | <stringProp name="LoopController.loops">1</stringProp> |
| 2342 | </elementProp> |
| 2343 | <stringProp name="ThreadGroup.num_threads">1</stringProp> |
| 2344 | <stringProp name="ThreadGroup.ramp_time">1</stringProp> |
| 2345 | <longProp name="ThreadGroup.start_time">1518473958000</longProp> |
| 2346 | <longProp name="ThreadGroup.end_time">1518473958000</longProp> |
| 2347 | <boolProp name="ThreadGroup.scheduler">false</boolProp> |
| 2348 | <stringProp name="ThreadGroup.duration"></stringProp> |
| 2349 | <stringProp name="ThreadGroup.delay"></stringProp> |
| 2350 | </ThreadGroup> |
| 2351 | <hashTree> |
| 2352 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="RequestNumber" enabled="true"> |
| 2353 | <stringProp name="CounterConfig.start">1</stringProp> |
| 2354 | <stringProp name="CounterConfig.end"></stringProp> |
| 2355 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 2356 | <stringProp name="CounterConfig.name">request_number</stringProp> |
| 2357 | <stringProp name="CounterConfig.format">000</stringProp> |
| 2358 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 2359 | </CounterConfig> |
| 2360 | <hashTree/> |
| 2361 | <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true"> |
| 2362 | <stringProp name="delimiter">,</stringProp> |
| 2363 | <stringProp name="fileEncoding"></stringProp> |
| 2364 | <stringProp name="filename">/home/ubuntu/appc-lcm-test-Stability-Test-VM3.csv</stringProp> |
| 2365 | <boolProp name="ignoreFirstLine">false</boolProp> |
| 2366 | <boolProp name="quotedData">false</boolProp> |
| 2367 | <boolProp name="recycle">true</boolProp> |
| 2368 | <stringProp name="shareMode">shareMode.all</stringProp> |
| 2369 | <boolProp name="stopThread">true</boolProp> |
| 2370 | <stringProp name="variableNames">dmaap_ip,dmaap_topic_post,dmaap_topic_get,vnf_id,vm_id</stringProp> |
| 2371 | </CSVDataSet> |
| 2372 | <hashTree/> |
| 2373 | <ConfigTestElement guiclass="SimpleConfigGui" testclass="ConfigTestElement" testname="Simple Config Element" enabled="true"/> |
| 2374 | <hashTree/> |
| 2375 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2376 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2377 | <objProp> |
| 2378 | <name>saveConfig</name> |
| 2379 | <value class="SampleSaveConfiguration"> |
| 2380 | <time>true</time> |
| 2381 | <latency>true</latency> |
| 2382 | <timestamp>true</timestamp> |
| 2383 | <success>true</success> |
| 2384 | <label>true</label> |
| 2385 | <code>true</code> |
| 2386 | <message>true</message> |
| 2387 | <threadName>true</threadName> |
| 2388 | <dataType>true</dataType> |
| 2389 | <encoding>false</encoding> |
| 2390 | <assertions>true</assertions> |
| 2391 | <subresults>true</subresults> |
| 2392 | <responseData>false</responseData> |
| 2393 | <samplerData>false</samplerData> |
| 2394 | <xml>false</xml> |
| 2395 | <fieldNames>false</fieldNames> |
| 2396 | <responseHeaders>false</responseHeaders> |
| 2397 | <requestHeaders>false</requestHeaders> |
| 2398 | <responseDataOnError>false</responseDataOnError> |
| 2399 | <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage> |
| 2400 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2401 | <bytes>true</bytes> |
| 2402 | </value> |
| 2403 | </objProp> |
| 2404 | <stringProp name="filename"></stringProp> |
| 2405 | </ResultCollector> |
| 2406 | <hashTree/> |
| 2407 | <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Rebuild Loop Controller" enabled="false"> |
| 2408 | <boolProp name="LoopController.continue_forever">true</boolProp> |
| 2409 | <stringProp name="LoopController.loops">3</stringProp> |
| 2410 | </LoopController> |
| 2411 | <hashTree> |
| 2412 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Rebuild Transaction Controller" enabled="false"> |
| 2413 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 2414 | <boolProp name="TransactionController.parent">false</boolProp> |
| 2415 | </TransactionController> |
| 2416 | <hashTree> |
| 2417 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 2418 | <boolProp name="resetInterpreter">false</boolProp> |
| 2419 | <stringProp name="parameters"></stringProp> |
| 2420 | <stringProp name="filename"></stringProp> |
| 2421 | <stringProp name="script">vars.put("REBUILD_ACCEPTED","WAITING"); |
| 2422 | |
| 2423 | StringBuilder timestamp = new StringBuilder(); |
| 2424 | //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</stringProp> |
| 2425 | </BeanShellPreProcessor> |
| 2426 | <hashTree/> |
| 2427 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Rebuild HTTP Request" enabled="true"> |
| 2428 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 2429 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 2430 | <collectionProp name="Arguments.arguments"> |
| 2431 | <elementProp name="" elementType="HTTPArgument"> |
| 2432 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 2433 | <stringProp name="Argument.value">{
 |
| 2434 | "version": "2.01",
 |
| 2435 | "rpc-name": "rebuild",
 |
| 2436 | "correlation-id": "${request_id}",
 |
| 2437 | "type": "request",
 |
| 2438 | "body": {
 |
| 2439 | "input": {
 |
| 2440 | "common-header": {
 |
| 2441 | "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z",
 |
| 2442 | "api-ver": "2.05",
 |
| 2443 | "originator-id": "${request_id}",
 |
| 2444 | "request-id": "${request_id}",
 |
| 2445 | "sub-request-id": "1",
 |
| 2446 | "flags": {
 |
| 2447 | "force": "TRUE",
 |
| 2448 | "ttl": 60000
 |
| 2449 | }
 |
| 2450 | },
 |
| 2451 | "action": "Rebuild",
 |
| 2452 | "action-identifiers": {
 |
| 2453 | "vnf-id": "${vnf_id}",
 |
| 2454 | "vserver-id": "${vm-id}"
 |
| 2455 | },
 |
| 2456 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/3b3d77e0-a79d-4c10-bfac-1b3914af1a14\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 2457 | }
 |
| 2458 | }
 |
| 2459 | }</stringProp> |
| 2460 | <stringProp name="Argument.metadata">=</stringProp> |
| 2461 | </elementProp> |
| 2462 | </collectionProp> |
| 2463 | </elementProp> |
| 2464 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 2465 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2466 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2467 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2468 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-READ</stringProp> |
| 2469 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 2470 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2471 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2472 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2473 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2474 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2475 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2476 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2477 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2478 | </HTTPSamplerProxy> |
| 2479 | <hashTree> |
| 2480 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor - ReqeustJSON Generator" enabled="true"> |
| 2481 | <stringProp name="filename"></stringProp> |
| 2482 | <stringProp name="parameters"></stringProp> |
| 2483 | <boolProp name="resetInterpreter">false</boolProp> |
| 2484 | <stringProp name="script">StringBuilder result = new StringBuilder(); |
| 2485 | String newline = System.getProperty("line.separator"); |
| 2486 | //int max = Integer.parseInt(Parameters); |
| 2487 | //Random random = new Random(); |
| 2488 | |
| 2489 | //int counter = Integer.parseInt(vars.get("request-id")); |
| 2490 | |
| 2491 | result.append("{"); |
| 2492 | //result.append("\"version\": \"2.01\","); |
| 2493 | //result.append("\"rpc-name\": \"restart\","); |
| 2494 | //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); |
| 2495 | //result.append(newline); |
| 2496 | //result.append("\"type\": \"request\","); |
| 2497 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 2498 | //result.append(newline); |
| 2499 | //result.append("\"body\": {"); |
| 2500 | //result.append(newline); |
| 2501 | //result.append("\"input\": {"); |
| 2502 | //result.append(newline); |
| 2503 | //result.append("\"common-header\": {"); |
| 2504 | //result.append(newline); |
| 2505 | //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); |
| 2506 | //result.append(newline); |
| 2507 | //result.append("\"api-ver\": \"2.05\","); |
| 2508 | //result.append(newline); |
| 2509 | //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 2510 | //result.append(newline); |
| 2511 | //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); |
| 2512 | //result.append(newline); |
| 2513 | //result.append("\"sub-request-id\": \"1\","); |
| 2514 | //result.append(newline); |
| 2515 | //result.append("\"flags\": {"); |
| 2516 | //result.append(newline); |
| 2517 | //result.append("\"force\": \"TRUE\","); |
| 2518 | //result.append(newline); |
| 2519 | //result.append("\"ttl\": 60000"); |
| 2520 | //result.append(newline); |
| 2521 | //result.append("}"); |
| 2522 | //result.append(newline); |
| 2523 | //result.append("},"); |
| 2524 | //result.append(newline); |
| 2525 | //result.append("\"action\": \"Restart\","); |
| 2526 | //result.append(newline); |
| 2527 | //result.append("\"action-identifiers\": {"); |
| 2528 | //result.append(newline); |
| 2529 | //result.append("\"vnf-id\": \"APPC_Test_VM\""); |
| 2530 | //result.append(newline); |
| 2531 | //result.append("}"); |
| 2532 | //result.append(newline); |
| 2533 | //result.append("}"); |
| 2534 | //result.append(newline); |
| 2535 | //result.append("}"); |
| 2536 | result.append(newline); |
| 2537 | result.append("}"); |
| 2538 | |
| 2539 | vars.put("json",result.toString());</stringProp> |
| 2540 | </BeanShellPreProcessor> |
| 2541 | <hashTree/> |
| 2542 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2543 | <collectionProp name="HeaderManager.headers"> |
| 2544 | <elementProp name="" elementType="Header"> |
| 2545 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2546 | <stringProp name="Header.value">application/json</stringProp> |
| 2547 | </elementProp> |
| 2548 | </collectionProp> |
| 2549 | </HeaderManager> |
| 2550 | <hashTree/> |
| 2551 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2552 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2553 | <objProp> |
| 2554 | <name>saveConfig</name> |
| 2555 | <value class="SampleSaveConfiguration"> |
| 2556 | <time>true</time> |
| 2557 | <latency>true</latency> |
| 2558 | <timestamp>true</timestamp> |
| 2559 | <success>true</success> |
| 2560 | <label>true</label> |
| 2561 | <code>true</code> |
| 2562 | <message>true</message> |
| 2563 | <threadName>true</threadName> |
| 2564 | <dataType>true</dataType> |
| 2565 | <encoding>false</encoding> |
| 2566 | <assertions>true</assertions> |
| 2567 | <subresults>true</subresults> |
| 2568 | <responseData>false</responseData> |
| 2569 | <samplerData>false</samplerData> |
| 2570 | <xml>false</xml> |
| 2571 | <fieldNames>true</fieldNames> |
| 2572 | <responseHeaders>false</responseHeaders> |
| 2573 | <requestHeaders>false</requestHeaders> |
| 2574 | <responseDataOnError>false</responseDataOnError> |
| 2575 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2576 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2577 | <bytes>true</bytes> |
| 2578 | <sentBytes>true</sentBytes> |
| 2579 | <threadCounts>true</threadCounts> |
| 2580 | <idleTime>true</idleTime> |
| 2581 | <connectTime>true</connectTime> |
| 2582 | </value> |
| 2583 | </objProp> |
| 2584 | <stringProp name="filename"></stringProp> |
| 2585 | </ResultCollector> |
| 2586 | <hashTree/> |
| 2587 | </hashTree> |
| 2588 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response" enabled="true"> |
| 2589 | <stringProp name="WhileController.condition">${__javaScript("${REBUILD_ACCEPTED}"=="WAITING")}</stringProp> |
| 2590 | </WhileController> |
| 2591 | <hashTree> |
| 2592 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 2593 | <stringProp name="CounterConfig.start">1</stringProp> |
| 2594 | <stringProp name="CounterConfig.end"></stringProp> |
| 2595 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 2596 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 2597 | <stringProp name="CounterConfig.format"></stringProp> |
| 2598 | <boolProp name="CounterConfig.per_user">false</boolProp> |
| 2599 | </CounterConfig> |
| 2600 | <hashTree/> |
| 2601 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Restart HTTP Accepted" enabled="true"> |
| 2602 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 2603 | <collectionProp name="Arguments.arguments"> |
| 2604 | <elementProp name="filter" elementType="HTTPArgument"> |
| 2605 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 2606 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${request_id}"}</stringProp> |
| 2607 | <stringProp name="Argument.metadata">=</stringProp> |
| 2608 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 2609 | <stringProp name="Argument.name">filter</stringProp> |
| 2610 | </elementProp> |
| 2611 | </collectionProp> |
| 2612 | </elementProp> |
| 2613 | <stringProp name="HTTPSampler.domain">10.12.5.252</stringProp> |
| 2614 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2615 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2616 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2617 | <stringProp name="HTTPSampler.path">/events/APPC-LCM-WRITE/appc-jmeter/${__threadNum}</stringProp> |
| 2618 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 2619 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2620 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2621 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2622 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2623 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2624 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2625 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2626 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2627 | </HTTPSamplerProxy> |
| 2628 | <hashTree> |
| 2629 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2630 | <collectionProp name="HeaderManager.headers"> |
| 2631 | <elementProp name="" elementType="Header"> |
| 2632 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2633 | <stringProp name="Header.value">application/json</stringProp> |
| 2634 | </elementProp> |
| 2635 | </collectionProp> |
| 2636 | </HeaderManager> |
| 2637 | <hashTree/> |
| 2638 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 2639 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 2640 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 2641 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 2642 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 2643 | </JSONPostProcessor> |
| 2644 | <hashTree/> |
| 2645 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 2646 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 2647 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 2648 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 2649 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 2650 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 2651 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 2652 | </RegexExtractor> |
| 2653 | <hashTree/> |
| 2654 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 2655 | <stringProp name="cacheKey">true</stringProp> |
| 2656 | <stringProp name="filename"></stringProp> |
| 2657 | <stringProp name="parameters"></stringProp> |
| 2658 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 2659 | String requestId = vars.get("request_id"); |
| 2660 | |
| 2661 | log.info("Rebuild " + requestId + " acceptance response = " + jsonMessage); |
| 2662 | |
| 2663 | if(jsonMessage != "WAITING"){ |
| 2664 | vars.put("REBUILD_ACCEPTED",jsonMessage); |
| 2665 | } |
| 2666 | </stringProp> |
| 2667 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 2668 | </JSR223Assertion> |
| 2669 | <hashTree/> |
| 2670 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2671 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2672 | <objProp> |
| 2673 | <name>saveConfig</name> |
| 2674 | <value class="SampleSaveConfiguration"> |
| 2675 | <time>true</time> |
| 2676 | <latency>true</latency> |
| 2677 | <timestamp>true</timestamp> |
| 2678 | <success>true</success> |
| 2679 | <label>true</label> |
| 2680 | <code>true</code> |
| 2681 | <message>true</message> |
| 2682 | <threadName>true</threadName> |
| 2683 | <dataType>true</dataType> |
| 2684 | <encoding>false</encoding> |
| 2685 | <assertions>true</assertions> |
| 2686 | <subresults>true</subresults> |
| 2687 | <responseData>false</responseData> |
| 2688 | <samplerData>false</samplerData> |
| 2689 | <xml>false</xml> |
| 2690 | <fieldNames>true</fieldNames> |
| 2691 | <responseHeaders>false</responseHeaders> |
| 2692 | <requestHeaders>false</requestHeaders> |
| 2693 | <responseDataOnError>false</responseDataOnError> |
| 2694 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2695 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2696 | <bytes>true</bytes> |
| 2697 | <sentBytes>true</sentBytes> |
| 2698 | <threadCounts>true</threadCounts> |
| 2699 | <idleTime>true</idleTime> |
| 2700 | <connectTime>true</connectTime> |
| 2701 | </value> |
| 2702 | </objProp> |
| 2703 | <stringProp name="filename"></stringProp> |
| 2704 | </ResultCollector> |
| 2705 | <hashTree/> |
| 2706 | </hashTree> |
| 2707 | </hashTree> |
| 2708 | </hashTree> |
| 2709 | </hashTree> |
| 2710 | <RandomController guiclass="RandomControlGui" testclass="RandomController" testname="Random Controller" enabled="true"> |
| 2711 | <intProp name="InterleaveControl.style">1</intProp> |
| 2712 | </RandomController> |
| 2713 | <hashTree> |
| 2714 | <TransactionController guiclass="TransactionControllerGui" testclass="TransactionController" testname="Rebuild Transaction Controller" enabled="true"> |
| 2715 | <boolProp name="TransactionController.includeTimers">false</boolProp> |
| 2716 | <boolProp name="TransactionController.parent">false</boolProp> |
| 2717 | </TransactionController> |
| 2718 | <hashTree> |
| 2719 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2720 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2721 | <objProp> |
| 2722 | <name>saveConfig</name> |
| 2723 | <value class="SampleSaveConfiguration"> |
| 2724 | <time>true</time> |
| 2725 | <latency>true</latency> |
| 2726 | <timestamp>true</timestamp> |
| 2727 | <success>true</success> |
| 2728 | <label>true</label> |
| 2729 | <code>true</code> |
| 2730 | <message>true</message> |
| 2731 | <threadName>true</threadName> |
| 2732 | <dataType>true</dataType> |
| 2733 | <encoding>false</encoding> |
| 2734 | <assertions>true</assertions> |
| 2735 | <subresults>true</subresults> |
| 2736 | <responseData>false</responseData> |
| 2737 | <samplerData>false</samplerData> |
| 2738 | <xml>false</xml> |
| 2739 | <fieldNames>true</fieldNames> |
| 2740 | <responseHeaders>false</responseHeaders> |
| 2741 | <requestHeaders>false</requestHeaders> |
| 2742 | <responseDataOnError>false</responseDataOnError> |
| 2743 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2744 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2745 | <bytes>true</bytes> |
| 2746 | <sentBytes>true</sentBytes> |
| 2747 | <threadCounts>true</threadCounts> |
| 2748 | <idleTime>true</idleTime> |
| 2749 | <connectTime>true</connectTime> |
| 2750 | </value> |
| 2751 | </objProp> |
| 2752 | <stringProp name="filename"></stringProp> |
| 2753 | </ResultCollector> |
| 2754 | <hashTree/> |
| 2755 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="Submit request via DMaaP" enabled="true"> |
| 2756 | <boolProp name="HTTPSampler.postBodyRaw">true</boolProp> |
| 2757 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments"> |
| 2758 | <collectionProp name="Arguments.arguments"> |
| 2759 | <elementProp name="" elementType="HTTPArgument"> |
| 2760 | <boolProp name="HTTPArgument.always_encode">false</boolProp> |
| 2761 | <stringProp name="Argument.value">{
 |
| 2762 | "version": "2.01",
 |
| 2763 | "rpc-name": "rebuild",
 |
| 2764 | "correlation-id": "${transaction_id}",
 |
| 2765 | "type": "request",
 |
| 2766 | "body": {
 |
| 2767 | "input": {
 |
| 2768 | "common-header": {
 |
| 2769 | "timestamp": "${reqeust_timestamp}",
 |
| 2770 | "api-ver": "2.05",
 |
| 2771 | "originator-id": "${transaction_id}",
 |
| 2772 | "request-id": "${transaction_id}",
 |
| 2773 | "sub-request-id": "1",
 |
| 2774 | "flags": {
 |
| 2775 | "force": "TRUE",
 |
| 2776 | "ttl": 60000
 |
| 2777 | }
 |
| 2778 | },
 |
| 2779 | "action": "Rebuild",
 |
| 2780 | "action-identifiers": {
 |
| 2781 | "vnf-id": "${vnf_id}",
 |
| 2782 | "vserver-id": "${vm-id}"
 |
| 2783 | },
 |
| 2784 | "payload": "{\"vm-id\":\"http://10.12.25.2:8774/v2.1/cf142fb96ce24770946c0f7117c0aeb3/servers/3b3d77e0-a79d-4c10-bfac-1b3914af1a14\", \"identity-url\": \"http://10.12.25.2:5000/v2.0\",\"skip-hypervisor-check\":\"true\"}"
 |
| 2785 | }
 |
| 2786 | }
 |
| 2787 | }</stringProp> |
| 2788 | <stringProp name="Argument.metadata">=</stringProp> |
| 2789 | </elementProp> |
| 2790 | </collectionProp> |
| 2791 | </elementProp> |
| 2792 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 2793 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2794 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2795 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2796 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_post}</stringProp> |
| 2797 | <stringProp name="HTTPSampler.method">POST</stringProp> |
| 2798 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2799 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2800 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2801 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2802 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2803 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2804 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2805 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2806 | </HTTPSamplerProxy> |
| 2807 | <hashTree> |
| 2808 | <BeanShellPreProcessor guiclass="TestBeanGUI" testclass="BeanShellPreProcessor" testname="BeanShell PreProcessor" enabled="true"> |
| 2809 | <boolProp name="resetInterpreter">false</boolProp> |
| 2810 | <stringProp name="parameters"></stringProp> |
| 2811 | <stringProp name="filename"></stringProp> |
| 2812 | <stringProp name="script">import java.text.SimpleDateFormat; |
| 2813 | |
| 2814 | String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; |
| 2815 | SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); |
| 2816 | isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); |
| 2817 | |
| 2818 | Calendar currentTime = Calendar.getInstance(); |
| 2819 | |
| 2820 | String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); |
| 2821 | vars.put("reqeust_timestamp",timeStampZuluStr); |
| 2822 | vars.put("action_accepted","WAITING"); |
| 2823 | vars.put("action_completed","WAITING"); |
| 2824 | vars.put("accepted_retry_limit","3"); |
| 2825 | vars.put("completed_retry_limit","20"); |
| 2826 | vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); |
| 2827 | |
| 2828 | log.info(vars.get("reqeust_timestamp") + " Begin Restart transaction : " + vars.get("transaction_id"));</stringProp> |
| 2829 | </BeanShellPreProcessor> |
| 2830 | <hashTree/> |
| 2831 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2832 | <collectionProp name="HeaderManager.headers"> |
| 2833 | <elementProp name="" elementType="Header"> |
| 2834 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2835 | <stringProp name="Header.value">application/json</stringProp> |
| 2836 | </elementProp> |
| 2837 | </collectionProp> |
| 2838 | </HeaderManager> |
| 2839 | <hashTree/> |
| 2840 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2841 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2842 | <objProp> |
| 2843 | <name>saveConfig</name> |
| 2844 | <value class="SampleSaveConfiguration"> |
| 2845 | <time>true</time> |
| 2846 | <latency>true</latency> |
| 2847 | <timestamp>true</timestamp> |
| 2848 | <success>true</success> |
| 2849 | <label>true</label> |
| 2850 | <code>true</code> |
| 2851 | <message>true</message> |
| 2852 | <threadName>true</threadName> |
| 2853 | <dataType>true</dataType> |
| 2854 | <encoding>false</encoding> |
| 2855 | <assertions>true</assertions> |
| 2856 | <subresults>true</subresults> |
| 2857 | <responseData>false</responseData> |
| 2858 | <samplerData>false</samplerData> |
| 2859 | <xml>false</xml> |
| 2860 | <fieldNames>true</fieldNames> |
| 2861 | <responseHeaders>false</responseHeaders> |
| 2862 | <requestHeaders>false</requestHeaders> |
| 2863 | <responseDataOnError>false</responseDataOnError> |
| 2864 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2865 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2866 | <bytes>true</bytes> |
| 2867 | <sentBytes>true</sentBytes> |
| 2868 | <threadCounts>true</threadCounts> |
| 2869 | <idleTime>true</idleTime> |
| 2870 | <connectTime>true</connectTime> |
| 2871 | </value> |
| 2872 | </objProp> |
| 2873 | <stringProp name="filename"></stringProp> |
| 2874 | </ResultCollector> |
| 2875 | <hashTree/> |
| 2876 | </hashTree> |
| 2877 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Accepted Response via DMaaP" enabled="true"> |
| 2878 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="WAITING")}</stringProp> |
| 2879 | </WhileController> |
| 2880 | <hashTree> |
| 2881 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 2882 | <stringProp name="ConstantTimer.delay">3000</stringProp> |
| 2883 | </ConstantTimer> |
| 2884 | <hashTree/> |
| 2885 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="acceptance_retry" enabled="true"> |
| 2886 | <stringProp name="CounterConfig.start">1</stringProp> |
| 2887 | <stringProp name="CounterConfig.end"></stringProp> |
| 2888 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 2889 | <stringProp name="CounterConfig.name">acceptance_retry</stringProp> |
| 2890 | <stringProp name="CounterConfig.format"></stringProp> |
| 2891 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 2892 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 2893 | </CounterConfig> |
| 2894 | <hashTree/> |
| 2895 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="SYNC(accepted/rejectd) response via DMaaP" enabled="true"> |
| 2896 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 2897 | <collectionProp name="Arguments.arguments"> |
| 2898 | <elementProp name="filter" elementType="HTTPArgument"> |
| 2899 | <boolProp name="HTTPArgument.always_encode">true</boolProp> |
| 2900 | <stringProp name="Argument.value">{"class":"Equals","field":"correlation-id","value":"${transaction_id}"}</stringProp> |
| 2901 | <stringProp name="Argument.metadata">=</stringProp> |
| 2902 | <boolProp name="HTTPArgument.use_equals">true</boolProp> |
| 2903 | <stringProp name="Argument.name">filter</stringProp> |
| 2904 | </elementProp> |
| 2905 | </collectionProp> |
| 2906 | </elementProp> |
| 2907 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 2908 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 2909 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 2910 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 2911 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 2912 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 2913 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 2914 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 2915 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 2916 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 2917 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 2918 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 2919 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 2920 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 2921 | </HTTPSamplerProxy> |
| 2922 | <hashTree> |
| 2923 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 2924 | <collectionProp name="HeaderManager.headers"> |
| 2925 | <elementProp name="" elementType="Header"> |
| 2926 | <stringProp name="Header.name">Content-Type</stringProp> |
| 2927 | <stringProp name="Header.value">application/json</stringProp> |
| 2928 | </elementProp> |
| 2929 | </collectionProp> |
| 2930 | </HeaderManager> |
| 2931 | <hashTree/> |
| 2932 | <JSONPostProcessor guiclass="JSONPostProcessorGui" testclass="JSONPostProcessor" testname="Acceptance JSON Extractor" enabled="true"> |
| 2933 | <stringProp name="JSONPostProcessor.referenceNames">accept_message_old</stringProp> |
| 2934 | <stringProp name="JSONPostProcessor.jsonPathExprs">$.body.output.status.message</stringProp> |
| 2935 | <stringProp name="JSONPostProcessor.match_numbers"></stringProp> |
| 2936 | <stringProp name="JSONPostProcessor.defaultValues">WAITING</stringProp> |
| 2937 | </JSONPostProcessor> |
| 2938 | <hashTree/> |
| 2939 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 2940 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 2941 | <stringProp name="RegexExtractor.refname">accept_message</stringProp> |
| 2942 | <stringProp name="RegexExtractor.regex">"message\\":\\"(.*?)\\"</stringProp> |
| 2943 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 2944 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 2945 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 2946 | </RegexExtractor> |
| 2947 | <hashTree/> |
| 2948 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 2949 | <stringProp name="cacheKey">true</stringProp> |
| 2950 | <stringProp name="filename"></stringProp> |
| 2951 | <stringProp name="parameters"></stringProp> |
| 2952 | <stringProp name="script">String jsonMessage = vars.get("accept_message"); |
| 2953 | String requestId = vars.get("transaction_id"); |
| 2954 | int retries = Integer.parseInt(vars.get("acceptance_retry")); |
| 2955 | int limit = Integer.parseInt(vars.get("accepted_retry_limit")); |
| 2956 | |
| 2957 | log.info("Rebuild " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); |
| 2958 | log.info("action_accepted=" + vars.get("action_accepted")); |
| 2959 | log.info("action_completed=" + vars.get("action_completed")); |
| 2960 | |
| 2961 | if(jsonMessage != "WAITING"){ |
| 2962 | log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); |
| 2963 | vars.put("action_accepted",jsonMessage); |
| 2964 | }else if(retries >= limit){ |
| 2965 | log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); |
| 2966 | vars.put("action_accepted","TIMEOUT"); |
| 2967 | } |
| 2968 | |
| 2969 | </stringProp> |
| 2970 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 2971 | </JSR223Assertion> |
| 2972 | <hashTree/> |
| 2973 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 2974 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 2975 | <objProp> |
| 2976 | <name>saveConfig</name> |
| 2977 | <value class="SampleSaveConfiguration"> |
| 2978 | <time>true</time> |
| 2979 | <latency>true</latency> |
| 2980 | <timestamp>true</timestamp> |
| 2981 | <success>true</success> |
| 2982 | <label>true</label> |
| 2983 | <code>true</code> |
| 2984 | <message>true</message> |
| 2985 | <threadName>true</threadName> |
| 2986 | <dataType>true</dataType> |
| 2987 | <encoding>false</encoding> |
| 2988 | <assertions>true</assertions> |
| 2989 | <subresults>true</subresults> |
| 2990 | <responseData>false</responseData> |
| 2991 | <samplerData>false</samplerData> |
| 2992 | <xml>false</xml> |
| 2993 | <fieldNames>true</fieldNames> |
| 2994 | <responseHeaders>false</responseHeaders> |
| 2995 | <requestHeaders>false</requestHeaders> |
| 2996 | <responseDataOnError>false</responseDataOnError> |
| 2997 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 2998 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 2999 | <bytes>true</bytes> |
| 3000 | <sentBytes>true</sentBytes> |
| 3001 | <threadCounts>true</threadCounts> |
| 3002 | <idleTime>true</idleTime> |
| 3003 | <connectTime>true</connectTime> |
| 3004 | </value> |
| 3005 | </objProp> |
| 3006 | <stringProp name="filename"></stringProp> |
| 3007 | </ResultCollector> |
| 3008 | <hashTree/> |
| 3009 | </hashTree> |
| 3010 | </hashTree> |
| 3011 | <WhileController guiclass="WhileControllerGui" testclass="WhileController" testname="Wait for Final Response via DMaaP" enabled="true"> |
| 3012 | <stringProp name="WhileController.condition">${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")}</stringProp> |
| 3013 | </WhileController> |
| 3014 | <hashTree> |
| 3015 | <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true"> |
| 3016 | <stringProp name="ConstantTimer.delay">10000</stringProp> |
| 3017 | </ConstantTimer> |
| 3018 | <hashTree/> |
| 3019 | <CounterConfig guiclass="CounterConfigGui" testclass="CounterConfig" testname="completed_retry" enabled="true"> |
| 3020 | <stringProp name="CounterConfig.start">1</stringProp> |
| 3021 | <stringProp name="CounterConfig.end"></stringProp> |
| 3022 | <stringProp name="CounterConfig.incr">1</stringProp> |
| 3023 | <stringProp name="CounterConfig.name">completed_retry</stringProp> |
| 3024 | <stringProp name="CounterConfig.format"></stringProp> |
| 3025 | <boolProp name="CounterConfig.per_user">true</boolProp> |
| 3026 | <boolProp name="CounterConfig.reset_on_tg_iteration">true</boolProp> |
| 3027 | </CounterConfig> |
| 3028 | <hashTree/> |
| 3029 | <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="ASYNC(completed) response via DMaaP " enabled="true"> |
| 3030 | <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true"> |
| 3031 | <collectionProp name="Arguments.arguments"/> |
| 3032 | </elementProp> |
| 3033 | <stringProp name="HTTPSampler.domain">${dmaap_ip}</stringProp> |
| 3034 | <stringProp name="HTTPSampler.port">3904</stringProp> |
| 3035 | <stringProp name="HTTPSampler.protocol">http</stringProp> |
| 3036 | <stringProp name="HTTPSampler.contentEncoding"></stringProp> |
| 3037 | <stringProp name="HTTPSampler.path">/events/${dmaap_topic_get}/appc-jmeter/${__threadNum}</stringProp> |
| 3038 | <stringProp name="HTTPSampler.method">GET</stringProp> |
| 3039 | <boolProp name="HTTPSampler.follow_redirects">true</boolProp> |
| 3040 | <boolProp name="HTTPSampler.auto_redirects">false</boolProp> |
| 3041 | <boolProp name="HTTPSampler.use_keepalive">true</boolProp> |
| 3042 | <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp> |
| 3043 | <stringProp name="HTTPSampler.embedded_url_re"></stringProp> |
| 3044 | <stringProp name="HTTPSampler.implementation">HttpClient4</stringProp> |
| 3045 | <stringProp name="HTTPSampler.connect_timeout"></stringProp> |
| 3046 | <stringProp name="HTTPSampler.response_timeout"></stringProp> |
| 3047 | </HTTPSamplerProxy> |
| 3048 | <hashTree> |
| 3049 | <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true"> |
| 3050 | <collectionProp name="HeaderManager.headers"> |
| 3051 | <elementProp name="" elementType="Header"> |
| 3052 | <stringProp name="Header.name">Content-Type</stringProp> |
| 3053 | <stringProp name="Header.value">application/json</stringProp> |
| 3054 | </elementProp> |
| 3055 | </collectionProp> |
| 3056 | </HeaderManager> |
| 3057 | <hashTree/> |
| 3058 | <RegexExtractor guiclass="RegexExtractorGui" testclass="RegexExtractor" testname="Regular Expression Extractor" enabled="true"> |
| 3059 | <stringProp name="RegexExtractor.useHeaders">false</stringProp> |
| 3060 | <stringProp name="RegexExtractor.refname">finished_message</stringProp> |
| 3061 | <stringProp name="RegexExtractor.regex">"reason\\":\\"(.*?)\\"</stringProp> |
| 3062 | <stringProp name="RegexExtractor.template">$1$</stringProp> |
| 3063 | <stringProp name="RegexExtractor.default">WAITING</stringProp> |
| 3064 | <stringProp name="RegexExtractor.match_number">1</stringProp> |
| 3065 | </RegexExtractor> |
| 3066 | <hashTree/> |
| 3067 | <JSR223Assertion guiclass="TestBeanGUI" testclass="JSR223Assertion" testname="Acceptance JSR223 Assertion" enabled="true"> |
| 3068 | <stringProp name="cacheKey">true</stringProp> |
| 3069 | <stringProp name="filename"></stringProp> |
| 3070 | <stringProp name="parameters"></stringProp> |
| 3071 | <stringProp name="script">String jsonMessage = vars.get("finished_message"); |
| 3072 | String requestId = vars.get("transaction_id"); |
| 3073 | int retries = Integer.parseInt(vars.get("completed_retry")); |
| 3074 | int limit = Integer.parseInt(vars.get("completed_retry_limit")); |
| 3075 | |
| 3076 | log.info("Rebuild " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); |
| 3077 | |
| 3078 | if(jsonMessage != "WAITING"){ |
| 3079 | vars.put("action_completed",jsonMessage); |
| 3080 | }else if(retries >= limit){ |
| 3081 | vars.put("action_completed","TIMEOUT"); |
| 3082 | } |
| 3083 | |
| 3084 | </stringProp> |
| 3085 | <stringProp name="scriptLanguage">groovy</stringProp> |
| 3086 | </JSR223Assertion> |
| 3087 | <hashTree/> |
| 3088 | <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Tree" enabled="true"> |
| 3089 | <boolProp name="ResultCollector.error_logging">false</boolProp> |
| 3090 | <objProp> |
| 3091 | <name>saveConfig</name> |
| 3092 | <value class="SampleSaveConfiguration"> |
| 3093 | <time>true</time> |
| 3094 | <latency>true</latency> |
| 3095 | <timestamp>true</timestamp> |
| 3096 | <success>true</success> |
| 3097 | <label>true</label> |
| 3098 | <code>true</code> |
| 3099 | <message>true</message> |
| 3100 | <threadName>true</threadName> |
| 3101 | <dataType>true</dataType> |
| 3102 | <encoding>false</encoding> |
| 3103 | <assertions>true</assertions> |
| 3104 | <subresults>true</subresults> |
| 3105 | <responseData>false</responseData> |
| 3106 | <samplerData>false</samplerData> |
| 3107 | <xml>false</xml> |
| 3108 | <fieldNames>true</fieldNames> |
| 3109 | <responseHeaders>false</responseHeaders> |
| 3110 | <requestHeaders>false</requestHeaders> |
| 3111 | <responseDataOnError>false</responseDataOnError> |
| 3112 | <saveAssertionResultsFailureMessage>true</saveAssertionResultsFailureMessage> |
| 3113 | <assertionsResultsToSave>0</assertionsResultsToSave> |
| 3114 | <bytes>true</bytes> |
| 3115 | <sentBytes>true</sentBytes> |
| 3116 | <threadCounts>true</threadCounts> |
| 3117 | <idleTime>true</idleTime> |
| 3118 | <connectTime>true</connectTime> |
| 3119 | </value> |
| 3120 | </objProp> |
| 3121 | <stringProp name="filename"></stringProp> |
| 3122 | </ResultCollector> |
| 3123 | <hashTree/> |
| 3124 | </hashTree> |
| 3125 | </hashTree> |
| 3126 | </hashTree> |
| 3127 | </hashTree> |
| 3128 | </hashTree> |
| 3129 | </hashTree> |
| 3130 | </hashTree> |
| 3131 | </jmeterTestPlan> |