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 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 Mar 2, 2009 at 11:01 PM

wrote Mar 24, 2009 at 11:34 PM

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

wrote Apr 13, 2009 at 1:19 AM

wrote Feb 14, 2013 at 8:09 PM

wrote May 16, 2013 at 10:24 AM

wrote May 16, 2013 at 10:24 AM

wrote Jun 14, 2013 at 7:21 AM