JMeter __FileToString関数を使用して、リクエスト本体のJSONファイルを以下のように読み込みます。JMeter __FileToString関数を使用して、java.io.FileNotFoundExceptionを取得します。
${__FileToString(C:\\Users\\prasad\\Office\\SSP\\16.48\\sprint3\\${__eval(${CSV_Challenges_Dataset})}.txt,,)}
私はテストを実行すると、以下のエラーが表示されます。誰かがWindowsでJMeter fileToString関数を使用する方法の正しい例を教えてくれますか?
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Running the test!
2016/11/17 15:01:22 INFO - jmeter.samplers.SampleEvent: List of sample_variables: []
2016/11/17 15:01:22 INFO - jmeter.gui.util.JMeterMenuBar: setRunning(true,*local*)
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 1 : VerifyDecryptor 1L records
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group VerifyDecryptor 1L records.
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2016/11/17 15:01:22 INFO - jmeter.threads.ThreadGroup: Starting thread group number 1 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2016/11/17 15:01:22 INFO - jmeter.threads.ThreadGroup: Started thread group number 1
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Starting ThreadGroup: 2 : Thread Group
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Starting 1 threads for group Thread Group.
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: Thread will continue on error
2016/11/17 15:01:22 INFO - jmeter.threads.ThreadGroup: Starting thread group number 2 threads 1 ramp-up 1 perThread 1000.0 delayedStart=false
2016/11/17 15:01:22 INFO - jmeter.threads.ThreadGroup: Started thread group number 2
2016/11/17 15:01:22 INFO - jmeter.engine.StandardJMeterEngine: All thread groups have been started
2016/11/17 15:01:22 INFO - jmeter.threads.JMeterThread: Thread started: Thread Group 2-1
2016/11/17 15:01:22 INFO - jmeter.threads.JMeterThread: Thread is done: Thread Group 2-1
2016/11/17 15:01:22 INFO - jmeter.threads.JMeterThread: Thread finished: Thread Group 2-1
2016/11/17 15:01:22 INFO - jmeter.threads.JMeterThread: Thread started: VerifyDecryptor 1L records 1-1
2016/11/17 15:01:22 WARN - jmeter.functions.FileToString: Could not read file: C:\Users\prasad\Office\SSP\16.48\sprint3\${CSV_Challenges_Dataset}.txt File 'C:\Users\prasad\Office\SSP\16.48\sprint3\${CSV_Challenges_Dataset}.txt' does not exist java.io.FileNotFoundException: File 'C:\Users\prasad\Office\SSP\16.48\sprint3\${CSV_Challenges_Dataset}.txt' does not exist
at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1711)
at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1734)
at org.apache.jmeter.functions.FileToString.execute(FileToString.java:102)
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:142)
at org.apache.jmeter.engine.util.CompoundVariable.execute(CompoundVariable.java:117)
at org.apache.jmeter.testelement.property.FunctionProperty.getStringValue(FunctionProperty.java:101)
at org.apache.jmeter.testelement.AbstractTestElement.getPropertyAsString(AbstractTestElement.java:271)
at org.apache.jmeter.config.Argument.getValue(Argument.java:146)
at org.apache.jmeter.protocol.http.util.HTTPArgument.getEncodedValue(HTTPArgument.java:236)
at org.apache.jmeter.protocol.http.util.HTTPArgument.getEncodedValue(HTTPArgument.java:217)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sendPostData(HTTPHC4Impl.java:1294)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.handleMethod(HTTPHC4Impl.java:557)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:375)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:465)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:410)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:241)
at java.lang.Thread.run(Unknown Source)
この値はどこで定義しましたか?同じスクリーンショットを共有できますか? –
ファイル名:C:\ Users \ prasad \ Office \ SSP \ 16.48 \ sprint3 \ CSV_Challenges_Dataset.txtを定義したAdd-> Config要素 - > CSV Data Set Configステップを追加しました –