<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    Emma使用過程中遇到的 錯誤

    Posted on 2008-03-18 12:03 Robert Su 閱讀(1445) 評論(2)  編輯  收藏
     [report] nothing to do: no runtime coverage data found in any of the data files

    Ant與Emma集成的時候總提示這種錯誤。。。查了下Emma QA說是runtime與metadata


    源代碼如下,哪位遇到過這種問題。。

    <?xml version="1.0"?>
    <project name="Toccata Code Quality" default="init" basedir=".">
        

            
        
    <property name="junitJar" value="lib/UT/junit.jar"/>
        
    <property name="emmaJar"  value="lib/UT/emma.jar"/>
            
        
    <!-- 目錄配置 -->
        
    <property name="base.dir" location="."/>
        
        
    <property name="lib.dir" value="./lib"/>
        
    <path id="classpath.main">
            
    <pathelement location="${build.src}" />
        
    </path>
        
    <property name="build.dest" value="./src/classes"/>
        
    <property name="build.test.bin" value="./src/classes/test"/>

        
        
    <property name="build.javadocs" value="./src/UT/doc"/>
        
    <property name="build.report" value="./report" />
        
    <property name="build.src" value="./src/UT/" />
        
    <property name="build.test" value="/src/UT/test" />
        
    <property name="build.instrument" location="./instrbin" />
        
    <property name="coverage.dir" location="${base.dir}/report/UT/coverage" />

        
    <property name="emma.enabled" value="true" />
        
    <!--指示需要注入字節(jié)碼的Java類的路徑-->
        
    <path id="classpath.main">
            
    <pathelement location="${build.dest}" />
        
    </path>
        
        
    <path id="emma.lib">
                
    <pathelement location="lib/UT/emma.jar" />
                
    <pathelement location="lib/UT/emma_ant.jar" />
        
    </path>
        
        
    <taskdef resource="emma_ant.properties" classpathref="emma.lib" />

        
    <target name="init">
            
    <mkdir dir="${build.instrument}"/>
            
    <mkdir dir="report/UT/htmlreport"/>    
            
    <mkdir dir="${build.dest}"/>
        
    </target>
            
        
    <target name="compile" depends="init">
                
    <javac destdir="${build.dest}" srcdir="${build.src}/ibm" debug="on">            
                    
    <classpath>
                        
    <pathelement location="${junitJar}"/>
                        
    <pathelement location="${emmaJar}"/>
                    
    </classpath>
                
    </javac>
                
    <copy todir="${build.dest}">
                    
    <fileset dir="${build.src}/ibm">
                        
    <include name="**/*.class"/>
                        
    <exclude name="**/*.java" />
                    
    </fileset>
                
    </copy>
        
    </target>
        
        
    <target name="compile-test">
            
    <mkdir dir="${build.test.bin}" />
                    
    <javac destdir="${build.test.bin}" debug="on">
                        
    <src path="${build.test}" />
                        
    <classpath location="${build.dest}">
                            
    <pathelement location="${junitJar}"/>
                        
    </classpath>
                    
    </javac>
                    
    <copy todir="${build.test.bin}">
                        
    <fileset dir="${build.test}">
                            
    <include name="**/*.class"/>
                            
    <exclude name="**/*.java" />
                        
    </fileset>
                    
    </copy>
        
    </target>

        
        
        
    <!--對編譯在路徑build.src中的Java類注入字節(jié)碼, 并且把注入字節(jié)碼的新Java類存放到路徑build.instrument-->
        
    <!--覆蓋率的元數(shù)據(jù)存放在路徑coverage.dir中-->
        
    <!--插入字節(jié)碼-->
        
        
    <target name="instrument" depends="compile">
                
    <emma enabled="${emma.enabled}">
                    
    <instr instrpathref="classpath.main" 
                            destdir
    ="${build.instrument}" 
                            metadatafile
    ="${coverage.dir}/metadata.emma" merge="true">
                        
                    
    </instr>
                
    </emma>
                
    <copy todir="${build.instrument}">
                        
    <fileset dir="${build.dest}">
                            
    <include name="**/*.class" />
                            
    <exclude name="**/*.java" />
                        
    </fileset>
                
    </copy>
        
    </target>
        
        
    <target name="run" depends="compile">
            
    <junit fork="true" forkmode="once">
                            
                
    <jvmarg value="-Demma.coverage.out.file = ${coverage.dir}/metadata.emma" />
                
    <jvmarg value="-Demma.coverage.out.merge = true" />

                
    <classpath>
                    
    <pathelement location="${build.src}/"/>
                    
    <pathelement location="${junitJar}"/>
                    
    <pathelement location="${emmaJar}"/>
                
    </classpath>
                
                
    <formatter type="xml"/>
                
    <!-- formatter用于格式化測試輸出結(jié)果 -->
                
    <batchtest haltonfailure="no" todir="report">
                    
    <fileset dir="${build.test}">
                        
    <include name="**/*Test.java"/>
                    
    </fileset>
                
    </batchtest>
            
    </junit>
            
    <junitreport todir="${build.report}/UT/htmlreport">
                
    <fileset dir="./report" id="id">
                    
    <include name="*.xml"/>
                
    </fileset>
                
    <report todir="${build.report}/UT/htmlreport" format="frames" Styledir="./report/XSL">
            
    </report>
                
            
    </junitreport>
            
    <echo message="end running junit test"></echo>
        
    </target>


        
    <target name="coverage_report" depends="instrument,compile">
                
    <!--如果屬性emma.enabled的值是true,就生成代碼覆蓋率報告 -->
                
    <emma enabled="${emma.enabled}">
                    
    <report sourcepath="${build.src}/ibm"
                        sort
    ="+block,+name,+method,+class"
                        metrics
    ="method:70,block:80,line:80,class:100">
                        
                    
                        
    <fileset dir="${coverage.dir}">
                            
    <include name="*.emma" />
                        
    </fileset>
                        
                        
    <html outfile="${coverage.dir}/coverage.html" />

                    
    </report>
                
    </emma>
        
    </target>
        
        
        
    <!-- checkstyle -->
        
    <taskdef resource="checkstyletask.properties" classpath="lib/checkstyle/checkstyle-all-4.4.jar" />
        
    <target name="checkstyle_report">
            
    <checkstyle config="conf/checkstyle/bpf_checks.xml">
                
    <fileset dir="src" includes="**/*.java" />
                
    <formatter type="plain" />
                
    <formatter type="xml" toFile="report/checkstyle/checkstyle_errors.xml" />
            
    </checkstyle>
            
    <xslt in="report/checkstyle/checkstyle_errors.xml"
                out
    ="report/checkstyle/checkstyle_report.html" 
                style
    ="conf/checkstyle/checkstyle-frames.xsl" />
        
    </target>

    </project>




    Feedback

    # re: Emma使用過程中遇到的 錯誤  回復(fù)  更多評論   

    2008-03-20 10:39 by Robert Su
    找到了~
    <formatter type="xml"/>
    <!-- formatter用于格式化測試輸出結(jié)果 -->
    <batchtest haltonfailure="no" todir="report">
    <fileset dir="${build.test}">
    <include name="**/*Test.java"/>
    </fileset>
    </batchtest>
    </junit>

    錯誤在<fileset dir="${build.test}">中,路徑?jīng)]有指明清楚

    # re: Emma使用過程中遇到的 錯誤  回復(fù)  更多評論   

    2014-08-06 09:25 by 我不愛吃魚丸
    沒太看明白。。能說詳細點么

    只有注冊用戶登錄后才能發(fā)表評論。


    網(wǎng)站導(dǎo)航:
     

    posts - 103, comments - 104, trackbacks - 0, articles - 5

    Copyright © Robert Su

    主站蜘蛛池模板: 精品国产亚洲一区二区三区| 亚洲欧洲精品一区二区三区| 免费无码又爽又刺激高潮软件| 亚洲天堂一区二区三区| 大陆一级毛片免费视频观看i| 国产一区二区三区免费观在线| 亚洲免费在线视频观看| 亚洲午夜福利精品无码| 亚洲一区二区三区免费视频| 国产成人亚洲精品播放器下载| 亚洲今日精彩视频| 四虎影库久免费视频| 8x8×在线永久免费视频| 处破女第一次亚洲18分钟| 亚洲人成在线影院| 亚洲国产精品自在拍在线播放| 免费无码一区二区三区| 国产在亚洲线视频观看| 亚洲自偷自偷精品| 国产精品V亚洲精品V日韩精品 | 久久亚洲最大成人网4438| 亚洲福利精品一区二区三区| 91精品免费国产高清在线| 国产精品福利片免费看| 亚洲av无码一区二区三区人妖| 亚洲精品一卡2卡3卡三卡四卡| 中文字幕亚洲专区| 欧洲精品免费一区二区三区 | 无遮免费网站在线入口| 中文字幕无码毛片免费看| 美女被吸屁股免费网站| 激情综合亚洲色婷婷五月APP| 亚洲国产成人私人影院| 国产亚洲精品影视在线产品| 日本免费福利视频| 一个人看www在线高清免费看| 三年片在线观看免费观看大全动漫| 人与动性xxxxx免费| 黄色三级三级三级免费看| 亚洲欧美成人综合久久久| 亚洲国产成人九九综合|