JaVa
   

Summary

HttpUnit provides a flexible Java API for interacting with Web servers while maintaining client state and a powerful set of utilities that make writing assertions against HTTP responses easy. This chapter has covered the mechanics of writing basic HttpUnit code; explored the specifics of interacting with forms, tables, cookies, and opened the door to sophisticated automated testing with the development of a link-checking spider.

Functional testing with HttpUnit is more complex than unit testing with JUnit. Web site tests must be carefully structured, and you must strike a constant balance between thoroughness and time spent in test development. Writing a generic test framework like the link checker in this chapter can increase coverage without increasing time spent. The best argument in favor of the framework is that HttpUnit's flexibility lends itself to this type of development.


JaVa
   
Comments