2016-04-26 30 views

答えて

3

あなたはサンプラーAPIのgetHTTPFiles方法を使用することができます助けてください。

sampler.getHTTPFiles()は、実行時に新しいファイルを更新できる配列内のファイルパスHTTPFileArgを返します。

更新:

String path = sampler.getHTTPFiles()[0].getPath(); 
byte[] array = Files.readAllBytes(new File(path).toPath()); 
+0

Telのファイル内容を読む方法 –

+0

@BikeshMAnnur、アップデートをチェックする – vins

2

ような何か:

File image = new File(sampler.getHTTPFiles()[0].getPath()); 
//do what you need with the image file 

あなたは拡張画像情報が必要な場合ImageIOを見てみましょう。 Beanshellのその他のヒントとテクニックについては、How to Use BeanShell: JMeter's Favorite Built-in Component

関連する問題