Helping ordinary people create extraordinary websites!
GET OUR NEWSLETTER
Your Email:
 

StrutsTestCase Simplifies the Development Process

By Sunil Patil
2005-04-28


Conclusion

Unit testing offers many advantages. In addition to giving you confidence that your code is working as designed, testing is a source of great documentation. Further, unit tests provide an excellent mechanism for feedback as you design the classes and interfaces. Finally, unit tests are helpful for managing change. If your code passes all unit test cases after you've implemented changes, you can feel confident that those changes are safe.

Unfortunately, many developers forgo unit tests because they take too much time to write. But by using STC's mock approach, you can save a lot of time that you would normally spend setting up the development environment for domain objects like databases and containers. STC also helps you test your changes rapidly because you don't have to start and stop the container every time. And once your code is stable and able to pass all test cases, you can move to integration testing just by changing the super class of your test case. Using Cactus in the integration phase also allows you to automate your integration tests.

Tutorial Pages:
» Save Time by Using STC's Mock and Cactus Testing Approaches
» Sample Application
» Using the Mock Object Approach
» Advantages and Disadvantages of Mocking
» Cactus Approach
» Cactus Pros and Cons
» Conclusion
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» All about JAXP, Part 1
» Make Database Queries Without the Database
» Load List Values for Improved Efficiency
» 2 Ways To Implement Session Tracking
» A Simple Way to Read an XML File in Java
» Develop Aspect-Oriented Java Applications with Eclipse and AJDT

Advertise with Us!


Tutorials Scripts Web Hosting Developer Manuals
Resources