Reputation: 21
I have a script that makes calls to other scripts that test databases. when the script runs it displays the query results in console. How could I possibly create a manual VP to display the results of callScript in the log?
Upvotes: 2
Views: 362
Reputation: 4695
The callScript()
method can return an object
as result, but I think you wish to test the result of the query.
Use the method VPManual("YourVPName", baselineData, actualData).performTest()
where baselineData is the correct result and actualData is the resultset of the query performed.
The tricky part is that RFT chan check only for "base" types like numbers and strings. So you must transform the resultset to a string form or test each resultset value separately.
Another approach is to write your own equality test and use it like in this article http://rationaltester.wordpress.com/2010/07/26/rational-functional-tester-file-compare/
and go with vpManual("yourVPName", true, compareResultSets(baseResultset, actualResultset));
(for a hint on how to do it check Comparing resultsets in jdbc)
You can read a tutorial here http://www.ibmpressbooks.com/articles/article.asp?p=1409808&seqNum=17
Upvotes: 1