Hi all, Last month, Ryan propsed converting the current Watchdog tests from GTest to Latka:
http://marc.theaimsgroup.com/?l=watchdog-dev&m=102489712116217&w=2 Ryan and I have made a lot of progress with the conversion effort. The current versions of Latka, HttpClient and Watchdog now produce only 4 errors (error report follows: --------------- ............................................................................ ............................................................................ .......................................FF................................... ......................................................F...........F......... ............................................ http://localhost:8080/servlet-tests/GetHeader_01Test (GetHeader_01Test) REQUEST FAILED (10 millis) Returns null if the request does not have a header of that name,specified in the Java Servlet Pages Specification v2.3, Sec 14: EXPECTED TO MATCH GOLDEN FILE: \lib\nightly\jakarta-watchdog-4.0\lib\servlet-golden\javax_servlet_http\Http ServletRequest\GetHeader_01Test.html FAIL*** : Live token = FAILED, did not match golden file token = PASSED http://localhost:8080/servlet-tests/GetHeadersTest (GetHeadersTest) REQUEST FAILED (10 millis) Returns all the values of the specified request header as an Enumeration of String objects.,specified in the Java Servlet Pages Specification v2.3, Sec 14: EXPECTED TO MATCH GOLDEN FILE: \lib\nightly\jakarta-watchdog-4.0\lib\servlet-golden\javax_servlet_http\Http ServletRequest\GetHeadersTest.html FAIL*** : Live token = FAILED<BR>, did not match golden file token = PASSED http://localhost:8080/servlet-tests/hsreqw/HttpServletRequestWrapperGetHeade rsTest (HttpServletRequestWrapperGetHeadersTest) REQUEST FAILED (0 millis) Test for default behavior of this method to return getHeaders(String name) on the wrapped request object, specified in the Java Servlet Pages Specification v2.3, Sec 14: EXPECTED TO MATCH GOLDEN FILE: \lib\nightly\jakarta-watchdog-4.0\lib\servlet-golden\javax_servlet_http\Http ServletRequestWrapper\HttpServletRequestWrapperGetHeadersTest.html FAIL*** : Live token = FAILED, did not match golden file token = PASSED<BR> http://localhost:8080/servlet-tests/hsreqw/HttpServletRequestWrapperGetReque stURLTest (HttpServletRequestWrapperGetRequestURLTest) REQUEST FAILED (0 millis) Test for default behavior of this method to return getRequestURL() on the wrapped request object, specified in the Java Servlet Pages Specification v2.3, Sec 14: EXPECTED TO MATCH GOLDEN FILE: \lib\nightly\jakarta-watchdog-4.0\lib\servlet-golden\javax_servlet_http\Http ServletRequestWrapper\HttpServletRequestWrapperGetRequestURLTest.html FAIL*** : Live token = FAILED, did not match golden file token = PASSED<BR> SUITE FAILED 348 requests. 344 passed. 4 failed. 0 skipped. 0 errors. Thank you very much. --------------- The Latka-based Watchdog tests currently live here: http://cvs.apache.org/viewcvs/jakarta-commons/latka/src/watchdog/ We've identified the source of 3 of the 4 remaining errors: * GetHeader_01Test - HttpClient automatically sends a User-agent header, while GTest does not. Solution: modify Latka (and possibly HttpClient) to optionally suppress the User-agent. * GetHeadersTest - The test tries to send two headers with the same name to the server and confirm that two headers were received. Unfortunately, HTTP also allows two separate headers with the same name to be combined into one comma-delimited header, which HttpClient does automatically. So this test is odd, because it tests for behaviour not guaranteed by HTTP. Solution: alter Watchdog test to check for _either_ two headers _or_ one combined header? * HttpServletRequestWrapperGetHeaders - same as GetHeadersTest * HttpServletRequestWrapperGetRequestURLTest - I haven't figured this one out yet, but it also might be related to header issues. Solution: ? I think we're well beyond the point of a working prototype and ready to consider issues like test organization, distribution features, etc. - Morgan -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
