2

Resolved

Add Dynamic Values to Asserts

description

Add support for dynamic values in Asserts
 
paulkrug17 wrote Feb 25 at 11:56 AM
One example would be setting a user variable to the current date. If the expected value could be something like "getdate()" or "Now().Date()". I can always put today's date in as a literal (e.g., "2/25/2009 00:00:00", but when I run the whole test suite tomorrow, that will now fail. Another example is a task that determines the age of log files (for purging files over, say, 30 days old). If I have a task that determines that age, that will be variable over time. A third example might be to independently determine the number of rows that should be determined by a SQL query. That case is less valuable because all that's being tested is that SQL gets called with the right query and returns the result. Plus, I can get around this case with test setup in some cases.

comments

johnwelch wrote Mar 2, 2009 at 11:00 PM

How complex would the expressions need to be? Adding support for now, or simple expressions isn't difficult, but allowing access to package variables or properties inside those expressions would be a little more difficult.

wrote Apr 13, 2009 at 1:15 AM

Resolved with changeset 30880.

johnwelch wrote Apr 13, 2009 at 1:17 AM

** Closed by johnwelch 4/12/2009 6:15 PM

johnwelch wrote Apr 13, 2009 at 1:17 AM