JMeterのリターンデータがファイルに書き込まれます

ファイル戻しにデータを書き込む方法のJMeter プリント Eメール
著者:WhoisTester   
2015年10月20日20:11

1.まず、我々は正規表現抽出正規表現抽出を使用することができ、あなたは変数に内容を置くことになるでしょう。

例えば、MYNAMEこととなりますことで  [email protected]  における変数名と電子メールに。

 

2.名前とメールの内容は、次のコード/my/file/path/result.csv BeanShellのポストプロセッサにより、ファイルに書き込むことができます

名前= vars.get( "名前");
email = vars.get("email");

log.info(email);  // if you want to log something to jmeter.log file

// Pass true if you want to append to existing file
// If you want to overwrite, then don't pass the second argument
f = new FileOutputStream("/my/file/path/result.csv", true);
p = new PrintStream(f); 
this.interpreter.setOut(p); 
print(name + "," + email);
f.close();

 

名前= vars.get( "V1");
log.info(名);
F =新しいのFileOutputStream( "E:/token.txt"、真の);
P =新規のPrintStream(F)。
this.interpreter.setOut(P)。
名前を印刷する);
f.close();

 

おすすめ

転載: www.cnblogs.com/python-xiakaibi/p/10947326.html