ASP.Net Ajax vs. Unit Tests
By definition, unit tests should be fast. Integration tests should be as fast as possible as well. Almost by definition, Javascript is not fast. In the battle between ASP.Net Ajax and my Unit/Integration tests, so far the only loser it me. This is the point when I am going to stop dedicating any more time to making this work.
Comments
Have you looked at the test harness's that ship with the toolkit?
Something maybe that could help?
You mean this:
http://tinyurl.com/ysp9o5
Those are not tests, those are demos.
http://www.codeplex.com/AtlasControlToolkit/Wiki/View.aspx?title=UsingCodeplex&version=8
Scroll down to "Creating a Component Unit Test"
Starts the sentence with "The “ASP.Net AJAX” Control Toolkit Automated Test Harness allows you to easily write tests for user interface components written in JavaScript..."
I did some more searching, try ScottGu's blog post here:
http://weblogs.asp.net/scottgu/archive/2006/06/09/Free-Atlas-Test-Automation-Framework-Published-.aspx
Thanks for the info, but this is about testing the component, not testing the UI that uses this component.
I am talking about testing my UI, and running into lot of problems with the ASP.Net Ajax implementation.
Checked the second link, that is interesting, but I am not interested in testing the client side UI stuff.
I have a QA guy for that and bitter experience telling me that it is a time sink
I am interested in testing the interaction of the UI with the application, and its results.
I can't do it from Javascript, and I don't want to try. I am using WatiN, which acts on the UI, except much faster than a human, so it exposes all sorts of pitfalls for the library.
Disclaimer: I don't use ASP.NET AJAX.
However, it sounds like you want to subscribe to the DOMContentLoaded event, which is undocumented but supported in IE6+ and Fx and Safari. jQuery implements it as its $(document).ready() functionality.
Reference:
http://dean.edwards.name/weblog/2006/06/again/
http://www.visualjquery.com/ -> events -> ready
Comment preview