It is widely known that testing Asp.Net sites is hard. Most probably your tests are slow, brittle, hard to write. Perhaps you don’t even write them because the effort is not worth it. Perhaps you put a lot of effort into squeezing every tiny piece of code out of the UI and into the middle layer, just to make it testable. Or you run your browser automated tests only once a day because it takes an hour and a half to finish (with an obscure bug).
It does not have to be that hard
You just need a tool that makes it simple and fast. A tool that can help you write simple unit or integration tests without much effort, and run them just about as quick as your other tests.
I've been there too
I’ve been building Web sites on the .Net platform for over 7 years, and I've been on and off Web testing, because both ways were too painful. I started with NUnitAsp and was excited in the beginning, but later I discovered that I'm spending more time on supporting my tests than on writing the production code. I tried the browser-based tools and was frustrated by the brittleness of my tests and the inability to express the results in terms of the underlying object structure. Most of the time I didn't need to test my client-side code, but I needed to, say, verify that a particular Repeater contained three items, and didn't want to pars the HTML output in order to verify that.
It is out of this need that Ivonna has been born.
What's the difference
- No Web server neither a Web browser is involved. You run your tests in-process. No HTTP overhead, no UI popped up.
- You deal with actual server-side objects. You don’t just look at your HTML output and guess what happened on the server; you examine the actual objects, such as System.Web.UI.Page, or even HttpContext.
- You can stub/mock things. Prevent a mail message from being sent, or an external service from being called, yet verify all relevant calls.
- You can even modify configuration values on the fly, or even use a different config file.
Here’s how it works
Unlike other testing tools, Ivonna is not a "client-side" tool. It doesn't just test the HTML output (although such a possibility exists), it creates and executes an Asp.Net request and allows you to examine the intrinsic objects, such as the Page object. This opens many new possibilities, such as
- Examining properties of page controls and other objects, such as the HttpContext object.
- Testing UserControls in isolation.
- Mocking external dependencies in order to isolate the page behavior.
- Injecting setup code and assertions into the page's lifecycle event handlers.
- Setting test-specific configuration values, or using a different configuration file.
- Executing Web Service and Page Method calls and verifying the UpdatePanel functionality.
Wait, what about Asp.Net MVC?
In 3.0, several important MVC-specific features have been added. You now can write expectations against the following guys:
- Controller name
- Action method name
- Action method parameters
- View instance
- Model instance
Now tell me what I can't do with it
You cannot test your client side code. That's not what Ivonna has been created for.
There are some other minor limitations that might be removed when there's demand for it, but they are too minor to be mentioned here.
a trial version , fully functional for 21 days.
Learning still another tool can take a lot of your time?
Not only you're getting offline (in addition to online) help, sample solution, and template project items. For a limited time, I offer free solutions to your Asp.Net testing problems. Just mail me at art@sm-art.biz with your problem, and I'll write a test for you, with comments, and send you within 24 hours. So, if Ivonna is not the tool for you, you won't even waste your time figuring it out.
Ivonna is being developed in partnership with TypeMock and runs on top of the TypeMock Isolator framework.