0
개미 테스트에서 추가 한 개미 프로젝트가 있습니다. 이것은 테스트를 실행하는 대상입니다. 나는 에코 문을 콘솔 또는 보고서에 인쇄되지 않습니다 ant test-build
을 실행하면antunit 테스트의 에코가 표시되지 않습니다.
<target name="test-build" depends="init-build">
<au:antunit>
<fileset file="test.xml"/>
<au:plainlistener/>
<au:xmllistener todir="${reports.antunit.dir}"/>
</au:antunit>
</target>
test.xml의이
<project xmlns:au="antlib:org.apache.ant.antunit">
<include file="build.xml" as="main"/>
<target name="tearDown" depends="main.clean"/>
<target name="test-project-name">
<echo>project name is ${ant.project.name}</echo>
<au:assertTrue>
<equals arg1="${ant.project.name}" arg2="gradle-to-ant"/>
</au:assertTrue>
</target>
</project>
것 같습니다.
test-build:
[au:antunit] Build File: /etc/user/john/projects/gradle-to-ant/test.xml
[au:antunit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.033 sec
[au:antunit] Target: test-project-name took 0.012 sec
BUILD SUCCESSFUL
Total time: 0 seconds
나는 다른 프로젝트에서 사용한 반향이 props 인 것을 보아왔다. 어떻게하면 에일 테스트 결과 에코를 작동시킬 수 있습니까?
를보고 싶다면 . 나는 또한 모든 assert 매크로를 보여주는 antlib.xml을 발견했다. 이것은 antunit을 배우려고하는 누군가에게 도움이됩니다. 또한 antunit의 개발에 참여하는 것에 대해 감사드립니다! –
당신을 진심으로 환영합니다. Apache (또는 미러 중 하나)에서 AntUnit 배포판을 다운로드하면 매뉴얼이 포함됩니다. 웬일인지 우리는 이것이 이것을 기본 배포 지점으로 기대하기 때문에 매뉴얼을 온라인으로 보내지 않아도됩니다. –
오, 좋을 것입니다. Im는 antunit를 설치하기 위해 아이비를 사용합니다. 이것은 프로젝트입니다. github.com/moaxcp/gradle-to-ant –