Author: andrews
Date: 2006-07-16 05:05:39 -0400 (Sun, 16 Jul 2006)
New Revision: 62650
Added:
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FAQ
trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO
Log:
add TODO and FAQ
Added: trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FAQ
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FAQ
2006-07-15 22:23:39 UTC (rev 62649)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FAQ
2006-07-16 09:05:39 UTC (rev 62650)
@@ -0,0 +1,36 @@
+Thanks to Julien Couvreur for the questions.
+
+Q: You mention that the test gets invoked in the web appdomain. But does
+this have any impact on the kind of tests that you can do?
+
+A: I'm not aware of any impact yet.
+
+Q: Does that mean that the test class would need to be serializable if it
+needs to keep any state?
+
+A: This turned out to be a complex problem. If you pass a delegate to
+another appdomain, it's serialized only in one way. So, if during this
+delegate you change instance fields, those changes will be lost. I could
+not work around this problem with passing delegate by ref, because then a
+new instance is created and the original remains intact. So to provide an
+ability to pass user data back and forth, I made WebTest.UserData property.
+If few WebTest's run in different threads, each one has it's own UserData.
+
+Q: Do you really think that there is going to be different types of hooks?
+Currently, you have BaseInvoker and PageInvoker, but maybe the base class
+is superfluous?
+
+A: Currently, there are 3 Invokers: BaseInvoker, HandlerInvoker and
+PageInvoker.
+
+BaseInvoker is a stub, only ensuring somebody called it. It exists for
+tests that need no callback, for example for rendering some aspx page.
+
+HandlerInvoker enables to execute a method without parameters in the web
+appdomain. NET 2.0 anonymous delegates are useful here. There is no need to
+instrument anything for this invoker, or to set the URL of the request, the
+DefaultUrl of the HandlerInvoker is sufficient.
+
+PageInvoker calls a method with Page argument, and is used when the test
+must work on a web page. The page must be instrumented to enable the
+framework to do its job.
Added: trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO
===================================================================
--- trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO
2006-07-15 22:23:39 UTC (rev 62649)
+++ trunk/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TODO
2006-07-16 09:05:39 UTC (rev 62650)
@@ -0,0 +1,17 @@
+CODE
+
+* get rid of PageDelegates, unite it with PageInvoker, or give only a single
+ delegate.
+
+* replace PageHandlerFactory with custom handler in web.config, to get rid
+ of WebTest.CurrentTest.DoInvoke (this) call from every page
+ constructor.
+
+DOCUMENTATION
+
+* add the documentation about instrumenting pages to add the test hooks
+ ("MonoTests.SystemWeb.Framework.WebTest.CurrentTest.Invoke(this);") and
+ alternative ways of doing it.
+
+* add the tutorial kind of documentation at the namespace and class levels
+
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches