Ant Junit & Selenium no information in reports

74 views
Skip to first unread message

Kevin Martin

unread,
Nov 9, 2014, 5:31:22 PM11/9/14
to seleniu...@googlegroups.com
Hi

I am running so juit tests in eclipse usin Ant and Selenium Webdriver. The tests run as expected and I see the result in the console and the eb report is generated but the results are not included.

Below is my build.xml file.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<property environment="env"/>
<property name="ECLIPSE_HOME" value="F:/Program Files (x86)/eclipse/"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.7"/>
<property name="source" value="1.7"/>
<property name="junit.output.dir" value="C:/Users/kev/workspace_hlgliveTest/hlglive/junit/"/>
<path id="hlglive.classpath">
    <pathelement location="bin"/>
    <pathelement location="C:/Selenium/selenium-server-standalone-2.44.0.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="hlglive.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="classHlglive">
    <java classname="hlglive.classHlglive" failonerror="true" fork="yes">
        <classpath refid="hlglive.classpath"/>
    </java>
</target>
<target name="hmliveCH">
    <java classname="hlglive.hmliveCH" failonerror="true" fork="yes">
        <classpath refid="hlglive.classpath"/>
    </java>
</target>
<target name="junitreport">
    <junitreport todir="${junit.output.dir}">
        <fileset dir="${junit.output.dir}">
            <include name="*.xml"/>
        </fileset>
        <report format="frames" todir="${junit.output.dir}"/>
    </junitreport>
</target>    
</project>


And here is the console output


Buildfile: C:\Users\kev\workspace_hlgliveTest\hlglive\build.xml build-subprojects: init: build-project: [echo] hlglive: C:\Users\kev\workspace_hlgliveTest\hlglive\build.xml build: hmliveCH: [java] Starting ChromeDriver (v2.11.298604 (75ea2fdb5c87f133a8e1b8da16f6091fb7d5321e)) on port 24805 [java] Only local connections are allowed. [java] Starting Chrome login Test [java] Current page title is: Haulage Manager Live [java] Testing combination of user name: and password: [java] Current page title is: Haulage Manager Live [java] Testing combination of user name: KEV and password: [java] Current page title is: Haulage Manager Live [java] Testing combination of user name: KEV and password: bollo [java] Current page title is: Haulage Manager Live [java] Testing combination of user name: KEVIN and password: bollox [java] Current page title is: Haulage Manager Live [java] Testing combination of user name: KEV and password: bollox [java] Current page title is: Haulage Manager Live [java] Current page title is: Haulage Manager Live [java] Chrome Test complete junitreport: [junitreport] Processing C:\Users\kev\workspace_hlgliveTest\hlglive\junit\TESTS-TestSuites.xml to C:\Users\kev\AppData\Local\Temp\null978404570 [junitreport] Loading stylesheet jar:file:/F:/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: 565ms [junitreport] Deleting: C:\Users\kev\AppData\Local\Temp\null978404570 BUILD SUCCESSFUL Total time: 18 seconds


So all seems to run ok but when I look at the generated html pages all I see is as per the attached screenshot.

Can anyone point me to where I am going wrong please.

Thanks

Kev








ant.PNG

PeterJeffreyGale

unread,
Nov 9, 2014, 6:01:08 PM11/9/14
to seleniu...@googlegroups.com
Seems more of a question about Ant, Eclipse and JUnit than Selenium ... sorry I can't help. 

You might be better off raising the issue in a more relevant forum.

Kevin Martin

unread,
Nov 11, 2014, 9:43:29 AM11/11/14
to seleniu...@googlegroups.com
Thanks, I have. Just covering all the bases in case someone here had the answer

SeleniumMember

unread,
Jul 29, 2015, 10:45:41 AM7/29/15
to Selenium Users, spicet...@gmail.com
Hi Kevin,

I realize that this is an old topic. However, I am running into the similar issue, so I thought would ask you how were you able to fix this. I have been going round round, trying different things.

Thanks
Reply all
Reply to author
Forward
0 new messages