Ecco il mio obiettivo ANT JUnitCercando di eseguire bersaglio JUnit ANT in modalità di debug in Eclipse
<target name="test" depends="compile" >
<junit failureProperty="test.failure" >
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5432" />
<classpath>
<pathelement path="${basedir}\..\Core\lib\junit-4.10.jar"/>
<pathelement path="${basedir}\..\Suggestion\lib\ssce.jar"/>
<pathelement path="C:\Java\javamail-1.4.1\mail.jar"/>
<pathelement path="C:\Java\commons-net-2.0\commons-net-ftp-2.0.jar"/>
<pathelement path="${basedir}\WebContent\WEB-INF\lib\gson-2.2.1.jar"/>
<pathelement path="${tomcatLibs}\servlet-api.jar"/>
</classpath>
<classpath>
<pathelement path="${build}"/>
</classpath>
<formatter type="brief" usefile="false" />
<test name="com.server.junit.ServerTestSuite" />
<test name="com.junit.DictionaryTestSuite" />
<test name="com.util.junit.SuggestionTestSuite" />
</junit>
<fail message="Unit test failed" if="test.failure"/>
</target>
mio test di unità passano bene se eseguito attraverso Eclipse, ma non riescono se li laund da ANT. Voglio che si fermi al mio punto di rottura in un test unitario. Dalla documentazione so che ho bisogno di aggiungere questi jvmarg ma non riesco a farlo smettere quindi ovviamente non li ho nel posto giusto. Inoltre, non penso di avere la porta corretta ma quale porta dovrei usare? Non ho dovuto impostare qualsiasi porta di debug durante il debug JUnits attraverso eclissi, semplicemente lavorato
Entrambe le risposte mi hanno aiutato ma anche questo più. Thnx – MayoMan
forkmode = una volta è la magia di cui avevo bisogno! Beh, lavora l'upvote ;-) –