ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shin ta <>
Subject Automate saving reports using ANT in multiple folder/directory
Date Thu, 06 Jun 2013 08:21:35 GMT
Hi, i am trying to run a testng.xml file whereby i will get to automate the
saving of reports using build.xml
However i am not too sure how to use ANT. This will be my first ANT
project. Any advice will be appreciated.
my build.xml are as followed:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project basedir="." default="build" name="Test_report">

   <!-- Sets variables which can later be used. -->
   <!-- The value of a property is accessed via ${} -->
   <property name="src.dir" location="src" />
   <property name="testng_output.dir" location="testng_output" />
   <property name="test-output.dir" location="test-output" />

<path id="Test_report.classpath">
<fileset dir="${lib.dir}">
      <include name="**/*.jar" />

      <target name="clean">

      <target name="makedir">
       <mkdir dir="testng_output" />

      <target name="testng_output" depends= "makedir">
       <testng outputdir="testng_output"
           <xmlfileset dir="." includes="testng.xml"/>
  <target name="setTimeStampReportDir" depends="testng_output">
            <format property="tstmp" pattern="MM_dd_yyyy" locale="en"/>
     <property name="" value="./run_${date}"/>
 <presetdef name="my.javac">
   <javac debug="${debug}" deprecation="${deprecation}"
          srcdir="${src.dir}" destdir="${classes.dir}">
      <src path="${gen.dir}"/>
      <target name="build" depends="setTimeStampReportDir">
        <description>Build target</description>


After i run it, it gave me this error:
Cause: The name is undefined. Action: Check the spelling. Action: Check
that any custom tasks/types have been declared. Action: Check that any
<presetdef>/<macrodef> declarations have taken place.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message