ANT

2014-11-08 2 views
0

을 통해 junit 테스트 케이스를 실행할 때 BUILD FAILED가보고를 생성하지 않았습니다. junit 테스트를 실행하고 보고서를 생성하기 위해 ant를 사용하려고합니다. 오류가 발생하여 "BUILD FAILED"가 발생하고 보고서가 생성되지 않았습니다. junit 보고서 폴더가 비어 있습니다. 내가 뭘 잘못하고 있니? ANT

제의 build.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="build" name="SeleniumProject"> 
<property environment="env"/> 
<property name="ECLIPSE_HOME" value="../../../../eclipse-jee-indigo-SR2-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="SeleniumProject.classpath"> 
    <pathelement location="bin"/> 
    <path refid="JUnit 4.libraryclasspath"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/selenium-java-2.41.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/selenium-java-2.41.0-srcs.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/selenium-server-standalone-2.41.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/apache-mime4j-0.6.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/bsh-1.3.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/cglib-nodep-2.1_3.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-codec-1.8.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-collections-3.2.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-exec-1.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-io-2.2.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-jxpath-1.3.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-lang3-3.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/commons-logging-1.1.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/cssparser-0.9.11.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/guava-15.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/hamcrest-core-1.3.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/hamcrest-library-1.3.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/htmlunit-2.13.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/htmlunit-core-js-2.13.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/httpclient-4.3.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/httpcore-4.3.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/httpmime-4.3.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/ini4j-0.5.2.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/jcommander-1.29.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/jetty-websocket-8.1.8.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/jna-3.4.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/jna-platform-3.4.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/json-20080701.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/junit-dep-4.11.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/nekohtml-1.9.19.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/netty-3.5.7.Final.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/operadriver-1.5.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/phantomjsdriver-1.1.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/protobuf-java-2.4.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/sac-1.3.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/serializer-2.7.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/testng-6.8.5.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/xalan-2.7.1.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/xercesImpl-2.10.0.jar"/> 
    <pathelement location="../../../../selenium-java-2.41.0/selenium-2.41.0/libs/xml-apis-1.4.01.jar"/> 
</path> 
<target name="init"> 
    <mkdir dir="bin"/> 
    <copy includeemptydirs="false" todir="bin"> 
     <fileset dir="src"> 
      <exclude name="**/*.launch"/> 
      <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="SeleniumProject.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="absolutexpath (1)"> 
    <mkdir dir="${junit.output.dir}"/> 
    <junit fork="yes" printsummary="withOutAndErr"> 
     <formatter type="xml"/> 
     <test name="absolutexpath" todir="${junit.output.dir}"/> 
     <classpath refid="SeleniumProject.classpath"/> 
    </junit> 
</target> 
<target name="dropdown"> 
    <java classname="DropDown" failonerror="true" fork="yes"> 
     <classpath refid="SeleniumProject.classpath"/> 
    </java> 
</target> 
<target name="relativexpath (1)"> 
    <mkdir dir="${junit.output.dir}"/> 
    <junit fork="yes" printsummary="withOutAndErr"> 
     <formatter type="xml"/> 
     <test name="relativexpath" todir="${junit.output.dir}"/> 
     <classpath refid="SeleniumProject.classpath"/> 
    </junit> 
</target> 
<target name="verifytextbycss"> 
    <mkdir dir="${junit.output.dir}"/> 
    <junit fork="yes" printsummary="withOutAndErr"> 
     <formatter type="xml"/> 
     <test name="Verifytextbycss" todir="${junit.output.dir}"/> 
     <classpath refid="SeleniumProject.classpath"/> 
    </junit> 
</target> 
<target name="Verifytextbyid (1)"> 
    <mkdir dir="${junit.output.dir}"/> 
    <junit fork="yes" printsummary="withOutAndErr"> 
     <formatter type="xml"/> 
     <test name="Verifytextbyid" todir="${junit.output.dir}"/> 
     <classpath refid="SeleniumProject.classpath"/> 
    </junit> 
</target> 
<target name="verifytitle (1)"> 
    <mkdir dir="${junit.output.dir}"/> 
    <junit fork="yes" printsummary="withOutAndErr"> 
     <formatter type="xml"/> 
     <test name="verifytitle" todir="${junit.output.dir}"/> 
     <classpath refid="SeleniumProject.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> 

이 콘솔의 출력 인 다음 JUnit 테스트가 absolutexpath 및 relativexpath 대상으로 실행

Buildfile: C:\Users\Roshan\workspace\SeleniumProject\build.xml 
build-subprojects: 
init: 
build-project: 
[echo] SeleniumProject: C:\Users\Roshan\workspace\SeleniumProject\build.xml 
[javac] C:\Users\Roshan\workspace\SeleniumProject\build.xml:78: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds 
build: 
junitreport: 
[junitreport] Processing C:\Users\Roshan\workspace\SeleniumProject\junit\TESTS-TestSuites.xml to C:\Windows\null231041511 
[junitreport] Loading stylesheet jar:file:/C:/apache-ant-1.9.4-bin/apache-ant-1.9.4/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl 
[junitreport] Failed to process C:\Users\Roshan\workspace\SeleniumProject\junit\TESTS-TestSuites.xml 

BUILD FAILED 
C:\Users\Roshan\workspace\SeleniumProject\build.xml:143: Errors while applying transformations: java.io.FileNotFoundException: C:\Windows\null231041511 (Access is denied) 

Total time: 942 milliseconds 
+0

자세한 정보 없이는 진단 할 수 없습니다. "java.io.FileNotFoundException : C : \ Windows \ null231041511 (액세스가 거부되었습니다)"파일에 액세스하는 일종의 셀레늄 오류 인 것으로 보입니다. –

답변

0

. 나는 그것들 중 하나가 "의존적 인"속성에는 보이지 않는다. 당신의 결과는 그것들이 실행되지 않는다는 것을 의미합니다.

C : \ WINDOWS \의 null231041511 (액세스가 거부되었습니다)

당신이 읽고 C를 좋아하는 쓰기 권한이있는 디렉토리를 가리킬 수 있습니다 : \ 온도를

또한, 당신은 메시지가?

관련 문제