false false continue false 1 1 1 1518473958000 1518473958000 false 1 1 request_number 000 false , appc-lcm-test.csv false false true shareMode.all true dmaap_ip,dmaap_topic_post,dmaap_topic_get,vnf_id,vm_id false saveConfig true true true true true true true false true true false false false false false false false false 0 true true 3 false false false vars.put("RESTART_ACCEPTED","WAITING"); StringBuilder timestamp = new StringBuilder(); //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z' true false { "version": "2.01", "rpc-name": "restart", "correlation-id": "${request_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z", "api-ver": "2.05", "originator-id": "${request_id}", "request-id": "${request_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Restart", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = 10.12.5.252 3904 http /events/APPC-LCM-READ POST true false true false HttpClient4 false StringBuilder result = new StringBuilder(); String newline = System.getProperty("line.separator"); //int max = Integer.parseInt(Parameters); //Random random = new Random(); //int counter = Integer.parseInt(vars.get("request-id")); result.append("{"); //result.append("\"version\": \"2.01\","); //result.append("\"rpc-name\": \"restart\","); //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); //result.append(newline); //result.append("\"type\": \"request\","); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("\"body\": {"); //result.append(newline); //result.append("\"input\": {"); //result.append(newline); //result.append("\"common-header\": {"); //result.append(newline); //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); //result.append(newline); //result.append("\"api-ver\": \"2.05\","); //result.append(newline); //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"sub-request-id\": \"1\","); //result.append(newline); //result.append("\"flags\": {"); //result.append(newline); //result.append("\"force\": \"TRUE\","); //result.append(newline); //result.append("\"ttl\": 60000"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("},"); //result.append(newline); //result.append("\"action\": \"Restart\","); //result.append(newline); //result.append("\"action-identifiers\": {"); //result.append(newline); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); result.append(newline); result.append("}"); vars.put("json",result.toString()); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${RESTART_ACCEPTED}"=="WAITING")} 1 1 acceptance_retry false true {"class":"Equals","field":"correlation-id","value":"${request_id}"} = true filter 10.12.5.252 3904 http /events/APPC-LCM-WRITE/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("request_id"); log.info("Restart " + requestId + " acceptance response = " + jsonMessage); if(jsonMessage != "WAITING"){ vars.put("RESTART_ACCEPTED",jsonMessage); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true 1 false false false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false { "version": "2.01", "rpc-name": "restart", "correlation-id": "${transaction_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${reqeust_timestamp}", "api-ver": "2.05", "originator-id": "${transaction_id}", "request-id": "${transaction_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Restart", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = ${dmaap_ip} 3904 http /events/${dmaap_topic_post} POST true false true false HttpClient4 false import java.text.SimpleDateFormat; String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); Calendar currentTime = Calendar.getInstance(); String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); vars.put("reqeust_timestamp",timeStampZuluStr); vars.put("action_accepted","WAITING"); vars.put("action_completed","WAITING"); vars.put("accepted_retry_limit","3"); vars.put("completed_retry_limit","20"); vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); log.info(vars.get("reqeust_timestamp") + " Begin Restart transaction : " + vars.get("transaction_id")); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="WAITING")} 3000 1 1 acceptance_retry true true true {"class":"Equals","field":"correlation-id","value":"${transaction_id}"} = true filter ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("acceptance_retry")); int limit = Integer.parseInt(vars.get("accepted_retry_limit")); log.info("Restart " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); log.info("action_accepted=" + vars.get("action_accepted")); log.info("action_completed=" + vars.get("action_completed")); if(jsonMessage != "WAITING"){ log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); vars.put("action_accepted",jsonMessage); }else if(retries >= limit){ log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); vars.put("action_accepted","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")} 10000 1 1 completed_retry true true ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json false finished_message "reason\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("finished_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("completed_retry")); int limit = Integer.parseInt(vars.get("completed_retry_limit")); log.info("Restart " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); if(jsonMessage != "WAITING"){ vars.put("action_completed",jsonMessage); }else if(retries >= limit){ vars.put("action_completed","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true continue false 1 1 1 1518473958000 1518473958000 false 1 1 request_number 000 false , appc-lcm-test-Stability-Test-VM2.csv false false true shareMode.all true dmaap_ip,dmaap_topic_post,dmaap_topic_get,vnf_id,vm_id false saveConfig true true true true true true true false true true false false false false false false false false 0 true true 3 false false false vars.put("STOP_ACCEPTED","WAITING"); StringBuilder timestamp = new StringBuilder(); //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z' true false { "version": "2.01", "rpc-name": "stop", "correlation-id": "${request_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z", "api-ver": "2.05", "originator-id": "${request_id}", "request-id": "${request_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Stop", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = 10.12.5.252 3904 http /events/APPC-LCM-READ POST true false true false HttpClient4 false StringBuilder result = new StringBuilder(); String newline = System.getProperty("line.separator"); //int max = Integer.parseInt(Parameters); //Random random = new Random(); //int counter = Integer.parseInt(vars.get("request-id")); result.append("{"); //result.append("\"version\": \"2.01\","); //result.append("\"rpc-name\": \"restart\","); //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); //result.append(newline); //result.append("\"type\": \"request\","); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("\"body\": {"); //result.append(newline); //result.append("\"input\": {"); //result.append(newline); //result.append("\"common-header\": {"); //result.append(newline); //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); //result.append(newline); //result.append("\"api-ver\": \"2.05\","); //result.append(newline); //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"sub-request-id\": \"1\","); //result.append(newline); //result.append("\"flags\": {"); //result.append(newline); //result.append("\"force\": \"TRUE\","); //result.append(newline); //result.append("\"ttl\": 60000"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("},"); //result.append(newline); //result.append("\"action\": \"Restart\","); //result.append(newline); //result.append("\"action-identifiers\": {"); //result.append(newline); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); result.append(newline); result.append("}"); vars.put("json",result.toString()); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${STOP_ACCEPTED}"=="WAITING")} 1 1 acceptance_retry false true {"class":"Equals","field":"correlation-id","value":"${request_id}"} = true filter 10.12.5.252 3904 http /events/APPC-LCM-WRITE/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("request_id"); log.info("Stop " + requestId + " acceptance response = " + jsonMessage); if(jsonMessage != "WAITING"){ vars.put("STOP_ACCEPTED",jsonMessage); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true 3 false false false vars.put("START_ACCEPTED","WAITING"); StringBuilder timestamp = new StringBuilder(); //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z' true false { "version": "2.01", "rpc-name": "start", "correlation-id": "${request_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z", "api-ver": "2.05", "originator-id": "${request_id}", "request-id": "${request_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Start", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = 10.12.5.252 3904 http /events/APPC-LCM-READ POST true false true false HttpClient4 false StringBuilder result = new StringBuilder(); String newline = System.getProperty("line.separator"); //int max = Integer.parseInt(Parameters); //Random random = new Random(); //int counter = Integer.parseInt(vars.get("request-id")); result.append("{"); //result.append("\"version\": \"2.01\","); //result.append("\"rpc-name\": \"restart\","); //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); //result.append(newline); //result.append("\"type\": \"request\","); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("\"body\": {"); //result.append(newline); //result.append("\"input\": {"); //result.append(newline); //result.append("\"common-header\": {"); //result.append(newline); //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); //result.append(newline); //result.append("\"api-ver\": \"2.05\","); //result.append(newline); //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"sub-request-id\": \"1\","); //result.append(newline); //result.append("\"flags\": {"); //result.append(newline); //result.append("\"force\": \"TRUE\","); //result.append(newline); //result.append("\"ttl\": 60000"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("},"); //result.append(newline); //result.append("\"action\": \"Restart\","); //result.append(newline); //result.append("\"action-identifiers\": {"); //result.append(newline); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); result.append(newline); result.append("}"); vars.put("json",result.toString()); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${START_ACCEPTED}"=="WAITING")} 1 1 acceptance_retry false true {"class":"Equals","field":"correlation-id","value":"${request_id}"} = true filter 10.12.5.252 3904 http /events/APPC-LCM-WRITE/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("request_id"); log.info("Start " + requestId + " acceptance response = " + jsonMessage); if(jsonMessage != "WAITING"){ vars.put("START_ACCEPTED",jsonMessage); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true 1 false false false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false { "version": "2.01", "rpc-name": "stop", "correlation-id": "${transaction_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${reqeust_timestamp}", "api-ver": "2.05", "originator-id": "${transaction_id}", "request-id": "${transaction_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Stop", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = ${dmaap_ip} 3904 http /events/${dmaap_topic_post} POST true false true false HttpClient4 false import java.text.SimpleDateFormat; String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); Calendar currentTime = Calendar.getInstance(); String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); vars.put("reqeust_timestamp",timeStampZuluStr); vars.put("action_accepted","WAITING"); vars.put("action_completed","WAITING"); vars.put("accepted_retry_limit","3"); vars.put("completed_retry_limit","20"); vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); log.info(vars.get("reqeust_timestamp") + " Begin Stop transaction : " + vars.get("transaction_id")); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="WAITING")} 3000 1 1 acceptance_retry true true true {"class":"Equals","field":"correlation-id","value":"${transaction_id}"} = true filter ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("acceptance_retry")); int limit = Integer.parseInt(vars.get("accepted_retry_limit")); log.info("Stop " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); log.info("action_accepted=" + vars.get("action_accepted")); log.info("action_completed=" + vars.get("action_completed")); if(jsonMessage != "WAITING"){ log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); vars.put("action_accepted",jsonMessage); }else if(retries >= limit){ log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); vars.put("action_accepted","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")} 10000 1 1 completed_retry true true ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json false finished_message "reason\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("finished_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("completed_retry")); int limit = Integer.parseInt(vars.get("completed_retry_limit")); log.info("Stop " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); if(jsonMessage != "WAITING"){ vars.put("action_completed",jsonMessage); }else if(retries >= limit){ vars.put("action_completed","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true false false false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false { "version": "2.01", "rpc-name": "start", "correlation-id": "${transaction_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${reqeust_timestamp}", "api-ver": "2.05", "originator-id": "${transaction_id}", "request-id": "${transaction_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Start", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = ${dmaap_ip} 3904 http /events/${dmaap_topic_post} POST true false true false HttpClient4 false import java.text.SimpleDateFormat; String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); Calendar currentTime = Calendar.getInstance(); String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); vars.put("reqeust_timestamp",timeStampZuluStr); vars.put("action_accepted","WAITING"); vars.put("action_completed","WAITING"); vars.put("accepted_retry_limit","3"); vars.put("completed_retry_limit","20"); vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); log.info(vars.get("reqeust_timestamp") + " Begin Start transaction : " + vars.get("transaction_id")); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="WAITING")} 3000 1 1 acceptance_retry true true true {"class":"Equals","field":"correlation-id","value":"${transaction_id}"} = true filter ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("acceptance_retry")); int limit = Integer.parseInt(vars.get("accepted_retry_limit")); log.info("Start " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); log.info("action_accepted=" + vars.get("action_accepted")); log.info("action_completed=" + vars.get("action_completed")); if(jsonMessage != "WAITING"){ log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); vars.put("action_accepted",jsonMessage); }else if(retries >= limit){ log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); vars.put("action_accepted","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")} 10000 1 1 completed_retry true true ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json false finished_message "reason\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("finished_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("completed_retry")); int limit = Integer.parseInt(vars.get("completed_retry_limit")); log.info("Start " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); if(jsonMessage != "WAITING"){ vars.put("action_completed",jsonMessage); }else if(retries >= limit){ vars.put("action_completed","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true continue false 1 1 1 1518473958000 1518473958000 false 1 1 request_number 000 false , appc-lcm-test-Stability-Test-VM3.csv false false true shareMode.all true dmaap_ip,dmaap_topic_post,dmaap_topic_get,vnf_id,vm_id false saveConfig true true true true true true true false true true false false false false false false false false 0 true true 3 false false false vars.put("REBUILD_ACCEPTED","WAITING"); StringBuilder timestamp = new StringBuilder(); //ISO_FORMAT "yyyy-MM-dd'T'HH:mm:ss.SSS'Z' true false { "version": "2.01", "rpc-name": "rebuild", "correlation-id": "${request_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${__time(yyyy-MM-dd'T'hh:mm:ss.SSS)}Z", "api-ver": "2.05", "originator-id": "${request_id}", "request-id": "${request_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Rebuild", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = 10.12.5.252 3904 http /events/APPC-LCM-READ POST true false true false HttpClient4 false StringBuilder result = new StringBuilder(); String newline = System.getProperty("line.separator"); //int max = Integer.parseInt(Parameters); //Random random = new Random(); //int counter = Integer.parseInt(vars.get("request-id")); result.append("{"); //result.append("\"version\": \"2.01\","); //result.append("\"rpc-name\": \"restart\","); //result.append("\"correlation-id\": \"a20e2073-30b1-4357-893b-f5ed57b66ef0-1\","); //result.append(newline); //result.append("\"type\": \"request\","); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("\"body\": {"); //result.append(newline); //result.append("\"input\": {"); //result.append(newline); //result.append("\"common-header\": {"); //result.append(newline); //result.append("\"timestamp\": \"2018-2-12T21:25:04.244Z\","); //result.append(newline); //result.append("\"api-ver\": \"2.05\","); //result.append(newline); //result.append("\"originator-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"request-id\": \"664be3d2-6c12-4f4b-a3e7-c349acced200\","); //result.append(newline); //result.append("\"sub-request-id\": \"1\","); //result.append(newline); //result.append("\"flags\": {"); //result.append(newline); //result.append("\"force\": \"TRUE\","); //result.append(newline); //result.append("\"ttl\": 60000"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("},"); //result.append(newline); //result.append("\"action\": \"Restart\","); //result.append(newline); //result.append("\"action-identifiers\": {"); //result.append(newline); //result.append("\"vnf-id\": \"APPC_Test_VM\""); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); //result.append(newline); //result.append("}"); result.append(newline); result.append("}"); vars.put("json",result.toString()); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${REBUILD_ACCEPTED}"=="WAITING")} 1 1 acceptance_retry false true {"class":"Equals","field":"correlation-id","value":"${request_id}"} = true filter 10.12.5.252 3904 http /events/APPC-LCM-WRITE/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("request_id"); log.info("Rebuild " + requestId + " acceptance response = " + jsonMessage); if(jsonMessage != "WAITING"){ vars.put("REBUILD_ACCEPTED",jsonMessage); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true 1 false false false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true true false { "version": "2.01", "rpc-name": "rebuild", "correlation-id": "${transaction_id}", "type": "request", "body": { "input": { "common-header": { "timestamp": "${reqeust_timestamp}", "api-ver": "2.05", "originator-id": "${transaction_id}", "request-id": "${transaction_id}", "sub-request-id": "1", "flags": { "force": "TRUE", "ttl": 60000 } }, "action": "Rebuild", "action-identifiers": { "vnf-id": "${vnf_id}", "vserver-id": "${vm_id}" }, "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\"}" } } } = ${dmaap_ip} 3904 http /events/${dmaap_topic_post} POST true false true false HttpClient4 false import java.text.SimpleDateFormat; String ISO_FORMAT = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"; SimpleDateFormat isoFormatter = new SimpleDateFormat(ISO_FORMAT); isoFormatter.setTimeZone(TimeZone.getTimeZone("UTC")); Calendar currentTime = Calendar.getInstance(); String timeStampZuluStr = isoFormatter.format(currentTime.getTime()); vars.put("reqeust_timestamp",timeStampZuluStr); vars.put("action_accepted","WAITING"); vars.put("action_completed","WAITING"); vars.put("accepted_retry_limit","3"); vars.put("completed_retry_limit","20"); vars.put("transaction_id",timeStampZuluStr + "-" + ${__threadNum} + "-" + vars.get("request_number")); log.info(vars.get("reqeust_timestamp") + " Begin Restart transaction : " + vars.get("transaction_id")); Content-Type application/json false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="WAITING")} 3000 1 1 acceptance_retry true true true {"class":"Equals","field":"correlation-id","value":"${transaction_id}"} = true filter ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json accept_message_old $.body.output.status.message WAITING false accept_message "message\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("accept_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("acceptance_retry")); int limit = Integer.parseInt(vars.get("accepted_retry_limit")); log.info("Rebuild " + requestId + " acceptance response = " + jsonMessage + " attempt = " + retries); log.info("action_accepted=" + vars.get("action_accepted")); log.info("action_completed=" + vars.get("action_completed")); if(jsonMessage != "WAITING"){ log.info("Received accepted response of '" + jsonMessage + "' for " + requestId); vars.put("action_accepted",jsonMessage); }else if(retries >= limit){ log.info("Reached maximum retries waiting for Accepted response for transaction " + requestId); vars.put("action_accepted","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true ${__javaScript("${action_accepted}"=="ACCEPTED - request accepted" && "${action_completed}"=="WAITING")} 10000 1 1 completed_retry true true ${dmaap_ip} 3904 http /events/${dmaap_topic_get}/appc-jmeter/${__threadNum} GET true false true false HttpClient4 Content-Type application/json false finished_message "reason\\":\\"(.*?)\\" $1$ WAITING 1 true String jsonMessage = vars.get("finished_message"); String requestId = vars.get("transaction_id"); int retries = Integer.parseInt(vars.get("completed_retry")); int limit = Integer.parseInt(vars.get("completed_retry_limit")); log.info("Rebuild " + requestId + " completed response = " + jsonMessage + " attempt = " + retries); if(jsonMessage != "WAITING"){ vars.put("action_completed",jsonMessage); }else if(retries >= limit){ vars.put("action_completed","TIMEOUT"); } groovy false saveConfig true true true true true true true false true true false false false true false false false true 0 true true true true true