From c95ffe76d9253b6102827d6fec4f9c3d09c7923f Mon Sep 17 00:00:00 2001 From: micafer Date: Thu, 7 Nov 2019 10:39:45 +0100 Subject: [PATCH] Add jmeter file --- test/loadtest/im_load_tests.jmx | 708 ++++++++++++++++++++++++++++++++ 1 file changed, 708 insertions(+) create mode 100644 test/loadtest/im_load_tests.jmx diff --git a/test/loadtest/im_load_tests.jmx b/test/loadtest/im_load_tests.jmx new file mode 100644 index 000000000..b03709339 --- /dev/null +++ b/test/loadtest/im_load_tests.jmx @@ -0,0 +1,708 @@ + + + + + + false + false + + + + + + + + + + IMHOST + ${__P(IMHOST,127.0.0.1)} + = + + + IMPORT + ${__P(IMPORT,8800)} + = + + + IMPATH + ${__P(IMPATH,)} + = + + + AUTH + type = InfrastructureManager; username = micafer; password = grycap01\nid = kube; type = Kubernetes; host = https://${__P(KUBE_IP,127.0.0.1)}:6443; token = ${__P(KUBE_TOKEN,sometoken)} + = + + + THREADS_READ + ${__P(THREADS_READ,20)} + = + + + THREADS_WRITE + ${__P(THREADS_WRITE,1)} + = + + + DURATION + ${__P(DURATION,220)} + = + + + RAMP_UP + ${__P(RAMP_UP,50)} + = + + + IMPROT + ${__P(IMPROT,http)} + = + + + + + + + + Authorization + ${AUTH} + + + Accept + application/json + + + + + + continue + + false + 1 + + ${THREADS_READ} + ${RAMP_UP} + 1572946477000 + 1572946477000 + false + + + + + + ${DURATION} + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${IMPATH}/infrastructures + GET + true + false + true + false + + + + + + + infids + $..uri + -1 + NONE + + + + + 10 + 10.0 + + + + infids + infid + true + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${__javaScript('${infid}'.substring('${IMPROT}'.length() + 3 + '${IMHOST}'.length() + 1 + '${IMPORT}'.length()))} + GET + true + false + true + false + + + + + + + 0 + 0.0 + + + + + + + continue + + false + 1 + + ${THREADS_WRITE} + 1 + false + + + + + + ${DURATION} + + + + true + + + + false + network publica (outbound = 'yes') +network privada ( ) + +system front ( +cpu.arch='x86_64' and +cpu.count>=0.5 and +memory.size>=512m and +net_interface.1.connection = 'privada' and +net_interface.0.connection = 'publica' and +net_interface.0.dns_name = 'front' and +disk.0.os.name='linux' and +disk.0.os.flavour='ubuntu' and +disk.0.os.version>='16.04' and +disk.0.os.credentials.username = 'root' and +disk.0.os.credentials.password = 'Aspecial+0ne' and +disk.0.os.credentials.new.password = 'Tututu+01' and +disk.0.image.url = 'docker://ubuntu:18.04' +) + +system wn ( +cpu.arch='x86_64' and +cpu.count>=0.5 and +memory.size>=512m and +net_interface.0.connection = 'privada' and +disk.0.os.name='linux' and +disk.0.os.flavour='ubuntu' and +disk.0.os.version>='16.04' and +disk.0.os.credentials.username = 'root' and +disk.0.os.credentials.password = 'Aspecial+0ne' and +disk.0.os.credentials.new.password = 'Tututu+01' and +disk.0.image.url = 'docker://ubuntu:18.04' +) + +configure test ( +@begin +--- + - tasks: + - shell: echo "hola" + +@end +) + +deploy front 1 +deploy wn 1 + +contextualize ( + system front configure test step 1 + system wn configure test step 1 +) + + = + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${IMPATH}/infrastructures + POST + true + false + true + false + + + + + + + new_infid + $..uri + 1 + NONE + + + + + ${__javaScript(( "${inf_state}" != "unconfigured" && "${inf_state}" != "configured" && "${inf_state}" != "failed" && "${new_infid}" != "NONE"),)} + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/state + GET + true + false + true + false + + + + + + + inf_state + $.state.state + + NONE + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/vms/0 + GET + true + false + true + false + + + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/contmsg + GET + true + false + true + false + + + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/vms/0/state + GET + true + false + true + false + + + + + + + 3000 + + + + + true + + + + false + network publica +network privada +system wn +deploy wn 1 + = + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid} + POST + true + false + true + false + + + + + + + ${__javaScript(( "${add_inf_state}" != "unconfigured" && "${add_inf_state}" != "configured" && "${add_inf_state}" != "failed" && "${new_infid}" != "NONE"),)} + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/state + GET + true + false + true + false + + + + + + + add_inf_state + $.state.state + + NONE + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/vms/0 + GET + true + false + true + false + + + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/vms/0/contmsg + GET + true + false + true + false + + + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid}/vms/0/state + GET + true + false + true + false + + + + + + + 3000 + + + + + + + + + ${IMHOST} + ${IMPORT} + ${IMPROT} + + ${new_infid} + DELETE + true + false + true + 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 + + + /var/tmp/threads.log + 500 + false + + + + + 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 + + + /var/tmp/rtimes.log + 1000 + false + + + + + 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 + + + /var/tmp/trans.log + 2000 + false + + + + + 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 + + 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 + + + + + + + +