vendredi 27 mars 2015
JUNIT - ANT - build.xml
Posted on 05:39 by verona
Hallo Leute,
ich bin ein Einsteiger im JUnit und Ant.
Ich versuche meine Testfälle mit der build.xml-Datei auszuführen. Der Befehl "ant run" sagt zwar "Build Successfull", aber werden meine Testfälle nicht ausgeführt. Und ich bekomme folgendem Text im Protokol:
------------------------------------------------------------------------------------------------------------
Buildfile: C:\Users\tchc\workspace\Reisekosten\build.xml
clean:
setClassPath:
init:
clean:
compile:
[echo] making directory...
[echo] classpath------: C:\Users\tchc\workspace\selenium-2.42.2\libs\apache-mime4j-0.6.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\bsh-1.3.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cglib-nodep-2.1_3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-codec-1.9.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-collections-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-exec-1.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-io-2.4.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-jxpath-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-lang3-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-logging-1.1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cssparser-0.9.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\guava-15.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-core-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-library-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-core-js-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpclient-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpcore-4.3.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpmime-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\ini4j-0.5.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jcommander-1.29.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jetty-websocket-8.1.8.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-platform-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\json-20080701.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\junit-dep-4.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jxl.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\nekohtml-1.9.20.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\netty-3.5.7.Final.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\operadriver-1.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\phantomjsdriver-1.1.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\poi-3.11-beta2-20140822.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\protobuf-java-2.4.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sac-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2-srcs.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-server-standalone-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\serializer-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-api-1.0.2-standalone.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-java.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\testng-6.8.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xalan-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xercesImpl-2.11.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xml-apis-1.4.01.jar
[echo] compiling...
[javac] Compiling 9 source files to C:\Users\tchc\workspace\Reisekosten\build
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
setClassPath:
init:
clean:
compile:
[echo] making directory...
[echo] classpath------: C:\Users\tchc\workspace\selenium-2.42.2\libs\apache-mime4j-0.6.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\bsh-1.3.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cglib-nodep-2.1_3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-codec-1.9.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-collections-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-exec-1.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-io-2.4.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-jxpath-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-lang3-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-logging-1.1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cssparser-0.9.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\guava-15.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-core-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-library-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-core-js-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpclient-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpcore-4.3.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpmime-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\ini4j-0.5.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jcommander-1.29.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jetty-websocket-8.1.8.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-platform-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\json-20080701.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\junit-dep-4.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jxl.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\nekohtml-1.9.20.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\netty-3.5.7.Final.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\operadriver-1.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\phantomjsdriver-1.1.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\poi-3.11-beta2-20140822.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\protobuf-java-2.4.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sac-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2-srcs.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-server-standalone-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\serializer-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-api-1.0.2-standalone.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-java.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\testng-6.8.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xalan-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xercesImpl-2.11.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xml-apis-1.4.01.jar
[echo] compiling...
[javac] Compiling 9 source files to C:\Users\tchc\workspace\Reisekosten\build
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
run:
[junit] Running Reisekosten
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] Test Reisekosten FAILED
[junitreport] Processing C:\Users\tchc\workspace\Reisekosten\rep\TESTS-TestSuites.xml to C:\Users\tchc\AppData\Local\Temp\null925357391
[junitreport] Loading stylesheet jar:file:/C:/Program%20Files%20(x86)/eclipse/plugins/org.apache.ant_1.9.2.v201404171502/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 993ms
BUILD SUCCESSFUL
Total time: 14 seconds
------------------------------------------------------------------------------------------------------------
Dennoch Wenn ich die gleiche Klasse als Junit Test ausführt, dann werden alle Testfälle erfolgreich ausgeführt.
Kann jemand mir bei desem Problem helfen?
ich bin ein Einsteiger im JUnit und Ant.
Ich versuche meine Testfälle mit der build.xml-Datei auszuführen. Der Befehl "ant run" sagt zwar "Build Successfull", aber werden meine Testfälle nicht ausgeführt. Und ich bekomme folgendem Text im Protokol:
------------------------------------------------------------------------------------------------------------
Buildfile: C:\Users\tchc\workspace\Reisekosten\build.xml
clean:
setClassPath:
init:
clean:
compile:
[echo] making directory...
[echo] classpath------: C:\Users\tchc\workspace\selenium-2.42.2\libs\apache-mime4j-0.6.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\bsh-1.3.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cglib-nodep-2.1_3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-codec-1.9.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-collections-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-exec-1.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-io-2.4.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-jxpath-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-lang3-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-logging-1.1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cssparser-0.9.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\guava-15.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-core-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-library-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-core-js-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpclient-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpcore-4.3.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpmime-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\ini4j-0.5.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jcommander-1.29.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jetty-websocket-8.1.8.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-platform-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\json-20080701.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\junit-dep-4.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jxl.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\nekohtml-1.9.20.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\netty-3.5.7.Final.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\operadriver-1.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\phantomjsdriver-1.1.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\poi-3.11-beta2-20140822.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\protobuf-java-2.4.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sac-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2-srcs.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-server-standalone-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\serializer-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-api-1.0.2-standalone.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-java.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\testng-6.8.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xalan-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xercesImpl-2.11.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xml-apis-1.4.01.jar
[echo] compiling...
[javac] Compiling 9 source files to C:\Users\tchc\workspace\Reisekosten\build
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
setClassPath:
init:
clean:
compile:
[echo] making directory...
[echo] classpath------: C:\Users\tchc\workspace\selenium-2.42.2\libs\apache-mime4j-0.6.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\bsh-1.3.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cglib-nodep-2.1_3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-codec-1.9.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-collections-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-exec-1.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-io-2.4.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-jxpath-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-lang3-3.2.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\commons-logging-1.1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\cssparser-0.9.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\guava-15.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-core-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\hamcrest-library-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\htmlunit-core-js-2.14.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpclient-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpcore-4.3.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\httpmime-4.3.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\ini4j-0.5.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jcommander-1.29.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jetty-websocket-8.1.8.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jna-platform-3.4.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\json-20080701.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\junit-dep-4.11.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\jxl.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\nekohtml-1.9.20.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\netty-3.5.7.Final.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\operadriver-1.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\phantomjsdriver-1.1.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\poi-3.11-beta2-20140822.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\protobuf-java-2.4.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sac-1.3.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2-srcs.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-java-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\selenium-server-standalone-2.42.2.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\serializer-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-api-1.0.2-standalone.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\sikuli-java.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\testng-6.8.5.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xalan-2.7.1.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xercesImpl-2.11.0.jar:C:\Users\tchc\workspace\selenium-2.42.2\libs\xml-apis-1.4.01.jar
[echo] compiling...
[javac] Compiling 9 source files to C:\Users\tchc\workspace\Reisekosten\build
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
run:
[junit] Running Reisekosten
[junit] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0 sec
[junit] Test Reisekosten FAILED
[junitreport] Processing C:\Users\tchc\workspace\Reisekosten\rep\TESTS-TestSuites.xml to C:\Users\tchc\AppData\Local\Temp\null925357391
[junitreport] Loading stylesheet jar:file:/C:/Program%20Files%20(x86)/eclipse/plugins/org.apache.ant_1.9.2.v201404171502/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 993ms
BUILD SUCCESSFUL
Total time: 14 seconds
------------------------------------------------------------------------------------------------------------
Dennoch Wenn ich die gleiche Klasse als Junit Test ausführt, dann werden alle Testfälle erfolgreich ausgeführt.
Kann jemand mir bei desem Problem helfen?
JUNIT - ANT - build.xml
Categories: JUNIT - ANT - build.xml
Inscription à :
Publier les commentaires (Atom)
0 commentaires:
Enregistrer un commentaire