- 將tika-app.jar添加到JMeter Classpath
- 從新啓動JMeter以選擇.jar
- 將JSR223 PreProcessor做爲要參數化的請求的子項添加
-
將如下代碼放入「腳本」區域:html
def workbook = new org.apache.poi.xssf.usermodel.XSSFWorkbook(new File("test.xlsx")) def sheet = workbook.getSheetAt(0) 0.upto(sheet.getLastRowNum()) { def row = sheet.getRow(it) def cell = row.getCell(0) sampler.addArgument('parameter' + it, cell.getStringCellValue()) }
-
- 從HTTP請求中刪除全部記錄的硬編碼參數
-
應該是這樣,當您運行測試時,上面的Groovy腳本將添加如下參數:apache
parameter1=record1 parameter2=record2 etc.