import com.csvreader.CsvWriter; String NewDataPath=bsh.args[0]; NewDataPath=NewDataPath.replaceAll("", ""); CsvWriter cw = new CsvWriter(NewDataPath+"\\SaveProspectID_Individual.csv"); cw.writeRecord(new String[]{"ProspectIndividualID1","ProspectIndividualID2","ProspectIndividualID3"}); cw.writeRecord(new String[]{bsh.args[1],bsh.args[2],bsh.args[3]}); cw.flush(); cw.close();
需要到网上下载javacsv.jar,然后将其放入X:\apache-jmeter-2.7\lib目录,才可以成功执行这句:
import com.csvreader.CsvWriter;