[Mono-dev] framework for system.web tests
andrews at mainsoft.com
Sun May 7 05:19:46 EDT 2006
> One thing, though, We shouldn't ever write unit tests that
> use direct string comparisons to validate generated html.
> The only real exception (that I can think of) to this would
> be in verifying the behavior of various output modes (xhtml,
> etc). There are unfortunately examples of the string
> comparison stuff all over the system.web unit tests, just
> waiting to be broken by an update to MS's System.Web that
> adds a space someplace.
> There's code in the System.Web unit tests to verify the
> structure of the generated html, and I believe the other
> mainsoft tests use a similar approach (first converting it to
> xml or something?)
It's not the part of the framework, in every particular case it's up to
the test developer to decide what to do with the response contents. I
don't think we will develop comparison algorithms right now, but if you
have a good example to copy, we can use it.
> I've fixed bug #78256, so things ought to work with mono now.
Thanks a lot. This fixes the bug I found, but it seems that there is
another one. I attach the whole application sources, in the case you
want to reproduce the problem. Main is the executable if you don't want
to use nunit console, Test1 is dll prototyping unittest, NunitWeb is
another dll with the framework.
> Nice hack.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8509 bytes
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060507/302c8616/attachment.bin
More information about the Mono-devel-list