Đang chuẩn bị liên kết để tải về tài liệu:
Java Development with Ant phần 6

Không đóng trình duyệt đến khi xuất hiện nút TẢI XUỐNG

và hành vi này phụ thuộc vào giá trị của các tập tin mở rộng của URL từ xa. Điều này đôi khi có vấn đề khi cố gắng để kiểm tra cài đặt trang JSP. Thậm chí còn có quirks khác của lớp java.net.HttpURLConnection mà có thể bạn sẽ không gặp phải khi sử dụng nhiệm vụ này. Những vấn đề này đã ngừng các đội Ant phát hành một khuôn khổ | going to write a few simple WebTest steps. The pages we will walk through are shown in figures 12.3 through 12.5. Figure 12.3 Login page of our example web application Figure 12.4 The search page of our web application. Note the powerful Google-like expression that is used for searching Ant s documentation. Figure 12.5 The results page of our web application As mentioned in section 12.6.6 writing HttpUnit tests is a low-level exercise and likely involves rework and recompilation when site navigation changes. WebTest provides a higher-level way to describe functional web tests. Listing 12.6 shows our build file to test these three pages. Listing 12.6 WebTest example build file DOCTYPE project ENTITY properties SYSTEM file . properties.xml project name canoo default main properties taskdef name testSpec classname com.canoo.webtest.ant.TestSpecificationTask Testing web applications with HttpUnit 307 classpath fileset dir webtest.dist.dir includes .jar classpath taskdef A Defines the WebTest task property name output.dir location build canoo property name xsl.file location xdocs stylesheets canoo.xsl property name app.context value antbook property name app.port value 8080 property name app.host value localhost property name app.username value erik property name app.password value hatcher property name query value http AND wait -title API property name expected value WaitFor Task target name init mkdir dir output.dir target Defines default query and expected result target name clean delete dir output.dir target target name main testSpec name test our site ----- Begins testing steps config host app.host port app.port protocol http basepath app.context summary true verbose false saveresponse true resultpath output.dir haltonerror true haltonfailure true steps invoke stepid go to login page url login.jsp setinputfield stepid set user name name username value app.username setinputfield stepid set password name password value app.password clickbutton stepid login name .

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.