In continuation to the question asked for Scripted DataSet to read a file which only contains the details for .csv file, Can you please assist with the scripted dataset for .txt file,
Where the first line contains the actual data followed by multiple lines down the line.
And how to fetch each row and row length after trimming spaces at the end of the data in each line or record.
Any kind of suggestion or approach is highly appreciated.
Thanks in advance!!!
Can you please assist me with the scripted dataset for .txt file.
As the same concern was raised by you for .csv file, i thought to ask the same.
Greetings Bibhu –
The last update was what Mike Gavagan posted. By the time he responded I had implemented a work around using java.
I haven’t had an opportunity to try Mikes solution, but I have it booked marked to revisit. At face value, I like it better than what I did as a hack.
I just need the time to revisit and test. I wish I had more to offer, but not at this point.
Ecommerce, Shipping and Tracking Solutions
T +1 203 796 3190
M +1 203 376 9282
37 Executive Dr.
Danbury, CT 06810
Mail Stop: 1B86
The solution I shared with Tom in that post sounds nearly identical to your needs. For another example of how to write a scripted dataset, plus look at "scriptedDataSet.tst" in the examples project.
Also, there is more information here:
The document is a bit old (version 8.0), but most of the information is still accurate.