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

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

  • <strong id="5koa6"></strong>
  • 軟件測試案例——HttpUnit-測試用例

    發表于:2009-03-09來源:作者:點擊數: 標簽:軟件測試HttpUnithttpunit
    (1)環境設置:導入 HttpUnit (2)開始實踐,寫一個 軟件測試 接口,起名為LoginTestInf: 請/* * Created on 2004-12-17 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */ pac
    (1)環境設置:導入HttpUnit
      (2)開始實踐,寫一個軟件測試接口,起名為LoginTestInf:

    請/*
     * Created on 2004-12-17
     *
     * TODO To change the template for this generated file go to
     * Window - Preferences - Java - Code Style - Code Templates
     */
    package org.apollo.test.util;

    /**
     * @author SixSun
     *
     * TODO To change the template for this generated type comment go to
     * Window - Preferences - Java - Code Style - Code Templates
     */

    /**
     *測試用例編號 : 0001
     *測試用例名稱 : HttpUnit 登陸驗證測試用例
     *測試目標 : 驗證用戶登陸是否成功
     *測試過程 :
     *1、輸入登陸地址的頁面地址,驗證該頁面是否可被正常訪問。
     *2、驗證被訪問的頁面是否是登陸頁面。
     *3、輸入非法用戶名、密碼,驗證登陸失敗。
     *4、輸入合法用戶名、密碼,驗證登陸成功。
     */     
    public interface LoginTestInf {
        public void testValidPage() throws Exception;
        public void testIsLoginPage() throws Exception;
        public void testBadLogin() throws Exception;
        public void testGoodLogin() throws Exception;
    }

      (3)實現一個Junit TestCase 同時 implements LoginTestInf 接口:

    /*
     * Created on 2004-12-17
     *
     * TODO To change the template for this generated file go to
     * Window - Preferences - Java - Code Style - Code Templates
     */
    package org.apollo.test.util;

    import java.net.URL;
    import junit.framework.TestCase;
    import junit.framework.TestSuite;
    import junit.textui.TestRunner;
     

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品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>