ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shin ta <shint...@gmail.com>
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" />
    </fileset>
</path>

      <target name="clean">
      </target>

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

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

    </project>

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.

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