<ruby id="rxdll"></ruby><strike id="rxdll"></strike>

    <rp id="rxdll"></rp>
      <del id="rxdll"><meter id="rxdll"></meter></del>
      <pre id="rxdll"><font id="rxdll"></font></pre>
        <pre id="rxdll"></pre>
      <p id="rxdll"><thead id="rxdll"></thead></p><dl id="rxdll"><progress id="rxdll"><form id="rxdll"></form></progress></dl>

      <ol id="rxdll"><thead id="rxdll"><track id="rxdll"></track></thead></ol>
      <i id="rxdll"><dfn id="rxdll"></dfn></i>
      <font id="rxdll"><meter id="rxdll"></meter></font>

        <mark id="rxdll"><dfn id="rxdll"></dfn></mark>
        • 軟件測試技術
        • 軟件測試博客
        • 軟件測試視頻
        • 開源軟件測試技術
        • 軟件測試論壇
        • 軟件測試沙龍
        • 軟件測試資料下載
        • 軟件測試雜志
        • 軟件測試人才招聘
          暫時沒有公告

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

        Eclipse的TPTP工具使用方法

        發布: 2007-11-19 20:00 | 作者: Eric Zhang | 來源: Eric Zhang ‘Blog | 查看: 2713次 | 進入軟件測試論壇討論

        領測軟件測試網
        Eclipse的TPTP工具使用方法:
        1.        TPTP是什么:
        TPTP是Eclipse的一個頂級工程(Top-Level Project),TPTP項目封裝了一大堆公共的操作接口與數據,甚至一個遠程執行環境,以供其它的TPTP工具使用。另外,它還提供了擴展點以方便進行定制編碼。實際上就是一個依托于Eclipse的JAVA的Profile與分析工具,還提供了整合SWT GUI的Record與Replay功能(另外的文章中進行介紹)。

        2.下載要安裝的各種plugin。

        以TPTP4.1為例
           a.解決安裝信賴條件:
             Eclipse SDK 3.1.0
             JDK 1.4
             EMF SDK 2.1.0
             XSD 2.1.0

            b.Agent Controller安裝
              下載
               將下載完的安裝包解壓到想安裝的目錄。
               將<unzip directory>\bin加到系統PATH環境變量中,不能有雙引號。
              執行<unzip directory>\bin下的SetConfig.bat生成基本配置環境。
              執行RAServer.exe,運行守護進程。

          c.安裝TPTP,此處選擇手動安裝。
             下載TPTP4.1
              解壓到eclipse\plugins下。

        完成安裝。


        測試。
        新建一個工程(Java Project)
        將下列類導入到工程中:

        package com.yadong.testtptp;

        import java.io.BufferedReader;
        import java.io.IOException;
        import java.io.InputStreamReader;


        public class CarModel {

            /* Required car parts: 1 Engine, 4 wheels, and 2 doors */
            public Engine engine = new Engine();
            public Wheel[] wheel = new Wheel[4];          
            public Door left = new Door(), right = new Door();



            public CarModel()
            {
              for(int i = 0; i  < 4; i++)
                wheel[i] = new Wheel();
            }
                
                
                
            /* Launcher */
            public static void main(String[] args) throws IOException
            {
                final String LINE_SEPARATOR =
                System.getProperty("line.separator");
                final int BORDER_CHAR_LENGTH = 40;
                final int UNREF_OBJ_CREATED = 10;
                StringBuffer menu = new StringBuffer();
                CarModel car = new CarModel();
                        
                /* Create the menu */
                for (int i = 0;i < BORDER_CHAR_LENGTH; i++)
                  menu.append('-');
                menu.append (LINE_SEPARATOR).append("   (1) Simulate car usage");
                menu.append (LINE_SEPARATOR).append("   (2) Create unreferenced objects");
                menu.append (LINE_SEPARATOR).append("   (q) Quit");
                menu.append (LINE_SEPARATOR);
                for (int i = 0;i < BORDER_CHAR_LENGTH; i++)
                  menu.append('-');
                        
                /* Display the menu */
                System.out.println ("CarModel started" + LINE_SEPARATOR + "Menu:");
                System.out.println (menu.toString());
                System.out.println ("Choose an option:");
                BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                String input = in.readLine().trim();

                        
                /* Accept input for the desired option */
                while (!input.equalsIgnoreCase("q"))
                {                        
                  /* Check for invalid entry */
                  if (input == null || input.length() != 1 || !Character.isDigit(input.charAt(0)))
                  {
                    System.err.println ("Wrong option");
                    input = in.readLine().trim();
                    continue;
                  }
                                                        
                  switch(Integer.valueOf(input).intValue())
                  {
                    case 1:
                      simulateCarUsage(car);
                      break;
                    case 2:
                      for (int i = 0; i < UNREF_OBJ_CREATED; i++)
                        new CarModel();
                      System.out.println (UNREF_OBJ_CREATED + " unreferenced objects of CarModel has been created");
                      break;
                    default:
                      System.err.println ("Wrong option");                                
                  }
                input = in.readLine().trim();
              }
                                        
            }

                
            /* Simulates car usage */
            public static void simulateCarUsage(CarModel car)
            {
              car.left.window.rollup();
              car.engine.start();
              car.engine.rev();
              car.wheel[0].align();
              car.engine.stop();
            }
        }


        /* Inner classes used to model car parts */
        class Engine
        {        
            public void start()
              { System.out.println("Start the car.");}
            public void rev()  
              {System.out.println("Rev the engine.");}
            public void stop()  
              {System.out.println("Car stopped.");}
        }

        class Wheel
        {        
            public void align()
              {System.out.println("Tires aligned.");}
        }

        class Window
        {        
            public void rollup()
              {System.out.println("Rollup the window.");}
            public void rolldown()
              {System.out.println("Rolldown the window.");}
        }

        class Door
        {
            public Window window = new Window();
            public void open()
                  {System.out.println("Open()");}
            public void close()
              {System.out.println("Close()");}
        }


        右鍵點擊CarModel.java,這時會在彈出菜單中顯示出Profile As ->Java Application
        運行.
        同時切換視圖到”Profiling and logging”,這樣就可以得到正在運行中程序的Profile
        在這個視圖中如果設置得當的話可以查看到如下結果:

        1.        Coverage
        2.        Execution flow
        3.        Memory
        4.        Object Reference
        5.        UML2 object/class/Thread Interaction


        下載地址:
          Eclipse SDK 3.1.0(Win32):   www.eclipse.com/downloads/index.php
        JDK 1.4(Win32):    java.sun.com
        EMF SDK 2.1.0(Win32): www.eclipse.com/downloads/index.php
        XSD 2.1.0(Win32):http://download.eclipse.org/tools/emf/downloads/drops/2.1.0/R200507070200/xsd-SDK-2.1.0.zip:TPTP(Win32)
        http://download.eclipse.org/tptp/4.1.0/TPTP-4.1.0-200511150100/tptp.runtime-TPTP-4.1.0-200511150100.zip
        Agent Controller(Win32):http://download.eclipse.org/tptp/4.1.0/TPTP-4.1.0-200511150100/tptpdc.win_ia32-TPTP-4.1.0-200511150100.zip
         

        延伸閱讀

        文章來源于領測軟件測試網 http://www.k11sc111.com/

        TAG: eclipse tptp

        31/3123>

        關于領測軟件測試網 | 領測軟件測試網合作伙伴 | 廣告服務 | 投稿指南 | 聯系我們 | 網站地圖 | 友情鏈接
        版權所有(C) 2003-2010 TestAge(領測軟件測試網)|領測國際科技(北京)有限公司|軟件測試工程師培訓網 All Rights Reserved
        北京市海淀區中關村南大街9號北京理工科技大廈1402室 京ICP備2023014753號-2
        技術支持和業務聯系:info@testage.com.cn 電話:010-51297073

        軟件測試 | 領測國際ISTQBISTQB官網TMMiTMMi認證國際軟件測試工程師認證領測軟件測試網

        国产女主播精品_国产片婬乱18一级毛片视频_国产午夜激无码av毛片不卡_国产精品欧美久久久天天影院
          <ruby id="rxdll"></ruby><strike id="rxdll"></strike>

          <rp id="rxdll"></rp>
            <del id="rxdll"><meter id="rxdll"></meter></del>
            <pre id="rxdll"><font id="rxdll"></font></pre>
              <pre id="rxdll"></pre>
            <p id="rxdll"><thead id="rxdll"></thead></p><dl id="rxdll"><progress id="rxdll"><form id="rxdll"></form></progress></dl>

            <ol id="rxdll"><thead id="rxdll"><track id="rxdll"></track></thead></ol>
            <i id="rxdll"><dfn id="rxdll"></dfn></i>
            <font id="rxdll"><meter id="rxdll"></meter></font>

              <mark id="rxdll"><dfn id="rxdll"></dfn></mark>