Forum Discussion
nmrao
Champion Level 3
plaidshirt,
You can download the groovy-csv jar file (available in github) along with dependencies, then copy thenm under SOAPUI_HOME/bin/ext and restart soapUI.
Then try the given samples. You might have already observiced how simple to access the data from the sample.
You can download the groovy-csv jar file (available in github) along with dependencies, then copy thenm under SOAPUI_HOME/bin/ext and restart soapUI.
Then try the given samples. You might have already observiced how simple to access the data from the sample.
plaidshirt
6 years agoContributor
Sure, I try this, but got error message when executed: http://prntscr.com/m9xh9m
- nmrao6 years agoChampion Level 3What files did you copy under ext directory? And the script please
- plaidshirt6 years agoContributor
I copied these jars: https://mvnrepository.com/artifact/com.opencsv/opencsv/4.4 , https://mvnrepository.com/artifact/com.xlson.groovycsv/groovycsv/1.3 .
Groovy script:
@Grab('com.xlson.groovycsv:groovycsv:1.3') import static com.xlson.groovycsv.CsvParser.parseCsv def csv = '''ID,Product 3,Shoe 1,Table''' def data = parseCsv("C:\\_privat\\myfile.csv") for(line in data) { println "ID=$line.ID, Product=$line.Product" }
- nmrao6 years agoChampion Level 3
Very strange.
So, did a test with below jar files under SOAPUI_HOME/bin/ext directory
1. groovycsv 1.0 jar file
2. opencsv 3.0 jar file
you should be able to get both jars online
Here is script
First data refers to string data and second one from file reading (column names must match both cases)
Hope this helps!
Related Content
Recent Discussions
- 6 days agoruchisingh