Apache JMeter Scripting Challenge 3
ฝัง
- เผยแพร่เมื่อ 28 เม.ย. 2023
- Apache JMeter Scripting Challenge 3 #jmeter #testing #performance #youtubers #youtubervideo #technology #tech #youtubers #computer #softwaretesting #viralvideo #viral #youtubelongvideos #software #engineer #youtube #youtuner #apache #softwarejobs #jobsindia #usa #youtubeshorts
****************************************************************************
Apache JMeter Scripting Challenge 3
***********************************
Scenario:
*********
Scanario is my http request is successfully executed we will write the excel sheet test
case is passed other wise http request is failed we will write the excelsheet test case is
failed this is the scenario.
Solution:
*********
Testplan
ThreadGroup
http request
Beanshell Post Processor
view Results Tree
Beanshell Post Processor
************************
import java.io.*;
File f=new File("D:\\jmeter5.0\\testresults.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();
JMeter Beanshell Post Processor:
********************************
import java.io.*;
File f=new File("E:\\LoadTest\\testresults.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();
*******************************
Create one .CSV file that location you provided the file path.
**************************************************
nice sir
Thanks
Good job
Thank you