Note that there are some explanatory texts on larger screens.

plurals
  1. PORun all classes and save all execution data in report with ant and Junit
    text
    copied!<p>I have created a build file, and configured it according to my project (Selenium and Junit). Now the issue is when i run build file, it only runs the first class and saves the same in HTML report. Can any one tell me what m doing wrong and what should be edited / or replaced??</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;project name="ant" default="exec" basedir="."&gt; &lt;property name="src" value="./src" /&gt; &lt;property name="lib" value="./lib" /&gt; &lt;property name="bin" value="./bin" /&gt; &lt;property name="report" value="./report" /&gt; &lt;path id="ant.classpath"&gt; &lt;pathelement location="${bin}" /&gt; &lt;fileset dir="${lib}"&gt; &lt;include name="**/*.jar" /&gt; &lt;include name="C:/Users/bhmehta/workspace/ant/lib/libs/*.jar" /&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;target name="init"&gt; &lt;delete dir="${bin}" /&gt; &lt;mkdir dir="${bin}" /&gt; &lt;/target&gt; &lt;target name="compile" depends="init" description="compile the source " &gt; &lt;!-- Compile the java code from ${src} into ${build} --&gt; &lt;javac debug="true" srcdir="${src}" destdir="${bin}" includeantruntime="false" classpathref="ant.classpath"/&gt; &lt;!-- Copy files from ${src} into ${build} --&gt; &lt;copy todir="${bin}"&gt; &lt;fileset dir="${src}"&gt; &lt;exclude name="**/*.java"/&gt; &lt;/fileset&gt; &lt;/copy&gt; &lt;/target&gt; &lt;target name="exec" depends="compile"&gt; &lt;delete dir="${report}" /&gt; &lt;mkdir dir="${report}" /&gt; &lt;mkdir dir="${report}/xml" /&gt; &lt;junit printsummary="yes" haltonfailure="no" &gt; &lt;classpath&gt;&lt;pathelement location="${ant.classpath}" /&gt; &lt;/classpath&gt; &lt;test name="testing.demo" haltonfailure="no" todir="${report}/xml" outfile="TEST-result"&gt; &lt;formatter type="xml" /&gt; &lt;/test&gt; &lt;test name="testing.demo1" haltonfailure="no" todir="${report}/xml" outfile="TEST-result"&gt; &lt;formatter type="xml" /&gt; &lt;/test&gt; &lt;/junit&gt; &lt;junitreport todir="${report}"&gt; &lt;fileset dir="${report}/xml"&gt; &lt;include name="TEST*.xml" /&gt; &lt;/fileset&gt; &lt;report format="frames" todir="${report}/html" /&gt; &lt;/junitreport&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>I have also tried some of the solutions given to similar questions, using <code>&lt;batchtest &lt;/batchtest&gt;</code> tags. But it shows error like </p> <pre><code>The &lt;junit&gt; type doesn't support ne sted text data ("&gt;"). </code></pre> <p>I really don't know what is this all about. Please some one help</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload