| || |
Doing a VP on SQL DB Contents
I apologize if this is a repeat, however I wasn't able to find any posts that dealt with this directly.. We are using RFT 7.1 and would like to be able to do a verification point on the contents of the database (for a given table or record). I know we have to write something with Java, the question is, how to best go about it. I have methods in place to connect to the db, and to pass SQL statements into it to return specific results, which I can then store in a String array... However, from there, how would I go about validating these results against expected results? I don't want to have to store a result for every field in a given table and then compare it. The best thing I could think of would be to write the results (ie: the entire record or group of records) to a file, then somehow compare it to a baseline file. Can you do that in Rational (with or without java?) or should I just write to a file and then use an external file compare tool to do the comparisons for me? Just trying to find the cleanest way to accomplish this and would appreciate any suggestions!
Thanks (and have a great holiday everyone!),
Re: Doing a VP on SQL DB Contents
RFT is able to compare arrays, but this would require you to store your expected values in a similar array which at a large scale would be impractical.
My suggestion would be ( as you've mentioned) write both expected and actual values to separate files, convert the values of both files into an array, then validate the 2.
Hope this helps.