I'm new to Neoload - my Scenario is
1) Get an API response and write a specific value into a text file append with "|" value. - Done
2) Read the file and extract value based on Line number and Column values in script - Not successful
Please help me how to achieve that.
Code I'm trying
var fileName = "C:\\TestResult\\LoadTest\\XXX.txt";
//Read File and get line count
var reader = new Packages.java.io.LineNumberReader(new Packages.java.io.FileReader(fileName));
while ((reader.readLine()) != null) {
var line = reader.getLineNumber();
}
var lineCount = reader.getLineNumber();
reader.close();
logger.debug("Line number is = "+lineCount);
context.variableManager.setValue("LoopCount",lineCount);
var check = context.variableManager.getValue("logFileRead");
var i;
for(i=0 ; i < lineCount;i++){
logger.debug("Line number loop = "+lineCount);
// Is that possible to extract the file varibale here with columnname_line number ????
}
No answers
Lakshmi Narayanan posted a new question