• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
    • 軟件測試技術
    • 軟件測試視頻
    • 開源軟件測試技術
    • 軟件測試沙龍
    • 軟件測試資料下載
    • 軟件測試雜志
    • 軟件測試人才招聘

    字號: | 推薦給好友 上一篇 | 下一篇

    用 HtmlUnit 和 WebSphere Studio 測試 Web 應用程序

    發布: 2008-2-03 16:25 | 作者: Christopher Wang,Nin | 來源: IBM | 查看: 96次 | 進入軟件測試論壇討論

    領測軟件測試網 軟件測試技術網P` r2\Lv

    輸入范例應用程序測試代碼
    }4Qa \J,g aZ  下載文章最后的 Download HtmlUnit_JavaSrc.zip 并將范例應用程序導入到您的 Java 項目。

    )I2Rn+`Q2|3_

      運行測試案例軟件測試技術網.}M*pg9zx
      高亮顯示您需要進行測試的測試案例或測試序列,單擊 Run =>Run as =>JUnit 。 軟件測試技術網Zu e?l;JH

    圖 3. 運行 JUnit 軟件測試技術網'yU#^p+I9Wf
    運行 JUnit

    r%H7?W#?D"pyw

      檢查測試結果
    +N9qI/E t(eL0E8q7J  選擇 WebSphere Studio 中的 JUnit 視圖,您便可以查看運行結果了。

    (i8xON*U8k \;u

    圖 4.JUnit HtmlUnit 測試結果
    ESPr X,b/@EJUnit HtmlUnit 測試結果軟件測試技術網Fw"AU X#Af

      通過 Ant 腳本運行測試
    _+f2NOF]DV

    *l#p&J yPqX,M

    ktB0B,h

    <target name="htmlunit" depends="compile"> <junit printsummary="yes" haltonfailure="yes"> <classpath refid="junit.classpath"/> <formatter type="plain"/> <test name="sample.testcase.IBMEmployeeDirectoryPageTest" haltonfailure="no" outfile="test-result" todir="${build.dir}"> </test> </junit> </target>
    軟件測試技術網 _vw8G3w J

      如果您尚未下載 HtmlUnit_JavaSrc.zip,請轉至本文的底部單擊 Download HtmlUnit_JavaSrc.zip 下載該文件。并修改 build.xml 文件,指定 build.dir 、 junit.jar 和 htmlunit.libdir 參數。軟件測試技術網!v/m v$p"QP

      · 使用 Ant 配置 WebSphere Studio。選擇 Window =>Preferences 并單擊 Properties 。將 build.compiler 設置成 org.eclipse.jdt.core.JDTCompilerAdapter 。

    #i)|q0o9Aq
  • 圖 5. 為 Ant 進行 WebSphere Studio 配置 為 Ant 進行 WebSphere Studio 配置軟件測試技術網)[#[ Z1c^s

      · 運行 Ant 腳本,運行結果將顯示在 WebSphere Studio 控制臺中。右鍵單擊 build.xml 并選擇 Run Ant 。運行結果將顯示在控制臺和 Ant 輸出文件中。

    Z 老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>