This project has moved and is read-only. For the latest updates, please go here.

Comparing against calculations?

Oct 7, 2009 at 8:51 PM

I am in love with this tool. Thank you, first and foremost.

My question is:

I am executing a sql command as one of my test asserts. I want to compare the row count (SELECT COUNT(*) FROM mytable) against >0.

This isn't working, even when the returned value of my sql statement is several rows. 

It says "The actual result (19488) did not match the expected result (>0)."

I noticed that the xml is using "&gt0"

So...can you throw me a bone? =)

Oct 8, 2009 at 2:38 AM

Glad you like it.

To do this, you need to set the assert to evaluate as an expression, and use "(int)result > 0" as the value of the assert. See this page for more details -

This feature is only implemented in the source, so you'll need to download the latest and build it to take advantage of it.

Oct 8, 2009 at 4:40 PM

I am running BI/SQL server 2005. Does the latest build work with it?


Oct 9, 2009 at 8:16 PM

I haven't done extensive testing on 2005 for the more recent changes (most of my work is against 2008 now). That being said, I don't know of anything that doesn't work against 2005.