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

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

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

    配置FlexUnit 和Ant

          在Ant中調用FlexUnit,完成對Flex(AS)代碼的測試。
          在http://weblogs.macromedia.com/pmartin/archives/2006/06/flexunit_ant.html中,Peter Martin已經為我們提供了FlexUnit的包以及例子
    但是下載下來發現用不了,修改如下:
      
          1. 導入下載的工程FlexUnitExample,將 flex.unit.swf="${basedir}/bin/AntTestRunner.swf"
    basedir="."
    # General properties
    output.dir
    =${basedir}/dist

    # Compile properties
    #flex.sdk.home
    =C:/apps/adobe/flex2.0/sdk
    flex.sdk.home
    =D:/Dev/Adobe/Flex Builder 3/sdks/3.0.0
    application
    =AntTestRunner.mxml
    mxmlc.args
    =-file-specs ${application} -library-path+=lib -output ${flex.unit.swf}

    # Test properties
    #flex.unit.swf
    =${output.dir}/AntTestRunner.swf
    flex.unit.swf
    =${basedir}/bin/AntTestRunner.swf
    report.dir
    =${basedir}/report

      2.修改build.xml

    <project name="FlexUnitExample" default="main">
            
        
    <!-- Load the custom task definitions. -->
        
    <taskdef
            resource
    ="com/adobe/ac/ant/tasks/tasks.properties" />

        
    <!--
        
    <taskdef
            resource
    ="com/adobe/ac/ant/tasks/tasks.properties"
            classpath
    ="${basedir}/FlexAntTasks.jar"/>
        
    -->
        
        
    <!-- Load the properties file. -->
        
    <property file="build.properties" />
        
        
    <target name="main" depends="compile, test" />
        
        
    <target name="compile">
            
    <exec
                dir
    ="${basedir}"
                executable
    ="${flex.sdk.home}/bin/mxmlc.exe"
                os
    ="Windows XP"
                failonerror
    ="false">
                                
                
    <arg line="${mxmlc.args}" />
            
    </exec>
            
            
    <exec
                dir
    ="${basedir}"
                executable
    ="${flex.sdk.home}/bin/mxmlc"
                os
    ="Linux"
                failonerror
    ="false">
                                        
                
    <arg line="${mxmlc.args}" />
            
    </exec>
        
    </target>
        
        
    <target name="test">                        
            
    <flexunit
                timeout
    ="0"
                swf
    ="${flex.unit.swf}"
                toDir
    ="${report.dir}"
                haltonfailure
    ="false" />
                    
            
    <junitreport todir="${report.dir}">
                
    <fileset dir="${report.dir}">
                    
    <include name="TEST-*.xml"/>
                  
    </fileset>
                    
                  
    <report format="frames" todir="${report.dir}/html"/>
            
    </junitreport>
        
    </target>
    </project>
      
        3. 運行ant,就可以了,還是很方便的。





    posted on 2008-06-27 15:05 想飛就飛 閱讀(1229) 評論(2)  編輯  收藏 所屬分類: Flex

    評論

    # re: 配置FlexUnit 和Ant 2008-07-24 15:10 Ramon

    I didn't delve into so much about this automate test, I just download ANT script run the script with readme, but failed. With your suggestion it's work, and very cool, many thanks, excellent job.  回復  更多評論   

    # re: 配置FlexUnit 和Ant 2009-08-11 00:47 bowen wang

    Hi,

    i got an error when i run this ant script. It stopped at:
    [flexunit] opened server socket

    BUILD FAILED
    /home....../build.xml:26:Error launching the test runner.

    Any idea? do you manage to run it on your computer successfully?  回復  更多評論   

    公告


    導航

    <2008年6月>
    25262728293031
    1234567
    891011121314
    15161718192021
    22232425262728
    293012345

    統計

    常用鏈接

    留言簿(13)

    我參與的團隊

    隨筆分類(69)

    隨筆檔案(68)

    最新隨筆

    搜索

    積分與排名

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 国产精品免费看久久久| 亚洲AV无码一区二区二三区软件| 最近2019中文免费字幕在线观看| 亚洲免费福利在线视频| 久久久久久亚洲av成人无码国产| 亚洲 小说区 图片区 都市| 午夜毛片不卡免费观看视频| 91热久久免费精品99| A片在线免费观看| 成人免费一区二区三区| 草久免费在线观看网站| 色窝窝亚洲AV网在线观看| 亚洲videosbestsex日本| 亚洲制服丝袜精品久久| 久久久久久亚洲精品成人| 亚洲精品无码永久在线观看你懂的| 亚洲高清免费视频| 免费观看国产精品| 四虎影视永久免费观看| 国产免费午夜a无码v视频| 噜噜嘿在线视频免费观看| 成人午夜18免费看| 毛色毛片免费观看| 无码视频免费一区二三区| 99精品全国免费观看视频| 欧美三级在线电影免费| 最新中文字幕免费视频| 日韩激情淫片免费看| 国产女高清在线看免费观看| 国产成人3p视频免费观看| 国产乱子影视频上线免费观看| 免费无码又爽又刺激高潮的视频| 德国女人一级毛片免费 | 亚洲国产精品无码中文字| 亚洲综合日韩久久成人AV| 亚洲人成在线播放网站| 亚洲精品国产精品乱码视色| 亚洲av一综合av一区| 亚洲激情电影在线| 97se亚洲国产综合自在线| 久久久久亚洲精品无码网址色欲 |