ContributionsMost RecentMost LikesSolutionsoffline api testing Hi In my project two types API are available , one is online and one is offline so can anyone please guide me how i do offline api testing ? Thanks in advance BR, DEV each parameter value need to change in new rest request Hi , I am using soapui 5.3.1 open source tool where in rest request i am sending 5-7 parameters value. so i want to test each parameter by giving different values using method BVS etc.. so how i will do that because every time adding new rest request for each parameter its difficult job. so can you please suggest the best and easy way to do that. E.g. Request {"TestReportId":1546,"addInformation":"test","checkTestDate":"2017-11-16","checkTestResult":true,"TestDate":"2017-11-16","TestResult":true,"PrntTestDate":"2017-11-23","PrntTestResultDen1":"1","PrntTestResultDen2":"2","PrntTestResultDen3":"3","PrntTestResultDen4":"4","TestId":1251,"testsamId":"1223334444","TestsamCollDate":"2017-11-09"} so here in parameter i want to test with giving different value like case 1 : TestReportId:1546 case 2: TestReportId: abdc case 3 : TestReportId: 15.20 case 4 : TestReportId : 154685 etc.. so every time adding new request is difficult so please guide me . Thanks, Dev load test in soapui I am using soapui 5.2.1 (open source) where i want to do load test on my rest api request. so my requirement is want to send a particular load/thread (virtual request/user) request after a particular time . E.g. 1 rest api request ..thread 10 send after every 10 seconds ..till around 30 minutes so please request you kindly guide me how to do same which load test i want to use ....simple/variance/thread etc.. and what assertion need to add ...max errors/set max/tps etc... Thanks dev. Suggest any rest api Security testing sample Rest API security testing based on given security scan type in soapui 5.3.1 how to configure and what assertion is required and what the option we need to select in strategy and advanced tabs option please explain with some sample examples, really it will very helpful for me if someone throw some lights on security testing Thanking you, Best regards dev Re: get the dynamic property value in json post request Thanks Its works .. thank you very much regards dev Re: how to handle empty field in excel sheet in data driven testing using groovy script Thanks PaulMS for your valuable reply . i used double quote in empty field ("") and run the groovy script so its works now next column data value is not display in empty field Currently its working Thank you very much ! best regards Dev how to handle empty field in excel sheet in data driven testing using groovy script I am using soapui 5.2.1 open source where i am trying to read excel sheet data and send json post request through groovy script if data/value is available in all fields in excel sheet then it works properly but some below issues i am facing when one of the field is empty 1) if in excel sheet 4 rows and columns available and second row's first column is empty and run the groovy then second column data value is shown in first column E.g. in this case docotrassociateId value is shown in OnSetDate field so want to handle empty field using groovy script so request you please guide me. caseId onSetDate VisitDate DocotorAssociateId 39 1 40 2017-05-05 2017-05-05 1 import java.io.File; import java.io.FileInputStream; import java.text.DecimalFormat; import java.util.Iterator; import java.util.Iterator; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import com.eviware.soapui.impl.wsdl.panels.support.MockTestSuiteRunner; import com.eviware.soapui.impl.wsdl.panels.support.MockTestSuiteRunContext; project = testRunner.getTestCase().testSuite.getProject(); testSuite = project.getTestSuiteByName("DTOUser_TestSuite"); def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) FileInputStream file = new FileInputStream(new File('D:\\SOAPUiTool\\testingsheet.xlsx')); XSSFWorkbook workbook1 = new XSSFWorkbook(file) XSSFSheet sheet1 = workbook1.getSheetAt(0) Iterator ite = sheet1.rowIterator(); def myTestCase = context.testCase propTestStep = myTestCase.getTestStepByName("PropertiesClinicalInfo") // get the Property TestStep object headers=[] ite.next(); DecimalFormat decimalFormat = new DecimalFormat("#"); while (ite.hasNext()) { Row row = ite.next(); Iterator<Cell> cite = row.cellIterator(); project.setPropertyValue("caseId", cite.next().toString()) log.info(" caseId:: " + project.getPropertyValue("caseId").toString()) project.setPropertyValue("onsetDate",cite.next().toString()) log.info("onsetDate :: " + project.getPropertyValue("onsetDate").toString()) project.setPropertyValue("visitDate",cite.next().toString()) log.info("visitDate :: " + project.getPropertyValue("visitDate").toString()) project.setPropertyValue("doctorAssociationId", cite.next().toString()) log.info("doctorAssociationId :: " + project.getPropertyValue("doctorAssociationId").toString()) def prj = testRunner.testCase.testSuite.project.workspace.getProjectByName("IRSHA AUG17") tCase = prj.testSuites['DTOUser_TestSuite'].testCases['TC3AddClinicalInfo'] tStep = tCase.getTestStepByName("AddClicnicalInfo") tStep.setPropertyValue("caseId",project.getPropertyValue("caseId").toString()); tStep.setPropertyValue("onsetDate",project.getPropertyValue("onsetDate").toString()); tStep.setPropertyValue("visitDate",project.getPropertyValue("visitDate").toString()); tStep.setPropertyValue("doctorAssociationId",project.getPropertyValue("doctorAssociationId").toString()); testStepContext = new com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext(tStep); def runner = tStep.run(testRunner, testStepContext) log.info ("runner status ....... : " + runner.hasResponse()) def f = new File("D:\\SOAPUiTool\\testingsheetresponse.txt") saveToFile(f, testStepContext.response) } file.close(); def saveToFile(file, content) { if (!file.parentFile.exists()) { file.parentFile.mkdirs() log.info "Directory did not exist, created" } FileWriter fw = new FileWriter(file,true); //the true will append the new data fw.write("\n");//appends the string to the file fw.write(content); fw.write("\n"); fw.close(); assert file.exists(), "${file.name} not created" } Thanks DEV SolvedRe: get the dynamic property value in json post request just want to send json post request through these properties value.. so please guide me how to send these properties value ( which come from excel sheet frequently one by one) in json post request . please request you help me. regards, Dev get the dynamic property value in json post request Hi I m run the Below groovy script where currently i am facing one issue i have created test case level property and created excel sheet header name over there dynamically e.g. in excel sheet caseId onsetDate visitDate associationId 39 2017-08-23 2017-08-23 1 40 2017-08-24 2017-08-24 1 GROOVY Script ( import java.io.File; import java.io.FileInputStream; import java.util.Iterator; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.xssf.usermodel.XSSFCell; import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; FileInputStream file = new FileInputStream(new File('D:\\SOAPUiTool\\calInfo1.xlsx')); XSSFWorkbook workbook1 = new XSSFWorkbook(file) XSSFSheet sheet1 = workbook1.getSheetAt(0) Iterator ite = sheet1.rowIterator(); def myTestCase = context.testCase propTestStep = myTestCase.getTestStepByName("PropertiesInfo") // get the Property TestStep object headers=[] //def groovyutils = new com.eviware.soapui.support.groovyutils(context) while (ite.hasNext()) { Row row = ite.next(); Iterator<Cell> cite = row.cellIterator(); while(cite.hasNext()){ // headers << c.toString() propTestStep.setPropertyValue("caseId", cite.next().toString()) log.info(" caseId:: " + propTestStep.getPropertyValue("caseId").toString()) propTestStep.setPropertyValue("onsetDate",cite.next().toString()) log.info("onsetDate :: " + propTestStep.getPropertyValue("onsetDate").toString()) propTestStep.setPropertyValue("visitDate",cite.next().toString()) log.info("visitDate :: " + propTestStep.getPropertyValue("visitDate").toString()) propTestStep.setPropertyValue("AssociationId", cite.next().toString()) log.info("doctorAssociationId :: " + propTestStep.getPropertyValue("doctorAssociationId").toString()) // def tst = testRunner.runTestStepByName("AddClInfo") // log.info(" :: " +cite.next().toString()) } } file.close(); /* log.info headers for ( i in headers ) { //testRunner.testCase.testSteps["AddPatientEntry"].addProperty(i); }*/ ) same header name i have created in property and below groovy script i am run then one by one i m getting above excel sheet data over now i want to these value send into my json request which i am not able to send so please guide me e.g. json post request { "caseId":39, "onsetDate":2017-08-23 "visitDate":2017-08-23 "doctorAssociationId":1 } Please request you suggest me how to send these property value in json post request and how to get response back into my excel sheet. Thanks Dev SolvedRe: rest api security testing bases on OWASP standards gentle reminder plz guide me how to to rest api security testing on owasp standards plz provide some examples it will really very gretful if someone help me in this topic. thanks dev