Tuesday, 15 February 2011

eclipse - Ant Junit & Selenium no information in reports -



eclipse - Ant Junit & Selenium no information in reports -

i running juit tests in eclipse usin ant , selenium webdriver. tests run expected , see result in console , eb study generated results not included. below 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 projects reference project. useful propagate changes." name="build-refprojects"/> <target description="copy eclipse compiler jars 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 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 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] local connections allowed. [java] starting chrome login test [java] current page title is: haulage manager live [java] testing combination of user name: , password: [java] current page title is: haulage manager live [java] testing combination of user name: kev , password: [java] current page title is: haulage manager live [java] testing combination of user name: kev , password: bollo [java] current page title is: haulage manager live [java] testing combination of user name: kevin , password: bollox [java] current page title is: haulage manager live [java] testing combination of user name: kev , password: bollox [java] current page title is: haulage manager live [java] current page title is: haulage manager live [java] chrome test finish junitreport: [junitreport] processing c:\users\kev\workspace_hlglivetest\hlglive\junit\tests-testsuites.xml 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 seems run ok when @ generated html pages see this.

can point me going wrong please.

thanks

kev

<junitreport> combines results of tests run using <junit> task. used run standalone programme rather using <junit> run test suite. therefore, <junitreport> didn't see tests run , correctly reported 0 tests run.

eclipse selenium ant junit webdriver

No comments:

Post a Comment