[ Team LiB ] |
7.13 Using HttpUnit to Perform Complex Assertions7.13.1 ProblemYou want to use HttpUnit to perform complex assertions on the returned result. 7.13.2 SolutionImplement an endXXX(com.meterware.httpunit.WebResponse) method for a given testXXX( ) method. 7.13.3 DiscussionCactus provides support for two endXXX(WebResponse) signatures. You, as the test writer, need to choose one of the method signatures. Cactus ensures that the correct method is invoked. // write this method for the standard Cactus response public void endXXX(org.apache.cactus.WebResponse) { // insert simple assertions } // or write this method to use HttpUnit public void endXXX(com.meterware.httpunit.WebResponse) { // insert complex assertions } These methods are executed on the client side JVM after the corresponding server side testXXX( ) method completes without throwing an exception. 7.13.4 See AlsoFor more information on how to use HttpUnit to perform complex assertions, see Chapter 5. |
[ Team LiB ] |