blob: c894c24806ee2ae88111a4b70396370595957347 [file] [log] [blame]
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
<meta http-equiv="Content-Language" content="en-us"></meta>
<link rel="stylesheet" type="text/css" href="style.css">
<title>XMLListener AntUnit Listener</title>
<h2><a name="xmllistener">Failure AntUnit Listener</a></h2>
<p>Writes reports similar to the &quot;failure&quot; JUnit formatter.</p><p>This AntUnitListener creates a new buildfile with a target for each failed test target in the AntUnit run. The generated target calls the failed target (with setUp and tearDown if present in the called project). <br></p><p>This is intended for rerunning just failed tests.<br></p>
<table border="1" cellpadding="2" cellspacing="0">
<td valign="top"><b>Attribute</b></td>
<td valign="top"><b>Description</b></td>
<td align="center" valign="top"><b>Required</b></td>
<td valign="top">file</td>
<td valign="top">Where to write the generated buildfile.<br></td>
<td align="center">Yes.</td>
<pre> <br> &lt;au:antunit&gt;
&lt;fileset dir=&quot;${tests}&quot; includes=&quot;*.xml&quot;/&gt;
&lt;au:failurelistener file=&quot;${build.dir}/failed-tests/failed.xml&quot;/&gt;
&lt;/au:antunit&gt; <br>
<p>Runs AntUnit on all XML files in the directory
<code>${tests}</code> and collecting all failed tests. If there was a failure the file <code>${build.dir}/failed-tests/failed.xml</code> is created and has a <em>textXXX </em>target for each failed test. Additionally it has a default target <em>antunit</em> which runs all these failed tests.<br> </p>