|
Helping ordinary people create extraordinary websites! |
StrutsTestCase Simplifies the Development ProcessBy Sunil Patil2005-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 |
|