From 285a9db4548eba445c34933e6da6f22ef1af1b68 Mon Sep 17 00:00:00 2001 From: ranpollak Date: Wed, 20 Jun 2018 14:42:59 +0300 Subject: add Jmeter Test BVT Issue-ID: INT-300 Change-Id: Ic8085b673c1584779d11de56d9c476a2f09716b5 Signed-off-by: ranpollak --- S3Ptools/Jmeter/Ran_Test.jmx | 3147 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3147 insertions(+) create mode 100644 S3Ptools/Jmeter/Ran_Test.jmx diff --git a/S3Ptools/Jmeter/Ran_Test.jmx b/S3Ptools/Jmeter/Ran_Test.jmx new file mode 100644 index 000000000..d25c96b2a --- /dev/null +++ b/S3Ptools/Jmeter/Ran_Test.jmx @@ -0,0 +1,3147 @@ + + + + + + false + false + + + + + + + + + + ################## Test-Params ################## + ############################################## + ############################################## + = + + + TestName + 010-test.log + = + + + step + 0 + = + + + product + ASDC + = + + + fileRepo + /qa-test-repo/TestsProperties/HEATFiles/ + = + + + file + SimpleHEAT-1610.zip + = + + + zip + application/zip + = + + + ##################### URL #################### + ############################################## + ############################################## + = + + + port + 8080 + = + + + protocol + http + = + + + ############################################## + ############################################## + ############################################## + = + + + + + + continue + + false + 1 + + 1 + 1 + 1422885662000 + 1422885662000 + false + + + + + + false + 0 + rm + + + + + -rf + = + + + + /tmp/TestResult/${TestName} + = + + + + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + + false + 0 + cat + + + + + ASDC.txt + = + + + + + + + /qa-test-repo/TestsProperties/API/ + + + + false + + + String ResponseString = prev.getResponseDataAsString(); + +String[] ActionItem= ResponseString.split("\n"); + +for( String s : ActionItem) +{ + log.info("line is : " + s); + log.info("key is : " + s.split("!~!~!")[0]); + log.info("value is : " + s.split("!~!~!")[1]); + props.put(s.split("!~!~!")[0], s.split("!~!~!")[1]); +} + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + /tmp/TestResult/ResultsTree.csv + + + + + false + 0 + bash + + + + + Get_SUT_Params.sh + = + + + + ${product} + = + + + + ${ASDC_SETUP}.xml + = + + + + + + + /qa-test-repo/scripts/ASDC/ + + + + false + + + String ResponseString = prev.getResponseDataAsString(); + +log.info("########################" + ResponseString); + +String[] ActionItem= ResponseString.split("\n"); + +for( String s : ActionItem) +{ + log.info("line is : " + s); + log.info("data field name is : " + s.split(" ")[0]); + log.info("value is : " + s.split(" ")[1]); + props.put(s.split(" ")[0], s.split(" ")[1]); +} + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + /tmp/TestResult/ResultsTree.csv + + + + + + continue + + false + ${MAIN_THREAD_GROUP_CNT} + + ${NUM_OF_THREAD} + ${TEST_DURATION} + 1422885662000 + 1422885662000 + false + + + + + + + + Accept + application/json + + + Content-Type + application/json + + + ${__P(HTTP_REST_USER_ID_HEADER_NAME)} + ${__P(HTTP_REST_USER_ID_HEADER_VALUE)} + + + Accept - application/octet-stream + + + + + + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/VLM_props.txt)})}; + + + false + + + + 300 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/VLM_body.txt,,requestBody)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)} + POST + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + VLM + "value":"(.+?)" + $1$ + 0 + 1 + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +props.put("VLM_P","${VLM}"); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +String body = vars.get("requestBody"); +String url = "${protocol}://${__P(VM_controller)}:${port}/${__P(ASDC_prefix)}"; + +p.println("\n#######################"+" Create Vendor License Model "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("POST - "+url); + p.println(body); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("POST - "+url); + p.println(body); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + ../_JMeter_Test_Fragments/BE/VLM/Get_VLM_Version_ID_and_Label.jmx + + + + true + + + + false + + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${VLM}/versions/${__P(vlmNewVersionID_p)} + GET + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + 300 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +import org.apache.jmeter.services.FileServer; +import test.TestParse.*; + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +Map map = new HashMap(); + +map.put("vendorName","${__P(VLM_vendorName)}"); +map.put("description","${__P(VLM_description)}"); +map.put("iconRef","${__P(VLM_iconRef)}"); +map.put("id","${__P(VLM_P)}"); + + +DataValidation dv = new DataValidation(); +String res = dv.verifyResponse(map,ResponseString); + +p.println("\n#######################"+" Get Vendor License Model "+"#######################"); + +if (ResponseCode.contains("200") && !res.contains("FAIL")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +p.println("#####################################################################\n"); + +p.close();f.close(); + + + + + + + + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/EP_props.txt)})} + + + false + + + + 300 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/EP_body.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(EP)} + POST + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + entityId + "value":"(.+?)" + $1$ + 0 + 1 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +props.put("EPid_P","${entityId}"); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; +p.println("\n#######################"+" Create Entitlement Pool Step "+"#######################"); +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create REST failed."); + p.println("Response String : " + ResponseString); +} +p.println("#####################################################################\n"); +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(EP)}/${__P(EPid_P)} + GET + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + 300 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +import org.apache.jmeter.services.FileServer; +import test.TestParse.*; + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +Map map = new HashMap(); + +map.put("name","${__P(EP_name)}"); +map.put("description","${__P(EP_description)}"); +//map.put("thresholdValue",props.get("EP_thresholdValue")); +map.put("thresholdUnits","${__P(EP_thresholdUnits)}"); +//map.put("entitlementMetric",props.get("EP_entitlementMetric")); +map.put("increments","${__P(EP_increments)}"); +//map.put("aggregationFunction",props.get("EP_aggregationFunction")); +//map.put("operationalScope",props.get("EP_operationalScope")); +//map.put("time",props.get("EP_time")); +map.put("manufacturerReferenceNumber","${__P(EP_manufacturerReferenceNumber)}"); + +map.put("id","${__P(EPid_P)}"); + + +DataValidation dv = new DataValidation(); +String res = dv.verifyResponse(map,ResponseString); + +p.println("\n#######################"+" Get Entitlement Pool "+"#######################"); + +if (ResponseCode.contains("200") && !res.contains("FAIL")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +p.println("#####################################################################\n"); + +p.close();f.close(); + + + + 1 + + + + + + + + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/LKG_props.txt)})} + + + false + + + + 300 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/LKG_body.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(LKG)} + POST + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + entityId + "value":"(.+?)" + $1$ + 0 + 1 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +props.put("LKGid_P","${entityId}"); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; +p.println("\n#######################"+" Create License Key Group Step "+"#######################"); +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create REST failed."); + p.println("Response String : " + ResponseString); +} +p.println("#####################################################################\n"); +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(LKG)}/${__P(LKGid_P)} + GET + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + 300 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +import org.apache.jmeter.services.FileServer; +import test.TestParse.*; + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +Map map = new HashMap(); + +map.put("name","${__P(LKG_name)}"); +map.put("description","${__P(LKG_description)}"); +//map.put("aggregationFunction",props.get("LKG_type")); +//map.put("operationalScope",props.get("LKG_operationalScope")); +map.put("id","${__P(LKGid_P)}"); + +DataValidation dv = new DataValidation(); +String res = dv.verifyResponse(map,ResponseString); + +p.println("\n#######################"+" Get License Key Group "+"#######################"); + +if (ResponseCode.contains("200") && !res.contains("FAIL")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +p.println("#####################################################################\n"); + +p.close();f.close(); + + + + 1 + + + + + + + + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/FG_props.txt)})} + + + false + + + + 300 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/FG_body.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(FG)} + POST + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + entityId + "value":"(.+?)" + $1$ + 0 + 1 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +props.put("FGid_P","${entityId}"); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; +p.println("\n#######################"+" Create Feature Group Step "+"#######################"); +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create REST failed."); + p.println("Response String : " + ResponseString); +} +p.println("#####################################################################\n"); +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(FG)}/${__P(FGid_P)} + GET + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + 300 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +import org.apache.jmeter.services.FileServer; +import test.TestParse.*; + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +Map map = new HashMap(); + +map.put("name","${__P(FG_name)}"); +map.put("description","${__P(FG_description)}"); +map.put("partNumber","${__P(FG_partNumber)}"); + +map.put("id","${__P(FGid_P)}"); + +DataValidation dv = new DataValidation(); +String res = dv.verifyResponse(map,ResponseString); + +p.println("\n#######################"+" Get Feature Group "+"#######################"); + +if (ResponseCode.contains("200") && !res.contains("FAIL")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +p.println("#####################################################################\n"); + +p.close();f.close(); + + + + 1 + + + + + + + + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/LA_props.txt)})} + + + false + + + + 300 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/LA_body.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(LA)} + POST + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + entityId + "value":"(.+?)" + $1$ + 0 + 1 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +props.put("LAid_P","${entityId}"); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; +p.println("\n#######################"+" Create License Agreement Step "+"#######################"); +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create REST failed."); + p.println("Response String : " + ResponseString); +} +p.println("#####################################################################\n"); +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/${__P(LA)}/${__P(LAid_P)} + GET + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + 300 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +import org.apache.jmeter.services.FileServer; +import test.TestParse.*; + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +Map map = new HashMap(); + +map.put("name","${__P(LA_name)}"); +map.put("description","${__P(LA_description)}"); +//map.put("licenseModelType","${LA_licenseModelType}"); +map.put("requirementsAndConstrains","${__P(LA_requirementsAndConstrains)}"); +map.put("id","${__P(LAid_P)}"); + +DataValidation dv = new DataValidation(); +String res = dv.verifyResponse(map,ResponseString); + +p.println("\n#######################"+" Get License Agreement "+"#######################"); + +if (ResponseCode.contains("200") && !res.contains("FAIL")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + + p.println(res); +} +p.println("#####################################################################\n"); + +p.close();f.close(); + + + + 1 + + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/Action_Checkin.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/actions + PUT + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" Checkin VLM "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create VLM REST failed."); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/Action_Submit.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_prefix)}/${__P(VLM_P)}/versions/${__P(vlmNewVersionID_p)}/actions + PUT + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" Submit VLM "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create VLM REST failed."); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + ../_JMeter_Test_Fragments/BE/VLM/Get_VLM_Version_ID_and_Label.jmx + + + + + + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/VSP_props.txt)})} + + + false + + + + 300 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/VSP_body.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_VSP)} + POST + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + entityId + "vspId":"(.+?)" + $1$ + 0 + 1 + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +props.put("VSP_P","${entityId}"); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; +p.println("\n#######################"+" Create Vendor Software Products Step "+"#######################"); +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage + "\nERROR: Create REST failed."); + p.println("Response String : " + ResponseString); +} +p.println("#####################################################################\n"); +p.close();f.close(); + + + + 300 + + + + 1 + + + + + ../_JMeter_Test_Fragments/BE/VSP/Get_VSP_Version_ID_and_Label.jmx + + + + + + + + ${fileRepo}${file} + + ${zip} + + + + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_VSP)}/${__P(VSP_P)}/versions/${__P(vspNewVersionID_p)}/upload + POST + true + false + true + true + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + status + "status":"(.+?)" + $1$ + 0 + 1 + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" ${__samplerName} "+"#######################"); + +if (ResponseCode.contains("200") && "${status}".equals("Success")) +{ + + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); + +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/Action_Checkin.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_VSP)}/${__P(VSP_P)}/versions/${__P(vspNewVersionID_p)}/actions + PUT + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" Checkin VSP "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/Action_Submit.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_VSP)}/${__P(VSP_P)}/versions/${__P(vspNewVersionID_p)}/actions + PUT + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" Submit VSP "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + ../_JMeter_Test_Fragments/BE/VSP/Get_VSP_Version_ID_and_Label.jmx + + + + true + + + + false + ${__eval(${__FileToString(/qa-test-repo/TestsProperties/ASDC/Action_CreatePackage.txt)})} + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_VSP)}/${__P(VSP_P)}/versions/${__P(vspNewVersionID_p)}/actions + PUT + true + false + true + false + HttpClient3.1 + false + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + false + packageId + "packageId":"(.+?)" + $1$ + 0 + 1 + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" ${__samplerName} "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + false + 0 + mkdir + + + + + -p + = + + + + /tmp/${__TestPlanName}_${__P(VSP_P)} + = + + + + + + + + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + + true + + + + false + + = + + + + ${__P(VM_controller)} + ${port} + + + ${protocol} + + ${__P(ASDC_VSP)}/${__P(PKG)}/${__P(VSP_P)} + GET + true + false + true + false + HttpClient3.1 + false + + + + + + + ${__P(HTTP_REST_USER_ID_HEADER_NAME)} + ${__P(HTTP_REST_USER_ID_HEADER_VALUE)} + + + Accept + application/octet-stream + + + Accept - application/octet-stream + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + false + true + true + false + false + false + false + false + false + false + false + 0 + true + true + + + + + + + /tmp/${__TestPlanName}_${__P(VSP_P)}/${__P(VSP_P)}.zip + false + true + true + true + + + + false + + + //String ResponseString = prev.getResponseDataAsString(); +String ResponseCode = prev.getResponseCode(); +String ResponseMessage = prev.getResponseMessage(); + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +p.println("\n#######################"+" Download Package "+"#######################"); + +if (ResponseCode.contains("200")) +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + //p.println("Response String : " + ResponseString); +} +else +{ + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println("Response Code : " + ResponseCode); + p.println("Response Message : " + ResponseMessage); + //p.println("Response String : " + ResponseString); +} + +p.println("############################################################################\n"); + +p.close();f.close(); + + + + 300 + + + + 1 + + + + + false + 0 + unzip + + + + + * + = + + + + + + + /tmp/${__TestPlanName}_${__P(VSP_P)}/ + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + 300 + + + + + false + 0 + rm + + + + + -rf + = + + + + ${__P(VSP_P)}.zip + = + + + + + + + /tmp/${__TestPlanName}_${__P(VSP_P)}/ + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + 300 + + + + + false + 0 + bash + + + + + dos2unixCall.sh + = + + + + /qa-test-repo/TestsProperties/HEATFiles/SimpleHEATtoTOSCA + = + + + + + + + /qa-test-repo/scripts/ASDC/ + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + 300 + + + + + false + 0 + bash + + + + + dos2unixCall.sh + = + + + + ${__eval(/tmp/${__TestPlanName}_${__P(VSP_P)})} + = + + + + + + + /qa-test-repo/scripts/ASDC/ + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + 300 + + + + + false + 0 + diff + + + + + -x + = + + + + *example.xml + = + + + + -r + = + + + + /qa-test-repo/TestsProperties/HEATFiles/SimpleHEATtoTOSCA + = + + + + /tmp/${__TestPlanName}_${__P(VSP_P)} + = + + + + + + + + -x *example.xml + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); + +props.put("diffOutput",ResponseString); + + + + + + + false + 0 + cat + + + + + MainServiceTemplate.yaml + = + + + + + + + /qa-test-repo/TestsProperties/HEATFiles/SimpleHEATtoTOSCA/Definitions + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); + +props.put("tosca1",ResponseString); + + + + + + + false + 0 + cat + + + + + MainServiceTemplate.yaml + = + + + + + + + /tmp/${__TestPlanName}_${__P(VSP_P)}/Definitions/ + + + + false + + saveConfig + + + true + true + true + + true + true + true + true + true + true + true + true + true + false + true + true + true + false + true + 0 + true + true + true + true + true + true + true + + + + + + + false + + + String ResponseString = prev.getResponseDataAsString(); + +props.put("tosca2",ResponseString); + + + + + +String test_tmp_folder = "/tmp/TestResult/${TestName}"; + f = new FileOutputStream(test_tmp_folder, true); + p = new PrintStream(f); + +mydate = "${__time(dd-MM-yyyy hh:mm:ss)}"; + +String file1 = props.get("tosca1"); +String file2 = props.get("tosca2"); + +p.println("\n#######################"+" ${__samplerName} "+"#######################"); + +p.println("\n<<<<<<<<<<<<<<<<<<<<<<<"+" diff Output: "+">>>>>>>>>>>>>>>>>>>>>>\n"); +if(props.get("diffOutput").equals("")){ + p.println(mydate + " : No change in files"); + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: PASS"); + p.println(mydate + " : Files are equals!"); +}else{ + p.println(mydate + " : \n"+props.get("diffOutput")); + p.println(mydate + " : Thread number ${__threadNum()} in step ${__samplerName}: FAIL"); + p.println(mydate + " : Files are NOT equals!!!"); +} +p.println("\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n"); + +p.println("############################################################################\n"); + +p.close();f.close(); + + + false + + + + + + -- cgit 1.2.3-korg