Hello, getting an error while reading a file java.io.FileNotFoundException: C:\SoapUI\CelsiusToFahrenheit.csv (The system cannot find the path specified) error at line: 13 please help. below is the code import groovy.util.* def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) //Define Path def projectDir = groovyUtils.projectPath File file = new File(projectDir) def firstLevelDir = file.getParent() def filePath = firstLevelDir + "\\SoapUI\\CelsiusToFahrenheit.csv" //log.info filePath context.fileReader = new BufferedReader(new FileReader(filePath)) rows = context.fileReader.readLines() int n = rows.size() log.info n
Thanks man, you made my day, awesome tutorial :)
Thanks for detailed explanation. Can you share the details of writing the data from response to the text file.
Thank you sharing the knowledge much Appreciated!!
Is it possible to use a groovy script for load test...if yes how to validate the performance stats ?
Excellent, very helpful.
Glad to hear, you found it useful 👍
thank you! nicely explained.
Glad to hear
Nice explanation.
Very helpful , now I need to figure out , how to read xml.
can we save the csv file anywhere or in a specified folder(or inside the folder where the project is saved)
We can save anywhere but would be better to save along with project.
how to achieve with excel file instead of CSV file?
could you please help
Hello, we can achieve this using excel as well. We have to include libraries to read Excel. But rest of the concept remains same.
I got error when run groovy script
Groovy long missing property error can u explain me
@@tanvik753 May you please post here your error message. That would give more details to get exact issue.
Java.lang.NullPointerException:connot invoke
Hii can you explain me pls
Please save your project and try again. Hope this helps.
Can you post the code?
Sure, will add to video description.
@@LearnTestAutomation Thanks for the demo. Did you ever post the code? I can't find it
@Wilf Reedijk I missed this to add, provided link in the description of Github repo.
Hello,
getting an error while reading a file
java.io.FileNotFoundException: C:\SoapUI\CelsiusToFahrenheit.csv (The system cannot find the path specified) error at line: 13 please help. below is the code
import groovy.util.*
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
//Define Path
def projectDir = groovyUtils.projectPath
File file = new File(projectDir)
def firstLevelDir = file.getParent()
def filePath = firstLevelDir + "\\SoapUI\\CelsiusToFahrenheit.csv"
//log.info filePath
context.fileReader = new BufferedReader(new FileReader(filePath))
rows = context.fileReader.readLines()
int n = rows.size()
log.info n
Hello, is file exist on the path provided?
@@LearnTestAutomation yes corrected the path thanks