나는 완전히 고갈되었습니다. 젠킨스가 성공적으로 완료되지 않습니다 :)Jenkins/Hudson 테스트 보고서에는 결과가 전혀 포함되어 있지 않습니다.
어쩌면 당신 중 일부는 나를 도울 수 있습니까? ant jenkins 작업에는 javadoc 플러그인이 포함되고 html 보고서 플러그인 및 junit 테스트 결과 플러그인이 게시됩니다. 구성이 완료되었습니다 (예 : 어떠한 경로 변수하거나 어떤 ..
Started by an SCM change
Started by user anonymous
Building in workspace /var/lib/jenkins/jobs/TicTacToe/workspace
Updating http://xxx.xxx.xxx.xxx/svn/repo/projekt at revision '2014-01-24T15:21:33.486 +0100'
U build.xml
U .classpath
At revision 20
[workspace] $ ant
Buildfile: /var/lib/jenkins/jobs/TicTacToe/workspace/build.xml
build-subprojects:
init:
build-project:
[echo] TicTacToe: /var/lib/jenkins/jobs/TicTacToe/workspace/build.xml
build:
BUILD SUCCESSFUL
Total time: 0 seconds
Publishing Javadoc
[htmlpublisher] Archiving HTML reports...
Recording test results
None of the test reports contained any result
Build step 'Publish JUnit test result report' changed build result to FAILURE
Finished: FAILURE
및 이클립스 구조 :
제 (단순) 시험 :
package tictactoe;
import junit.framework.TestCase;
import org.junit.Assert;
import org.junit.Test;
//@RunWith(Suite.class)
//@SuiteClasses({Tests.class})
public class FieldTest extends TestCase {
@Test
public void testSchlange() {
String schlange = new String();
Assert.assertTrue(schlange.isEmpty());
}
@Test
public void testAdd() {
Assert.assertFalse(false);
}
}
과의 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="TicTacToe">
<property environment="env"/>
<property name="ECLIPSE_HOME" value="../../"/>
<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="TicTacToe.classpath">
<pathelement location="bin"/>
<pathelement location="jfxrt.jar"/>
<pathelement location="hamcrest-core-1.3.jar"/>
<pathelement location="junit-4.11.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" includeantruntime="false" source="${source}" target="${target}">
<src path="src"/>
<classpath refid="TicTacToe.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="TicTacToe">
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="withOutAndErr">
<formatter type="xml"/>
<test name="tictactoe.FieldTest" todir="${junit.output.dir}"/>
<classpath refid="TicTacToe.classpath"/>
</junit>
</target>
<target name="FieldTest">
<mkdir dir="${junit.output.dir}"/>
<junit fork="yes" printsummary="withOutAndErr">
<formatter type="xml"/>
<test name="tictactoe.FieldTest" todir="${junit.output.dir}"/>
<classpath refid="TicTacToe.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>
</project>
첫 번째 관점에서 볼 때 빌드 파일에서 junit-test-targets을 호출하지 않는다는 것 때문에 테스트 결과를 수집 할 수 없다는 것입니다. 실행 된 적이 없기 때문입니다. 데이터를 수집하기 전에 테스트가 실행되는지 확인할 수 있습니다. – crusam
나는 완전히 그 주제에 대해 새롭다. 당신의 접근 방식에 대해 좀 더 자세히 설명해 주시겠습니까? 예 : "데이터를 수집하기 전에 테스트가 실행된다는 것을 확인하고 싶을 수 있습니다."하지만 좋은 방법이라고는 생각하지 않습니다.) –