这个方法可以实现,登录获取的token放入CSV文件,供后续调用,这里没有用登录举例 FileWriter fstream = new FileWriter("E:\\apache-jmeter-5.0\\demo\\CSVDoc\\token.csv",true); BufferedWriter out = new BufferedWriter(fstream); out.write("code"+vars.get("name")+"
创建Lua函数载入CSV文件并保存到表中的函数: function GetLines(fileName) indx = 0 myLines ={} for line in io.line(string.format("%s%s", "c:/lua_scripts/",filename)) do indx = indx + 1 myLines[indx] = line end return indx, myLines --returns number of lines
用Python中的os和numpy库对文件夹及处理数据后得到的文件进行分类保存: import numpy as np import os for m in range(699,0,-35): cur_dir='F:/2019_09_01/' folder_name='partdata_0_' if not os.path.exists(cur_dir+folder_name+str(m)): os.mkdir(os.path.join(cur_dir,folder_name+str(m)))
dlgSave := TSaveDialog.Create(nil); dlgSave.filter := 'CSV文件|*.CSV'; dlgSave.DefaultExt := '*.CSV'; dlgSave.filename := '服务.CSV'; if dlgSave.Execute then begin if FileExists(dlgSave.filename) then try ) = IDYES then DeleteFile(PChar(dlgSave.filename)