?????????loadrunner?????????
???????????? ???????[ 2014/2/19 15:59:22 ] ????????loadrunner ??????? ???????
??????????????????????????????д???????ν?
????InputStream is ??????????????????
/*
* LoadRunner Java script. (Build: _build_number_)
*
* Script Description:
*
*/
import lrapi.lr;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import com.google.common.io.ByteStreams;
import com.jd.jfs.JingdongFileSystem;
public class Actions
{
File file = new File("C:/8K.file");
InputStream is =null; // ???????byte????<pre code_snippet_id="145362" snippet_file_name="blog_20140107_2_8044261" name="code" class="java"> byte[] fileBytes = new byte[(int) file.length()];
// ????????????????????????
JingdongFileSystem jfs =new JingdongFileSystem();
public int init() throws Throwable {
is = new FileInputStream(file);
ByteStreams.readFully(is?? fileBytes);
is.close();
//jfs = new JingdongFileSystem();
return 0;
} //end of init
public int action() throws Throwable {
try {
lr.start_transaction("jfs-w");
String key = jfs.writeBytes(fileBytes);
//???
System.out.println(key);
} catch (Exception e) {
e.printStackTrace();
}
lr.end_transaction("jfs-w"?? lr.AUTO);
return 0;
}//end of action
public int end() throws Throwable {
return 0;
}//end of end
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11