Blog

How to properly compare recordsets (zagorski software tester)

On January 18, 2015, in Syndicated, by Association for Software Testing
0
credit: forums.2k.com

I am currently testing financial functions that return recordset. Here I would like to note the logical error that I made while I was writing rspec ruby test script. Because of the error, I had false positives. Test reported no errors, but function did not work properly!

My test strategy was rather simple. I have expected recordset and actual recordset returned by financial function.  They had same number of records. Then I wrote something like this:

Problem with this check is that reports false positive (no errors), for case when actual has zero records.

So, you should compare recordsets in this way:

 

Comments are closed.


Looking for something?

Use the form below to search the site:


Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!