软件测试


网站首页 | 软件测试论坛 | 软件测试培训 | 软件测试博客 | 软件测试杂志 | 软件测试沙龙 | 软件测试下载 | 软件测试顾问
业界新闻 | 软件测试人才 | 软件测试技术 | 软件测试工具 | 行业软件测试 | 软件测试管理 | 软件质量专栏 | 软件开发专栏
当前位置:首页>>软件测试工具>>开源工具>>正文
就本人公司 每日构建的 实现
文章出处:51testing论坛 作者:51testing版主cd_sz2000 发布时间:2007-02-07
    当了版主这么长时间,没有发帖子,实在不好意思,现在,我只是针对 本公司 java 项目的每日构建 介绍一下,希望对大家有一些帮助。同时也可以相互探讨:

    我们公司的一个项目是java 开发的,web 应用 基于 tomcat 运行,后台数据库是 oracle。   代码版本控制是 cvs 。 代码服务器在美国。

    作为 一家外包公司,每天我们程序员 在上班的第一天开始 从cvs 下载最新的代码,编译,如果有冲突,会解决冲突,没有的话,开始编码,作为我们公司的 测试人员,基于公司的模式,我们实现以下 构建。

编译
     ant 提供了强大的编译功能,我们在开始写 build.xml 的时候,并没有写 compile 这步,而是直接从cvs 里面下载相应模块的build。xml 后,调用。这样做的目的是为了保证测试 和 开发的 使用同一套 编译脚步编译,保证协调 ,一致性。
     这里,我们使用了 ant 的如下功能:
      <ant antfile="build.xml" dir="./${release.home}/cvs/DPS/PhaseII/AE/" target="all"/>

    编译好的代码,我们会 自己拷贝到对应的 目录。

单元测试
     junit ,对应的测试模块,我们的开发人员已经 提交到cvs ,我们从cvs update 后,编译运行。在运行之前,先在数据库里 初始化 相应的测试数据,在ant 中,我们使用下面的方法 插入数据到 数据库:
    <target name="dbinit_insert">
      <sql
               driver="oracle.jdbc.driver.OracleDriver"
               url="jdbc:oracle:thin:@192.168.100.1:1521:china"
               userid="uni_app2"
               password="ladodgers"
               onfiltered="continue"
               >
               <transaction  src="./sql/InsertTestOrderNoteData.sql"/>   <!-- For Test Case TestUserLiveValidation -->
               <transaction  src="./sql/TestUserLiveValidationBegin.sql"/>   <!-- For Test Case TestUserLiveValidation -->
               <transaction  src="./sql/InsertTestCreateInventoryData.sql"/> <!-- For Test Case TestCreateInventory -->
               <transaction  src="./sql/InsertTestPerformanceVenueData.sql"/> <!-- For Test Case TestPerformanceVenue -->
               <transaction  src="./sql/InsertTestPerformanceManifestData.sql"/> <!-- For Test Case TestPerformanceManifest -->
               <transaction  src="./sql/InsertTestPerformanceData.sql"/> <!-- For Test Case TestPerformance -->
               <transaction  src="./sql/InsertTestPerformancePriceCodeData.sql"/> <!-- For Test Case TestPerformancePriceCode -->
               <classpath>
   <path refid="lib.path"/>
        </classpath>
          </sql>
     </target>

    然后开始 运行单元测试。

    在单元测试结束后,把插入的册书数据 清空,目的是 下次 运行 的时候,可以再次初始化 数据库。
   
    <target name="dbinit_delete">
         <sql
               driver="oracle.jdbc.driver.OracleDriver"
               url="jdbc:oracle:thin:@192.168.100.1:1521:china"
               userid="uni_app2"
               password="ladodgers"
               onfiltered="continue"
               >
               <transaction  src="./sql/deleteTestOrderNoteData.sql"/>   <!-- For Test Case TestUserLiveValidation -->
               <transaction  src="./sql/TestUserLiveValidationEnd.sql"/> <!-- For Test Case TestUserLiveValidation -->
               <transaction  src="./sql/deleteTestCreateInventoryData.sql"/> <!-- For Test Case TestCreateInventory -->
               <transaction  src="./sql/deleteTestPerformanceVenueData.sql"/> <!-- For Test Case TestPerformanceVenue -->
               <transaction  src="./sql/deleteTestPerformanceManifestData.sql"/> <!-- For Test Case TestPerformanceManifest -->
               <transaction  src="./sql/deleteTestPerformanceData.sql"/> <!-- For Test Case TestPerformance -->
               <transaction  src="./sql/deleteTestPerformancePriceCodeData.sql"/> <!-- For Test Case TestPerformancePriceCode -->
               <classpath>
   <path refid="lib.path"/>
        </classpath>
          </sql>
     </target>

     


    在我们的 build.xml 中,以下列顺序执行 target:

   1。 cvs update code
   2.   call build.xml compile source code
   3.   call build.xml compile unit test source code
   4.   insert data to database .
   5.   run unit test
   6.   generate unit test report
   7.   run clover check unit test cover rate
   8.   generate unit test cover rate  report
   9.   delete test data from data base
   10.  Email all report to PM and Leader . deploy these report base on web service .

站内搜索
相关文章
◎Testlink中文问题修改
◎基于windows的TestLink1.6.2安装
◎TestLink的安装和及与BugFree的整合
◎Apache JMeter简介
◎开源测试工具的完整解决方案
◎如何解决使用JMeter时遇到的问题
◎Linux下的CppUnit 的HelloWorld手记
◎检测3D游戏速度的软件FRAPS
◎win2000下安装bugzilla心得(四)
◎win2000下安装bugzilla心得(三)
◎Win2000下安装bugzilla心得(二)
◎win2000下安装配置bugzilla心得(一)
◎TSqlUnit
◎用Cobertura测量测试覆盖率
◎常用的Java测试工具列表
◎整理的一些开源测试工具
◎Java开源测试工具汇总
◎开放源代码的软件测试工具
◎Optimizeit Thread Debugger概览
◎开源软件测试模型
◎XP 单元测试工具Junit 源代码学习
◎CppUnit测试框架入门(2)
◎CppUnit测试框架入门(1)
◎怎样使用Junit Framework进行单元测试的编写
◎Ant全攻略
◎JUnit 4 抢先看
◎Delphi单元测试工具Dunit介绍
◎StressMark压力测试工具
◎wsCaller通用客户端和测试工具
◎T-Plan测试过程管理工具
◎开源软件Mantis实施缺陷跟踪
◎使用JMeter进行性能测试
◎用Cactus来测试J2ee应用
◎QESatJava白盒测试工具
◎开源测试工具——功能测试工具
热门文章
◎开放源代码的软件测试工具
◎使用JMeter进行性能测试
◎整理的一些开源测试工具
◎CppUnit测试框架入门(1)
◎Java开源测试工具汇总
◎常用的Java测试工具列表
◎开源测试工具——功能测试工具
◎CppUnit测试框架入门(2)
◎Ant全攻略
◎Delphi单元测试工具Dunit介绍
◎StressMark压力测试工具
◎开源软件Mantis实施缺陷跟踪
◎XP 单元测试工具Junit 源代码学习
◎开源软件测试模型
◎T-Plan测试过程管理工具
◎win2000下安装配置bugzilla心得(一)
◎JUnit 4 抢先看
◎win2000下安装bugzilla心得(四)
◎Win2000下安装bugzilla心得(二)
◎开源测试工具的完整解决方案
◎用Cobertura测量测试覆盖率
◎QESatJava白盒测试工具
◎怎样使用Junit Framework进行单元测试的编写
◎win2000下安装bugzilla心得(三)
◎Optimizeit Thread Debugger概览
◎检测3D游戏速度的软件FRAPS
◎Linux下的CppUnit 的HelloWorld手记
◎Apache JMeter简介
◎用Cactus来测试J2ee应用
◎wsCaller通用客户端和测试工具
◎TestLink的安装和及与BugFree的整合
◎如何解决使用JMeter时遇到的问题
◎基于windows的TestLink1.6.2安装
◎TSqlUnit
◎Testlink中文问题修改

Google提供的广告