I am new in jmeter , I have created multiple HTTP Request in a single thread group , Now what i am trying is save all the HTTP Request that is http request with response code 200 in csv file as TestCase pass and http request with response code other than 200 as failed. As I want to execute each and every HTTP request one by one and store result in csv file
here is my beanshell PostProcessor
import java.io.*; import org.apache.jmeter.services.FileServer;
File f=new File("E:\\apache-jmeter-5.2.1\\apache-jmeter-5.2.1\\bin\\JmeterProResult\\testResult.csv");
FileWriter fw=new FileWriter(f);
BufferedWriter bw=new BufferedWriter(fw);
var rc = prev.getResponseCode();
if(rc.equals("200")){
bw.write("test is passed");
}
else{
bw.write("test is failed");
}
bw.close();
fw.close();
which is generating output as show only one result but I run two successful http request
here is mine jmeter structure-- I want to execute each and every HTTP request
here my desired output should look like