0

Ant および出力用の XML ビルド ファイル:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- WARNING: Eclipse auto-generated file.
          Any modifications will be overwritten.
          To include a user specific buildfile here, simply create one in the same
          directory with the processing instruction <?eclipse.ant.import?>
          as the first entry and export the buildfile again. -->
<project basedir="." default="Test_class" name="shiva">
    <property environment="env"/>
    <property name="ECLIPSE_HOME" value="G:/eclipse/eclipse-SDK-3.7.2-win32-x86_64/eclipse"/>
    <property name="junit.output.dir" value="junit"/>
    <property name="debuglevel" value="source,lines,vars"/>
    <property name="target" value="1.7"/>
    <property name="source" value="1.7"/>
    <path id="JUnit 4.libraryclasspath">
    <pathelement location="${ECLIPSE_HOME}/plugins/org.junit_4.8.2.v4_8_2_v20110321-1705/junit.jar"/>
    <pathelement location="${ECLIPSE_HOME}/plugins/org.hamcrest.core_1.1.0.v20090501071000.jar"/>
    </path>
    <path id="shiva.classpath">
    <pathelement location="bin"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/apache-mime4j-0.6.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/bsh-1.3.0.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/cglib-nodep-2.1_3.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-codec-1.6.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-collections-3.2.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-exec-1.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-io-2.2.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-jxpath-1.3.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-lang3-3.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/commons-logging-1.1.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/cssparser-0.9.9.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/guava-14.0.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/hamcrest-core-1.3.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/hamcrest-library-1.3.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/htmlunit-2.12.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/htmlunit-core-js-2.12.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/httpclient-4.2.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/httpcore-4.2.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/httpmime-4.2.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/ini4j-0.5.2.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/jcommander-1.29.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/jetty-websocket-8.1.8.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/jna-3.4.0.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/jna-platform-3.4.0.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/json-20080701.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/junit-dep-4.11.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/nekohtml-1.9.17.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/netty-3.5.7.Final.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/operadriver-1.2.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/phantomjsdriver-1.0.3.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/protobuf-java-2.4.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/sac-1.3.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/serializer-2.7.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/testng-6.8.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/xalan-2.7.1.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/xercesImpl-2.10.0.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/libs/xml-apis-1.4.01.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/selenium-java-2.32.0.jar"/>
    <pathelement location="C:/Users/shiva/Desktop/Appln For Work/selenium-java-2.32.0/selenium-2.32.0/selenium-java-2.32.0-srcs.jar"/>
    <path refid="JUnit 4.libraryclasspath"/>
    </path>
    <target name="init">
    <mkdir dir="bin"/>
    <copy includeemptydirs="false" todir="bin">
        <fileset dir="src">
        <exclude name="**/*.java"/>
        </fileset>
    </copy>
    </target>
    <target name="clean">
    <delete dir="bin"/>
    </target>
    <target depends="clean" name="cleanall"/>
    <target depends="build-subprojects,build-project" name="build"/>
    <target name="build-subprojects"/>
    <target depends="init" name="build-project">
    <echo message="${ant.project.name}: ${ant.file}"/>
    <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}">
        <src path="src"/>
        <classpath refid="shiva.classpath"/>
    </javac>
    </target>
    <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/>
    <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler">
    <copy todir="${ant.library.dir}">
        <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
    </copy>
    <unzip dest="${ant.library.dir}">
        <patternset includes="jdtCompilerAdapter.jar"/>
        <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/>
    </unzip>
    </target>
    <target description="compile project with Eclipse compiler" name="build-eclipse-compiler">
    <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
    <antcall target="build"/>
    </target>
    <target name="Test_class">
    <mkdir dir="${junit.output.dir}"/>
    <junit fork="yes" printsummary="withOutAndErr">
        <formatter type="xml"/>
        <test name="shiva_Pack.Test_class" todir="${junit.output.dir}"/>
        <classpath refid="shiva.classpath"/>
    </junit>
    </target>
    <target name="junitreport">
    <junitreport todir="${junit.output.dir}">
        <fileset dir="${junit.output.dir}">
        <include name="TEST-*.xml"/>
        </fileset>
        <report format="frames" todir="${junit.output.dir}"/>
    </junitreport>
    </target>
</project>

出来上がりはこんな感じ

ビルドファイル: D:\Eclipse Indigo\shiva\build.xml

テストクラス:
        [mkdir] 作成されたディレクトリ: D:\Eclipse Indigo\shiva\junit
        [junit] shiva_Pack.Test_class の実行
        [junit] テストの実行: 1、失敗: 0、エラー: 0、経過時間: 18.048 秒
        [junit] 出力:
        [junit] クラス開始
        [junit] ハローワールド
        [junit] 放課後
    ビルド成功


    合計時間: 19 秒

私のhtmlファイルはどこですか?

4

1 に答える 1

0

Ant タスクには依存関係がありません。何を呼び出していますか?

電話したほうがいいと思います

ant Test_class junitreport

ant を呼び出すときのコマンド ラインは何ですか?

于 2013-06-10T18:22:43.890 に答える