JMeter tutorial 21 - BeanShell Script Part - 2 | Write data to CSV file | BeanShell PostProcessor

Quality Assurance Lab
Quality Assurance Lab
31.1 هزار بار بازدید - 5 سال پیش - This is the twenty-first video
This is the twenty-first video of JMeter Tutorial series which covers How to write data to CSV file using BeanShell script
Learning:
BeanShell Script to write data to CSV file with if-else condition:

import java.io.*;
File f=new File("D:\\jmeterProject\\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();

BeanShell Introduction - JMeter tutorial 20-BeanShell Script P...
==================================================================
Git and GitHub Tutorial Playlist:
Git and GitHub  Tutorial

Automation Anywhere Tutorial Playlist:
Automation Anywhere A11 Tutorial

Subscribe for more tutorials - @qualityassurancelab7764
5 سال پیش در تاریخ 1398/05/08 منتشر شده است.
31,106 بـار بازدید شده
... بیشتر