Toad World® Forums

Check number of records in a table


I’m trying to build a test that verifies that the number of records inserted to a table (by means of a collection) matches the number of elements in the collection.

I figured this would be pretty straightforward, having an outcome which checks the number of records in the table.

I select my table, choose “#=” as the operator and enter e.g. 10000 as the expected result.

When I run the test, it fails with the following message:

*Count of from program dataset = 10000.
Expected count = .
*In other words, it looks like the expected value is never populated. Is this a bug or am I doing something wrong?


By the way, If I click the “properties” button, I get a program error - I have sent a bug report for this.



Sigh…this is a bug that is now fixed in the 1.5.2 release, which we will be making available as a beta within a couple of weeks.



Ok, that sounds good.

I discovered that I could workaround this by defining an “Query” outcome and compare “select count(*) from xxxx” = “select 10000 from dual”.

This test seems to pass and fail as expected depending on how many records are passed to the procedure which inserts records into the table.


Ah, the joy of workarounds! Glad you found it, and I should have pointed
it out.
Many thanks for your patience as we roll out and solidify the