rapor, ancak sonucu altında almaz ant -v or ant -debug
ile başlamayı denedi, ama hiç şansı olmadı. Biri yardım edebilir mi?karınca JUnit görev ben JUnit testi ile bir karınca yazmaya çalıştı detay
<junit printsummary="yes" showoutput="true">
karınca 1.8.2, güneş jdk1.6.0_20, junit 4.8.2
sorunu daraltmak için, ben ayrı bir proje yarattığı bu benim Build.xml olduğunu
<project name = "TestPrj" default="unittest" basedir = ".">
<target name="unittest" >
<junit printsummary="yes" showoutput="true" >
<classpath>
<pathelement location="./junit-4.8.2.jar"/>
<pathelement location="./ant-junit4.jar"/>
</classpath>
<test name = "com.mytest.unittest.SimpleTest" todir="."/>
</junit>
</target>
</project>
aşağıdaki simpletest.java
package com.mytest.unittest;
import junit.framework.TestCase;
public class SimpleTest extends TestCase{
public void testFirst()
{
assertTrue(true);
}
}
C: \ TestPrj> karınca
012.351.Buildfile: C:\TestPrj\build.xml
unittest:
[junit] Running com.mytest.unittest.SimpleTest
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0 sec
BUILD SUCCESSFUL
Total time: 0 seconds
C: \ TestPrj> dir
Directory of C:\TestPrj
04/02/2011 02:00 PM <DIR> .
04/02/2011 02:00 PM <DIR> ..
04/02/2011 01:56 PM 280 .classpath
04/02/2011 01:54 PM 519 .project
04/02/2011 02:00 PM 7,120 ant-junit4.jar
04/02/2011 02:00 PM 403 build.xml
04/02/2011 01:55 PM <DIR> com
11/17/2010 05:36 PM 237,344 junit-4.8.2.jar
5 File(s) 245,666 bytes
3 Dir(s) 28,451,311,616 bytes free
bir JUnit sonuçları/detay/rapor orada değil neden
oluşturulan? Böylece, gerçek başarısızlık durumumda, sorularımı gideremem?
Bu çalışır, ancak tüm testler çalıştıktan sonra sonuçları ekrana gönderir. Onlar ilerledikçe ilerleyebilmeleri için onları koşarken koşarken görmek isterim. Bunu yapmanın bir yolu var mı? – crowmagnumb
bkz. Http://stackoverflow.com/questions/18293054/immediate-junit-test-logging-with-junit-ant-task – lesmana