In my application, there are lot of files that contain financial data and those are sent to different parties. So, I have to automate verification of content of all these files. Now, each file has a different format and structure….those are not .txt files but have custom extenstions like File1.DATA etc..
For Example, this is a file where each record length is say 80 chars, but any record can be 92 or 84 also, depends. So, i read the fileinput stream and then say in line 2, subString(5,19) is 99294329, i will store in a string and verify with pre-defined string.
Now, my automation framework is in Cucumber BDD, Java, Selenium etc..It needs lot of coding like regex validation, then comparing of each line of file, string etc..
Can there be some better approach to read each file and each line, verify contents for quick scripting.
03,Record#1,,992,4328392,234,,040243,352241483,234,2,045,943824677,,/
04,Record#2,,992,4328392,234,,040243,352241483,234,2,045,943824677,,/
16,Record#3,,992,4328392,234,,040243,352241483,234,2,045,943824677,,/
48,Record#4,,992,4328392,234,,040243,352241483,234,2,045,943824677,,/