false true false xmeter_ip ${__property(xmeter_ip,,)} xmeter server ip = port ${__property(port,,)} xmeter service port = xmeter_user ${__property(xmeter_user,,)} = xmeter_pwd ${__property(xmeter_pwd,,)} = emqx_ip ${__property(emqx_ip,,)} = emqx_private_ip1 ${__property(emqx_private_ip1,,)} = emqx_private_ip2 ${__property(emqx_private_ip2,,)} = emqx_private_ip3 ${__property(emqx_private_ip3,,)} = api_version ${__property(api_version,,/api/v5)} = scripts_path ${__property(scripts_path,,)} performance scripts path = plugins_path ${__property(plugins_path,,)} = report_file ${__property(report_file,,)} = mysql_ip ${__property(mysql_ip,,)} = pgsql_ip ${__property(pgsql_ip,,)} = redis_ip ${__property(redis_ip,,)} = mongo_ip ${__property(mongo_ip,,)} = http_ip ${__property(http_ip,,)} = users_number ${__property(users_number,,80000)} = 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 continue false 1 1 1 false true http://${emqx_ip} admin public false ${xmeter_ip} ${port} https 6 true false {"password":"${xmeter_pwd}","email":"${xmeter_user}"} = /commercial_service/rest/account/login/ POST true false true false userid $..id 1 err_userid true token jwt: Con 1 false 0 content-type application/json;charset=utf-8 xmeter-authorization ${token} /commercial_service/rest/account/${userid}/api_key POST true false true false api_key $..apiKey 1 err_api_key content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} true false {"name":"dailytest-${__time(yyMMdd,)}","description":"","hostIps":["${emqx_private_ip1}","${emqx_private_ip2}","${emqx_private_ip3}"]} = /commercial_service/rest/applications/${userid} POST true false true false content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} applicationId $..id 1 err_id ${__jexl3("${applicationId}"=="err_id",)} false true true false {"name":"dailytest-${__time(yyMMdd,)}-${__Random(100,999,)}","description":"","hostIps":["${emqx_private_ip1}","${emqx_private_ip2}","${emqx_private_ip3}"]} = /commercial_service/rest/applications/${userid} POST true false true false content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} applicationId $..id 1 err_id false false ${plugins_path}/mqtt-xmeter-fuse-2.0.2-jar-with-dependencies.jar 0 application/java-archive false true = true overwrite /commercial_service/rest/dependency/plugins/upload POST true false true true true X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true false true import redis.clients.jedis.Jedis; Jedis jedis = new Jedis("${redis_ip}",6379); //jedis.auth(""); jedis.select(0); jedis.flushDB(); jedis.hset("mqtt_user:emqx","password_hash","public"); jedis.close(); false ${scripts_path}/broker_connect.jmx test_case application/octet-stream false true = true overwrite /commercial_service/rest/api/fileupload POST true false true true true test_id $..testId 1 err_test_id xmeter-api-key ${api_key} true false {"server":"${redis_ip}:6379","salt_position":"prefix","redis_type":"single","database":0,"auto_reconnect":true,"password":"","password_hash_algorithm":"plain","pool_size":8,"cmd":"HMGET mqtt_user:${username} password_hash","ssl":{"enable":false},"backend":"redis","mechanism":"password-based"} = ${emqx_ip} 18083 http ${api_version}/authentication POST true false true false 200 Assertion.response_code false 2 /commercial_service/rest/testcase/${userid}/${test_id}/script_info GET true false true false ramp_up $.threadGroups[0].rampup 1 err_rampup 300 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true true false {"testId":"${test_id}","vuNumber":${users_number},"executionDuration":-1,"loopCount":1,"rampupPeriod":${ramp_up},"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":${users_number},"tgUsers":[{"id":0,"number":${users_number},"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}} = /commercial_service/rest/testcase/${userid}/request POST true false true false report_id $..id 1 err_report_id https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id} false import java.io.File; import java.io.FileWriter; FileWriter writer = new FileWriter("${report_file}", true); String content = "redis persist" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n"; writer.write(content); writer.flush(); writer.close(); 3000 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true ${emqx_ip} 18083 http ${api_version}/nodes GET true false true false count1;count2;count3 $.[0].connections;$.[1].connections;$.[2].connections 1;1;1 err;0;0 int count = ${count1}+${count2}+${count3}; System.out.println(count); if(count!=400000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false 490000 ${emqx_ip} 18083 http ${api_version}/authentication/password-based%3Aredis DELETE true false true false 204 Assertion.response_code false 2 100000 /commercial_service/rest/testcase/${userid}/runningtests GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest test_status $..status 1 err_test_status test_id $..id 1 err_test_id ${__jexl3("${test_status}"=="RUNNING",)} false true /commercial_service/rest/testcase/testrun/stop/${test_id} GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest 1 0 200000 false true false true true 5000 mysql8 jdbc:mysql://${mysql_ip}:3306/mqtt com.mysql.jdbc.Driver true public123 0 false 10000 DEFAULT 60000 test mysql8 Update Statement CREATE TABLE IF NOT EXISTS `mqtt_user` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `username` varchar(100) DEFAULT NULL, `password_hash` varchar(100) DEFAULT NULL, `salt` varchar(35) DEFAULT NULL, `is_superuser` tinyint(1) DEFAULT 0, `created` datetime DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `mqtt_username` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; Store as String updates Assertion.response_data false 16 mysql8 Update Statement INSERT INTO `mqtt_user` ( `username`, `password_hash`, `salt`) VALUES ('emqx', 'public', NULL); Store as String updates Assertion.response_data false 16 ${scripts_path}/broker_connect.jmx test_case application/octet-stream false true = true overwrite /commercial_service/rest/api/fileupload POST true false true true true test_id $..testId 1 err_test_id xmeter-api-key ${api_key} true false {"server":"${mysql_ip}:3306","username":"test","password":"public123","database":"mqtt","pool_size":8,"auto_reconnect":true,"ssl":{"enable":false},"query":"SELECT password_hash FROM mqtt_user where username = ${username} LIMIT 1","password_hash_algorithm":"plain","salt_position":"prefix","query_timeout":"5s","backend":"mysql","mechanism":"password-based"} = ${emqx_ip} 18083 http ${api_version}/authentication POST true false true false 200 Assertion.response_code false 2 /commercial_service/rest/testcase/${userid}/${test_id}/script_info GET true false true false ramp_up $.threadGroups[0].rampup 1 err_rampup 300 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true true false {"testId":"${test_id}","vuNumber":${users_number},"executionDuration":-1,"loopCount":1,"rampupPeriod":${ramp_up},"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":${users_number},"tgUsers":[{"id":0,"number":${users_number},"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}} = /commercial_service/rest/testcase/${userid}/request POST true false true false report_id $..id 1 err_report_id https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id} false import java.io.File; import java.io.FileWriter; FileWriter writer = new FileWriter("${report_file}", true); String content = "mysql connect" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n"; writer.write(content); writer.flush(); writer.close(); 3000 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true ${emqx_ip} 18083 http ${api_version}/nodes GET true false true false count1;count2;count3 $.[0].connections;$.[1].connections;$.[2].connections 1;1;1 err;0;0 int count = ${count1}+${count2}+${count3}; System.out.println(count); if(count!=400000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false 490000 ${emqx_ip} 18083 http ${api_version}/authentication/password-based%3Amysql DELETE true false true false 204 Assertion.response_code false 2 100000 mysql8 Update Statement DELETE FROM mqtt_user WHERE username = "emqx"; Store as String 1 Assertion.response_data false 16 /commercial_service/rest/testcase/${userid}/runningtests GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest test_status $..status 1 err_test_status test_id $..id 1 err_test_id ${__jexl3("${test_status}"=="RUNNING",)} false true /commercial_service/rest/testcase/testrun/stop/${test_id} GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest 1 0 200000 false true false true groovy true import com.mongodb.* import com.gmongo.GMongoClient import com.mongodb.MongoCredential import com.mongodb.ServerAddress // disable user and pwd connect GMongoClient client = new GMongoClient(new ServerAddress("${mongo_ip}",27017)) def DB=client.getDB("mqtt") //insert data def dataDB=DB.getCollection("mqtt_user").insert(["username" : "emqx", "password_hash" : "public", "is_superuser" : false, "salt": ""]) String ReData=dataDB SampleResult.setResponseData(ReData) disable account password connection ${scripts_path}/broker_connect.jmx test_case application/octet-stream false true = true overwrite /commercial_service/rest/api/fileupload POST true false true true true test_id $..testId 1 err_test_id xmeter-api-key ${api_key} true false {"mongo_type":"single","server":"${mongo_ip}:27017","database":"mqtt","collection":"mqtt_user","selector":{"username":"${username}"},"password_hash_field":"password_hash","salt_field":"","password_hash_algorithm":"plain","salt_position":"prefix","pool_size":8,"ssl":{"enable":false},"topology":{"connect_timeout_ms":20000},"backend":"mongodb","mechanism":"password-based"} = ${emqx_ip} 18083 http ${api_version}/authentication POST true false true false 200 Assertion.response_code false 2 /commercial_service/rest/testcase/${userid}/${test_id}/script_info GET true false true false ramp_up $.threadGroups[0].rampup 1 err_rampup 300 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true true false {"testId":"${test_id}","vuNumber":${users_number},"executionDuration":-1,"loopCount":1,"rampupPeriod":${ramp_up},"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":${users_number},"tgUsers":[{"id":0,"number":${users_number},"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}} = /commercial_service/rest/testcase/${userid}/request POST true false true false report_id $..id 1 err_report_id https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id} false import java.io.File; import java.io.FileWriter; FileWriter writer = new FileWriter("${report_file}", true); String content = "mongo connect" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n"; writer.write(content); writer.flush(); writer.close(); 3000 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true ${emqx_ip} 18083 http ${api_version}/nodes GET true false true false count1;count2;count3 $.[0].connections;$.[1].connections;$.[2].connections 1;1;1 err;0;0 int count = ${count1}+${count2}+${count3}; System.out.println(count); if(count!=400000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false 490000 ${emqx_ip} 18083 http ${api_version}/authentication/password-based%3Amongodb DELETE true false true false 204 Assertion.response_code false 2 100000 groovy true import com.mongodb.* import com.gmongo.GMongoClient import com.mongodb.MongoCredential import com.mongodb.ServerAddress // disable user and pwd connect GMongoClient client = new GMongoClient(new ServerAddress("${mongo_ip}",27017)) def DB=client.getDB("mqtt") //remove data def dataDB=DB.getCollection("mqtt_user").remove(["username" : "emqx", "password_hash" : "public", "is_superuser" : false, "salt": ""]) String ReData=dataDB SampleResult.setResponseData(ReData) disable account password connection /commercial_service/rest/testcase/${userid}/runningtests GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest test_status $..status 1 err_test_status test_id $..id 1 err_test_id ${__jexl3("${test_status}"=="RUNNING",)} false true /commercial_service/rest/testcase/testrun/stop/${test_id} GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest 1 0 200000 false true false true true 5000 pgsql jdbc:postgresql://${pgsql_ip}:5432/mqtt org.postgresql.Driver true public123 0 false 10000 DEFAULT 60000 test pgsql Update Statement CREATE TABLE IF NOT EXISTS mqtt_user ( id SERIAL primary key, is_superuser boolean, username character varying(100), password_hash character varying(100), salt character varying(40) ); Store as String updates Assertion.response_data false 16 pgsql Update Statement INSERT INTO mqtt_user (username, password_hash, salt, is_superuser) VALUES ('emqx', 'public', NULL, false); Store as String updates Assertion.response_data false 16 ${scripts_path}/pgsql_broker_connect.jmx test_case application/octet-stream false true = true overwrite /commercial_service/rest/api/fileupload POST true false true true true test_id $..testId 1 err_test_id xmeter-api-key ${api_key} true false {"server":"${pgsql_ip}:5432","username":"test","password":"public123","database":"mqtt","pool_size":8,"auto_reconnect":true,"ssl":{"enable":false},"query":"SELECT password_hash FROM mqtt_user where username = ${username} LIMIT 1","password_hash_algorithm":"plain","salt_position":"prefix","backend":"postgresql","mechanism":"password-based"} = ${emqx_ip} 18083 http ${api_version}/authentication POST true false true false 200 Assertion.response_code false 2 false true true false {"testId":"${test_id}","vuNumber":10000,"executionDuration":-1,"loopCount":1,"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":10000,"tgUsers":[{"id":0,"number":10000,"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}} = /commercial_service/rest/testcase/${userid}/request POST true false true false report_id $..id 1 err_report_id https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id} false import java.io.File; import java.io.FileWriter; FileWriter writer = new FileWriter("${report_file}", true); String content = "pgsql connect" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n"; writer.write(content); writer.flush(); writer.close(); 3000 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true ${emqx_ip} 18083 http ${api_version}/nodes GET true false true false count1;count2;count3 $.[0].connections;$.[1].connections;$.[2].connections 1;1;1 err;0;0 int count = ${count1}+${count2}+${count3}; System.out.println(count); if(count!=250000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false 260000 count1 $..connections 1 err int count = ${count1}; System.out.println(count); if(count!=50000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false ${emqx_ip} 18083 http ${api_version}/authentication/password-based%3Apostgresql DELETE true false true false 204 Assertion.response_code false 2 60000 pgsql Update Statement DELETE FROM mqtt_user WHERE username = 'emqx'; Store as String 200 Assertion.response_code false 16 /commercial_service/rest/testcase/${userid}/runningtests GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest test_status $..status 1 err_test_status test_id $..id 1 err_test_id ${__jexl3("${test_status}"=="RUNNING",)} false true /commercial_service/rest/testcase/testrun/stop/${test_id} GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest 1 0 200000 false true false true ${scripts_path}/broker_mqtt_connect.jmx test_case application/octet-stream false true = true overwrite /commercial_service/rest/api/fileupload POST true false true true true test_id $..testId 1 err_test_id xmeter-api-key ${api_key} false true true false {"testId":"${test_id}","vuNumber":80000,"executionDuration":-1,"loopCount":1,"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":80000,"tgUsers":[{"id":0,"number":80000,"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}} = /commercial_service/rest/testcase/${userid}/request POST true false true false report_id $..id 1 err_report_id https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id} false import java.io.File; import java.io.FileWriter; FileWriter writer = new FileWriter("${report_file}", true); String content = "connect mqtt test" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n"; writer.write(content); writer.flush(); writer.close(); 3000 content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} false true ${emqx_ip} 18083 http ${api_version}/nodes GET true false true false 260000 count1;count2;count3 $.[0].connections;$.[1].connections;$.[2].connections 1;1;1 err;0;0 int count = ${count1}+${count2}+${count3}; System.out.println(count); if(count!=400000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false count1 $..connections 1 err int count = ${count1}; System.out.println(count); if(count!=250000) { Failure = true; FailureMessage = "failed"; }else{ FailureMessage = "true"; } false 1 0 60000 /commercial_service/rest/testcase/${userid}/runningtests GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest test_status $..status 1 err_test_status test_id $..id 1 err_test_id ${__jexl3("${test_status}"=="RUNNING",)} false true /commercial_service/rest/testcase/testrun/stop/${test_id} GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest 1 0 200000 false true false true ${scripts_path}/broker_pub_sub.jmx test_case application/octet-stream false true = true overwrite /commercial_service/rest/api/fileupload POST true false true true true test_id $..testId 1 err_test_id xmeter-api-key ${api_key} false true true false {"testId":"${test_id}","vuNumber":80000,"executionDuration":-1,"loopCount":1,"replaceLoopToInfinite":false,"variables":[{"description":"emqx server ip1","name":"emqx_ip1","value":"${emqx_private_ip1}"},{"name":"emqx_ip2","value":"${emqx_private_ip2}","description":"emqx server ip2"},{"name":"emqx_ip3","value":"${emqx_private_ip3}","description":"emqx server ip3"}],"distributions":[{"siteId":1,"value":80000,"tgUsers":[{"id":0,"number":40000,"threadGroupName":"Sub","throughputs":[]},{"id":1,"number":40000,"threadGroupName":"Pub","throughputs":[]}]}],"dockerIpConfigEnabled":true,"applicationId":${applicationId},"clientTime":${__time(,)}} = /commercial_service/rest/testcase/${userid}/request POST true false true false report_id $..id 1 err_report_id https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id} false import java.io.File; import java.io.FileWriter; FileWriter writer = new FileWriter("${report_file}", true); String content = "mqtt pub&sub" + " " + "${__timeShift(yyyyMMdd HH:mm:ss,,,,)}" + " " + "https://${xmeter_ip}:${port}/commercialPage.html#/testrunMonitor/${report_id}" + "\n"; writer.write(content); writer.flush(); writer.close(); content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest xmeter-authorization ${token} 1 0 500000 false true /commercial_service/rest/testcase/${userid}/runningtests GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest test_status $..status 1 err_test_status test_id $..id 1 err_test_id ${__jexl3("${test_status}"=="RUNNING",)} false true /commercial_service/rest/testcase/testrun/stop/${test_id} GET true false true false xmeter-authorization ${token} content-type application/json;charset=utf-8 X-Requested-With XMLHttpRequest 1 0 200000