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


Add Dynamic Values to Asserts


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.


johnwelch wrote Mar 3, 2009 at 12:00 AM

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 Mar 3, 2009 at 12:01 AM

wrote Mar 25, 2009 at 12:34 AM

wrote Apr 13, 2009 at 2:15 AM

Resolved with changeset 30880.

johnwelch wrote Apr 13, 2009 at 2:17 AM

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

johnwelch wrote Apr 13, 2009 at 2:17 AM

wrote Apr 13, 2009 at 2:19 AM

wrote Feb 14, 2013 at 9:09 PM

wrote May 16, 2013 at 11:24 AM

wrote May 16, 2013 at 11:24 AM

wrote Jun 14, 2013 at 8:21 AM