I have the below build.xml and when i runt the tests it is throwing an error
No suites,classes,methods or jar file was specified.It is working fine
until the build and I can see the classes built.But when i run the tests
its throwing an error.Please help me with this





<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE project [
]>

<project name="Learning TestNG" default="usage" basedir=".">

<!-- ========== Initialize Properties ===================================
-->
     <property environment="env"/>

     <property name="ws.home" value="${basedir}"/>
     <property name="ws.jars" value="C:\selenium server"/>
     <property name="test.dest" value="${ws.home}/build"/>
     <property name="test.src" value="${ws.home}/Settings_tests"/>
     <property name="ng.result" value="test-output"/>

     <!--target name="start-selenium-server">
         <java jar="${ws.home}/lib/selenium-server.jar"/>
     </target-->

     <target name="setClassPath" unless="test.classpath">
         <path id="classpath_jars">
             <fileset dir="${ws.jars}" includes="*.jar"/>
         </path>

         <pathconvert pathsep=":"
             property="test.classpath"
             refid="classpath_jars"/>
     </target>

     <target name="init" depends="setClassPath">
         <tstamp>
             <format property="start.time" pattern="MM/dd/yyyy hh:mm aa" />
         </tstamp>
         <condition property="ANT"
             value="${env.ANT_HOME}/bin/ant.bat"
             else="${env.ANT_HOME}/bin/ant">
                     <os family="windows" />
         </condition>
         <taskdef name="testng" classpath="${test.classpath}"
                classname="org.testng.TestNGAntTask" />

     </target>

     <!-- all -->
     <target name="all">
     </target>

     <!-- clean -->
     <target name="clean">
         <delete dir="${test.dest}"/>
     </target>

     <!-- compile -->
     <target name="compile" depends="init, clean" >
         <delete includeemptydirs="true" quiet="true">
             <fileset dir="${test.dest}" includes="**/*.jar"/>
         </delete>
         <echo message="making directory..."/>
         <mkdir dir="${test.dest}"/>
         <echo message="classpath------: ${test.classpath}"/>
         <echo message="compiling..."/>
         <javac
             includeantruntime="false"
             debug="true"
             destdir="${test.dest}"
             srcdir="${test.src}"
             target="1.7"
             classpath="${test.classpath}"
         >
         </javac>
       </target>

     <!-- build -->
     <target name="build" depends="init">
     </target>

     <!-- run -->
     <target name="run" depends="compile">
         <testng classpath="${test.classpath}:${test.dest}"
suitename="suite1">
             <xmlfileset dir="${ws.home}" includes="testng-sequence.xml"/>
         </testng>
         <!--
         <testng classpath="${test.classpath}:${test.dest}" groups="fast">
             <classfileset dir="${test.dest}" includes="example1/*.class"/>
         </testng>
         -->
     </target>

     <target name="usage">
         <echo>
             ant run will execute the test
         </echo>
     </target>

     <path id="test.c">
             <fileset dir="${ws.jars}" includes="*.jar"/>
     </path>

       <target name="makexsltreports">
             <mkdir dir="${ws.home}/XSLT_Reports/output"/>

             <xslt in="${ng.result}/testng-results.xml"
style="src/xslt/testng-results.xsl"
                   out="${ws.home}/XSLT_Reports/output/index.html"
classpathref="test.c" processor="SaxonLiaison">
                 <param name="testNgXslt.outputDir"
expression="${ws.home}/XSLT_Reports/output/"/>
                 <param name="testNgXslt.showRuntimeTotals"
expression="true"/>
             </xslt>
         </target>

     <!-- ****************** targets not used ****************** -->

</project>

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/fmfE-X_7WSMJ.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Krishnan Mahadevan at Aug 21, 2012 at 8:59 am
    http://testng.org/doc/ant.html

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/


    On Tue, Aug 21, 2012 at 2:26 PM, Suresh Reddy
    wrote:
    I have the below build.xml and when i runt the tests it is throwing an error
    No suites,classes,methods or jar file was specified.It is working fine
    until the build and I can see the classes built.But when i run the tests
    its throwing an error.Please help me with this





    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE project [
    ]>

    <project name="Learning TestNG" default="usage" basedir=".">

    <!-- ========== Initialize Properties ===================================
    -->
    <property environment="env"/>

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="C:\selenium server"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/Settings_tests"/>
    <property name="ng.result" value="test-output"/>

    <!--target name="start-selenium-server">
    <java jar="${ws.home}/lib/selenium-server.jar"/>
    </target-->

    <target name="setClassPath" unless="test.classpath">
    <path id="classpath_jars">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <pathconvert pathsep=":"
    property="test.classpath"
    refid="classpath_jars"/>
    </target>

    <target name="init" depends="setClassPath">
    <tstamp>
    <format property="start.time" pattern="MM/dd/yyyy hh:mm aa" />
    </tstamp>
    <condition property="ANT"
    value="${env.ANT_HOME}/bin/ant.bat"
    else="${env.ANT_HOME}/bin/ant">
    <os family="windows" />
    </condition>
    <taskdef name="testng" classpath="${test.classpath}"
    classname="org.testng.TestNGAntTask" />

    </target>

    <!-- all -->
    <target name="all">
    </target>

    <!-- clean -->
    <target name="clean">
    <delete dir="${test.dest}"/>
    </target>

    <!-- compile -->
    <target name="compile" depends="init, clean" >
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${test.dest}" includes="**/*.jar"/>
    </delete>
    <echo message="making directory..."/>
    <mkdir dir="${test.dest}"/>
    <echo message="classpath------: ${test.classpath}"/>
    <echo message="compiling..."/>
    <javac
    includeantruntime="false"
    debug="true"
    destdir="${test.dest}"
    srcdir="${test.src}"
    target="1.7"
    classpath="${test.classpath}"
    </javac>
    </target>

    <!-- build -->
    <target name="build" depends="init">
    </target>

    <!-- run -->
    <target name="run" depends="compile">
    <testng classpath="${test.classpath}:${test.dest}"
    suitename="suite1">
    <xmlfileset dir="${ws.home}" includes="testng-sequence.xml"/>
    </testng>
    <!--
    <testng classpath="${test.classpath}:${test.dest}" groups="fast">
    <classfileset dir="${test.dest}" includes="example1/*.class"/>
    </testng>
    -->
    </target>

    <target name="usage">
    <echo>
    ant run will execute the test
    </echo>
    </target>

    <path id="test.c">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <target name="makexsltreports">
    <mkdir dir="${ws.home}/XSLT_Reports/output"/>

    <xslt in="${ng.result}/testng-results.xml"
    style="src/xslt/testng-results.xsl"
    out="${ws.home}/XSLT_Reports/output/index.html"
    classpathref="test.c" processor="SaxonLiaison">
    <param name="testNgXslt.outputDir"
    expression="${ws.home}/XSLT_Reports/output/"/>
    <param name="testNgXslt.showRuntimeTotals"
    expression="true"/>
    </xslt>
    </target>

    <!-- ****************** targets not used ****************** -->

    </project>

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to
    selenium-users+unsubscribe@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/selenium-users/-/fmfE-X_7WSMJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To post to this group, send email to selenium-users@googlegroups.com.
    To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Mayank Srivastava at Jun 10, 2013 at 2:15 pm
    Hey Krishnan,

    Can you please provide the specific point which we have to look on below
    URL?

    On Tuesday, August 21, 2012 2:29:28 PM UTC+5:30, Krishnan wrote:

    http://testng.org/doc/ant.html

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/


    On Tue, Aug 21, 2012 at 2:26 PM, Suresh Reddy <sureshre...@gmail.com<javascript:>
    wrote:
    I have the below build.xml and when i runt the tests it is throwing an error
    No suites,classes,methods or jar file was specified.It is working fine
    until the build and I can see the classes built.But when i run the tests
    its throwing an error.Please help me with this





    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE project [
    ]>

    <project name="Learning TestNG" default="usage" basedir=".">

    <!-- ========== Initialize Properties ===================================
    -->
    <property environment="env"/>

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="C:\selenium server"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/Settings_tests"/>
    <property name="ng.result" value="test-output"/>

    <!--target name="start-selenium-server">
    <java jar="${ws.home}/lib/selenium-server.jar"/>
    </target-->

    <target name="setClassPath" unless="test.classpath">
    <path id="classpath_jars">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <pathconvert pathsep=":"
    property="test.classpath"
    refid="classpath_jars"/>
    </target>

    <target name="init" depends="setClassPath">
    <tstamp>
    <format property="start.time" pattern="MM/dd/yyyy hh:mm aa" />
    </tstamp>
    <condition property="ANT"
    value="${env.ANT_HOME}/bin/ant.bat"
    else="${env.ANT_HOME}/bin/ant">
    <os family="windows" />
    </condition>
    <taskdef name="testng" classpath="${test.classpath}"
    classname="org.testng.TestNGAntTask" />

    </target>

    <!-- all -->
    <target name="all">
    </target>

    <!-- clean -->
    <target name="clean">
    <delete dir="${test.dest}"/>
    </target>

    <!-- compile -->
    <target name="compile" depends="init, clean" >
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${test.dest}" includes="**/*.jar"/>
    </delete>
    <echo message="making directory..."/>
    <mkdir dir="${test.dest}"/>
    <echo message="classpath------: ${test.classpath}"/>
    <echo message="compiling..."/>
    <javac
    includeantruntime="false"
    debug="true"
    destdir="${test.dest}"
    srcdir="${test.src}"
    target="1.7"
    classpath="${test.classpath}"
    </javac>
    </target>

    <!-- build -->
    <target name="build" depends="init">
    </target>

    <!-- run -->
    <target name="run" depends="compile">
    <testng classpath="${test.classpath}:${test.dest}"
    suitename="suite1">
    <xmlfileset dir="${ws.home}" includes="testng-sequence.xml"/>
    </testng>
    <!--
    <testng classpath="${test.classpath}:${test.dest}" groups="fast">
    <classfileset dir="${test.dest}" includes="example1/*.class"/>
    </testng>
    -->
    </target>

    <target name="usage">
    <echo>
    ant run will execute the test
    </echo>
    </target>

    <path id="test.c">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <target name="makexsltreports">
    <mkdir dir="${ws.home}/XSLT_Reports/output"/>

    <xslt in="${ng.result}/testng-results.xml"
    style="src/xslt/testng-results.xsl"
    out="${ws.home}/XSLT_Reports/output/index.html"
    classpathref="test.c" processor="SaxonLiaison">
    <param name="testNgXslt.outputDir"
    expression="${ws.home}/XSLT_Reports/output/"/>
    <param name="testNgXslt.showRuntimeTotals"
    expression="true"/>
    </xslt>
    </target>

    <!-- ****************** targets not used ****************** -->

    </project>

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To post to this group, send email to seleniu...@googlegroups.com<javascript:>
    .
    To unsubscribe from this group, send email to
    selenium-user...@googlegroups.com <javascript:>.
    To view this discussion on the web visit
    https://groups.google.com/d/msg/selenium-users/-/fmfE-X_7WSMJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ebf02252-174a-42d0-917c-d66327f7df29%40googlegroups.com?hl=en-US.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Krishnan Mahadevan at Jun 10, 2013 at 3:18 pm
    Mayank,
    I am not conversant with ant. I use Maven. Which is why I gave you the
    reference link hoping that you would figure it out on your own.

    Perhaps you might want to spend some time taking a look here :
    http://openwritings.net/public/testng/ant-build-file-testng


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    On Mon, Jun 10, 2013 at 7:45 PM, Mayank Srivastava wrote:

    Hey Krishnan,

    Can you please provide the specific point which we have to look on below
    URL?

    On Tuesday, August 21, 2012 2:29:28 PM UTC+5:30, Krishnan wrote:

    http://testng.org/doc/ant.html**

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive,
    fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.**blogspot.com/<http://wakened-cognition.blogspot.com/>

    On Tue, Aug 21, 2012 at 2:26 PM, Suresh Reddy wrote:

    I have the below build.xml and when i runt the tests it is throwing an error
    No suites,classes,methods or jar file was specified.It is working fine
    until the build and I can see the classes built.But when i run the tests
    its throwing an error.Please help me with this





    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE project [
    ]>

    <project name="Learning TestNG" default="usage" basedir=".">

    <!-- ========== Initialize Properties ==============================**=====
    -->
    <property environment="env"/>

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="C:\selenium server"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/Settings_**tests"/>
    <property name="ng.result" value="test-output"/>

    <!--target name="start-selenium-server">
    <java jar="${ws.home}/lib/selenium-**server.jar"/>
    </target-->

    <target name="setClassPath" unless="test.classpath">
    <path id="classpath_jars">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <pathconvert pathsep=":"
    property="test.classpath"
    refid="classpath_jars"/>
    </target>

    <target name="init" depends="setClassPath">
    <tstamp>
    <format property="start.time" pattern="MM/dd/yyyy hh:mm aa"
    />
    </tstamp>
    <condition property="ANT"
    value="${env.ANT_HOME}/bin/**ant.bat"
    else="${env.ANT_HOME}/bin/ant"**>
    <os family="windows" />
    </condition>
    <taskdef name="testng" classpath="${test.classpath}"
    classname="org.testng.**TestNGAntTask" />

    </target>

    <!-- all -->
    <target name="all">
    </target>

    <!-- clean -->
    <target name="clean">
    <delete dir="${test.dest}"/>
    </target>

    <!-- compile -->
    <target name="compile" depends="init, clean" >
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${test.dest}" includes="**/*.jar"/>
    </delete>
    <echo message="making directory..."/>
    <mkdir dir="${test.dest}"/>
    <echo message="classpath------: ${test.classpath}"/>
    <echo message="compiling..."/>
    <javac
    includeantruntime="false"
    debug="true"
    destdir="${test.dest}"
    srcdir="${test.src}"
    target="1.7"
    classpath="${test.classpath}"
    </javac>
    </target>

    <!-- build -->
    <target name="build" depends="init">
    </target>

    <!-- run -->
    <target name="run" depends="compile">
    <testng classpath="${test.classpath}:$**{test.dest}"
    suitename="suite1">
    <xmlfileset dir="${ws.home}" includes="testng-sequence.xml"*
    */>
    </testng>
    <!--
    <testng classpath="${test.classpath}:$**{test.dest}"
    groups="fast">
    <classfileset dir="${test.dest}"
    includes="example1/*.class"/>
    </testng>
    -->
    </target>

    <target name="usage">
    <echo>
    ant run will execute the test
    </echo>
    </target>

    <path id="test.c">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <target name="makexsltreports">
    <mkdir dir="${ws.home}/XSLT_Reports/**output"/>

    <xslt in="${ng.result}/testng-**results.xml"
    style="src/xslt/testng-**results.xsl"
    out="${ws.home}/XSLT_Reports/**output/index.html"
    classpathref="test.c" processor="SaxonLiaison">
    <param name="testNgXslt.outputDir"
    expression="${ws.home}/XSLT_**Reports/output/"/>
    <param name="testNgXslt.**showRuntimeTotals"
    expression="true"/>
    </xslt>
    </target>

    <!-- ****************** targets not used ****************** -->

    </project>

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To post to this group, send email to seleniu...@googlegroups.**com.
    To unsubscribe from this group, send email to selenium-user...@**
    googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/**
    msg/selenium-users/-/fmfE-X_**7WSMJ<https://groups.google.com/d/msg/selenium-users/-/fmfE-X_7WSMJ>
    .
    For more options, visit https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
    .

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/ebf02252-174a-42d0-917c-d66327f7df29%40googlegroups.com?hl=en-US
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZLn4o5NdcnG2FvNY0Fhatr2_3P8mWpeXLxo7S%3DeH-WSTJA%40mail.gmail.com?hl=en-US.
    For more options, visit https://groups.google.com/groups/opt_out.
  • SOUVIK DUTTA at Dec 1, 2013 at 8:33 pm
    Hey Krishnan,

    I am facing a same problem as described by, could you please let me know
    how did you solve this issue. My ant looks exactly like yours, please help.

    Thanks
    Souvik
    On Monday, June 10, 2013 8:47:54 PM UTC+5:30, Krishnan wrote:

    Mayank,
    I am not conversant with ant. I use Maven. Which is why I gave you the
    reference link hoping that you would figure it out on your own.

    Perhaps you might want to spend some time taking a look here :
    http://openwritings.net/public/testng/ant-build-file-testng


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/


    On Mon, Jun 10, 2013 at 7:45 PM, Mayank Srivastava <techn...@gmail.com<javascript:>
    wrote:
    Hey Krishnan,

    Can you please provide the specific point which we have to look on below
    URL?

    On Tuesday, August 21, 2012 2:29:28 PM UTC+5:30, Krishnan wrote:

    http://testng.org/doc/ant.html

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive,
    fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    On Tue, Aug 21, 2012 at 2:26 PM, Suresh Reddy wrote:

    I have the below build.xml and when i runt the tests it is throwing an error
    No suites,classes,methods or jar file was specified.It is working fine
    until the build and I can see the classes built.But when i run the tests
    its throwing an error.Please help me with this





    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE project [
    ]>

    <project name="Learning TestNG" default="usage" basedir=".">

    <!-- ========== Initialize Properties ===================================
    -->
    <property environment="env"/>

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="C:\selenium server"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/Settings_tests"/>
    <property name="ng.result" value="test-output"/>

    <!--target name="start-selenium-server">
    <java jar="${ws.home}/lib/selenium-server.jar"/>
    </target-->

    <target name="setClassPath" unless="test.classpath">
    <path id="classpath_jars">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <pathconvert pathsep=":"
    property="test.classpath"
    refid="classpath_jars"/>
    </target>

    <target name="init" depends="setClassPath">
    <tstamp>
    <format property="start.time" pattern="MM/dd/yyyy hh:mm aa"
    />
    </tstamp>
    <condition property="ANT"
    value="${env.ANT_HOME}/bin/ant.bat"
    else="${env.ANT_HOME}/bin/ant">
    <os family="windows" />
    </condition>
    <taskdef name="testng" classpath="${test.classpath}"
    classname="org.testng.TestNGAntTask" />

    </target>

    <!-- all -->
    <target name="all">
    </target>

    <!-- clean -->
    <target name="clean">
    <delete dir="${test.dest}"/>
    </target>

    <!-- compile -->
    <target name="compile" depends="init, clean" >
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${test.dest}" includes="**/*.jar"/>
    </delete>
    <echo message="making directory..."/>
    <mkdir dir="${test.dest}"/>
    <echo message="classpath------: ${test.classpath}"/>
    <echo message="compiling..."/>
    <javac
    includeantruntime="false"
    debug="true"
    destdir="${test.dest}"
    srcdir="${test.src}"
    target="1.7"
    classpath="${test.classpath}"
    </javac>
    </target>

    <!-- build -->
    <target name="build" depends="init">
    </target>

    <!-- run -->
    <target name="run" depends="compile">
    <testng classpath="${test.classpath}:${test.dest}"
    suitename="suite1">
    <xmlfileset dir="${ws.home}" includes="testng-sequence.xml"
    />
    </testng>
    <!--
    <testng classpath="${test.classpath}:${test.dest}"
    groups="fast">
    <classfileset dir="${test.dest}"
    includes="example1/*.class"/>
    </testng>
    -->
    </target>

    <target name="usage">
    <echo>
    ant run will execute the test
    </echo>
    </target>

    <path id="test.c">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <target name="makexsltreports">
    <mkdir dir="${ws.home}/XSLT_Reports/output"/>

    <xslt in="${ng.result}/testng-results.xml"
    style="src/xslt/testng-results.xsl"
    out="${ws.home}/XSLT_Reports/output/index.html"
    classpathref="test.c" processor="SaxonLiaison">
    <param name="testNgXslt.outputDir"
    expression="${ws.home}/XSLT_Reports/output/"/>
    <param name="testNgXslt.showRuntimeTotals"
    expression="true"/>
    </xslt>
    </target>

    <!-- ****************** targets not used ****************** -->

    </project>

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To post to this group, send email to seleniu...@googlegroups.com.
    To unsubscribe from this group, send email to selenium-user...@
    googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msg/selenium-users/-/fmfE-X_7WSMJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-user...@googlegroups.com <javascript:>.
    To post to this group, send email to seleniu...@googlegroups.com<javascript:>
    .
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/ebf02252-174a-42d0-917c-d66327f7df29%40googlegroups.com?hl=en-US
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/4bc6bc24-5250-4686-a38b-3be042d50768%40googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Krishnan Mahadevan at Dec 12, 2013 at 4:46 pm
    Am not conversant with Ant. I am more familiar with Maven. Hope someone
    else would pitch in and offer help.
    On Monday, December 2, 2013, SOUVIK DUTTA wrote:

    Hey Krishnan,

    I am facing a same problem as described by, could you please let me know
    how did you solve this issue. My ant looks exactly like yours, please help.

    Thanks
    Souvik
    On Monday, June 10, 2013 8:47:54 PM UTC+5:30, Krishnan wrote:

    Mayank,
    I am not conversant with ant. I use Maven. Which is why I gave you the
    reference link hoping that you would figure it out on your own.

    Perhaps you might want to spend some time taking a look here :
    http://openwritings.net/public/testng/ant-build-file-testng


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive,
    fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    On Mon, Jun 10, 2013 at 7:45 PM, Mayank Srivastava wrote:

    Hey Krishnan,

    Can you please provide the specific point which we have to look on below
    URL?

    On Tuesday, August 21, 2012 2:29:28 PM UTC+5:30, Krishnan wrote:

    http://testng.org/doc/ant.html

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive,
    fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    On Tue, Aug 21, 2012 at 2:26 PM, Suresh Reddy wrote:

    I have the below build.xml and when i runt the tests it is throwing an error
    No suites,classes,methods or jar file was specified.It is working
    fine until the build and I can see the classes built.But when i run the
    tests its throwing an error.Please help me with this





    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE project [
    ]>

    <project name="Learning TestNG" default="usage" basedir=".">

    <!-- ========== Initialize Properties ===================================
    -->
    <property environment="env"/>

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="C:\selenium server"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/Settings_tests"/>
    <property name="ng.result" value="test-output"/>

    <!--target name="start-selenium-server">
    <java jar="${ws.home}/lib/selenium-server.jar"/>
    </target-->

    <target name="setClassPath" unless="test.classpath">
    <path id="classpath_jars">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <pathconvert pathsep=":"
    property="test.classpath"
    refid="classpath_jars"/>
    </target>

    <target name="init" depends="setClassPath">
    <tstamp>
    <format property="start.time" pattern="MM/dd/yyyy hh:mm
    aa" />
    </tstamp>
    <condition property="ANT"
    value="${env.ANT_HOME}/bin/ant.bat"
    else="${env.ANT_HOME}/bin/ant">
    <os family="windows" />
    </condition>
    <taskdef name="testng" classpath="${test.classpath}"
    classname="org.testng.TestNGAntTask" />

    </target>

    <!-- all -->
    <target name="all">
    </target>

    <!-- clean -->
    <target name="clean">
    <delete dir="${test.dest}"/>
    </target>

    <!-- compile -->
    <target name="compile" depends="init, clean" >
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${test.dest}" includes="**/*.jar"/>
    </delete>
    <echo message="making directory..."/>
    <mkdir dir="${test.dest}"/>
    <echo message="classpath------: ${test.classpath}"/>
    <echo message="compiling..."/>
    <javac
    includeantruntime="false"
    debug="true"
    destdir="${test.dest}"
    srcdir="${test.src}"
    target="1.7"
    classpath="${test.classpath}"
    </javac>
    </target>

    <!-- build -->
    <target name="build" depends="init">
    </target>

    <!-- run -->
    <target name="run" depends="compile">
    <testng classpath="${test.classpath}:${test.dest}"
    suitename="suite1">
    <xmlfileset dir="${ws.home}" includes="testng-sequence.xml"
    />
    </testng>
    <!--
    <testng classpath="${test.classpath}:${test.dest}"
    groups="fast">
    <classfileset dir="${test.dest}"
    includes="example1/*.class"/>
    </testng>
    -->
    </target>

    <target name="usage">
    <echo>
    ant run will execute the test
    </echo>
    </target>

    <path id="test.c">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <target name="makexsltreports">
    <mkdir dir="${ws.home}/XSLT_Reports/output"/>

    <xslt in="${ng.result}/testng-results.xml"
    style="src/xslt/testng-results.xsl"
    out="${ws.home}/XSLT_Reports/output/index.html"
    classpathref="test.c" processor="SaxonLiaison">
    <param name="testNgXslt.outputDir"
    expression="${ws.home}/XSLT_Reports/output/"/>
    <param name="testNgXslt.showRuntimeTotals"
    expression="true"/>
    </xslt>
    </target>

    <!-- ****************** targets not used ****************** -->

    </project>

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To post to this group, send email to seleniu...@googlegroups.com.
    To unsubscribe from this group, send email to selenium-user...@
    googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msg/selenium-users/-/fmfE-X_7WSMJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to selenium-user...@googlegroups.com.
    To post to this group, send email to seleniu...@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/selenium-users/ebf02252-174a-42d0-917c-d66327f7df29%
    40googlegroups.com?hl=en-US.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com <javascript:_e({},
    'cvml', 'selenium-users%2Bunsubscribe@googlegroups.com');>.
    To post to this group, send email to selenium-users@googlegroups.com<javascript:_e({}, 'cvml', 'selenium-users@googlegroups.com');>
    .
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/4bc6bc24-5250-4686-a38b-3be042d50768%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/

    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/CANikZL%3DTfojDEvJ5eyP3j9P06cv5zWd048qPiYvxEZ7%2BA31BKg%40mail.gmail.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Sudheer Qa at May 26, 2015 at 8:57 am
    The resolution for this issue is explained clearly in this blogger.

    Please have a look at it..

    http://tobeanexpert.blogspot.in/2015/05/generate-xslt-report-ant-buildxml.html

    I hope this will helps you..

    Thanks,
    sudheer.
    On Thursday, December 12, 2013 at 10:16:19 PM UTC+5:30, Krishnan wrote:

    Am not conversant with Ant. I am more familiar with Maven. Hope someone
    else would pitch in and offer help.
    On Monday, December 2, 2013, SOUVIK DUTTA wrote:

    Hey Krishnan,

    I am facing a same problem as described by, could you please let me know
    how did you solve this issue. My ant looks exactly like yours, please help.

    Thanks
    Souvik
    On Monday, June 10, 2013 8:47:54 PM UTC+5:30, Krishnan wrote:

    Mayank,
    I am not conversant with ant. I use Maven. Which is why I gave you the
    reference link hoping that you would figure it out on your own.

    Perhaps you might want to spend some time taking a look here :
    http://openwritings.net/public/testng/ant-build-file-testng


    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive,
    fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/


    On Mon, Jun 10, 2013 at 7:45 PM, Mayank Srivastava <techn...@gmail.com>
    wrote:
    Hey Krishnan,

    Can you please provide the specific point which we have to look on
    below URL?

    On Tuesday, August 21, 2012 2:29:28 PM UTC+5:30, Krishnan wrote:

    http://testng.org/doc/ant.html

    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive,
    fattening or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/


    On Tue, Aug 21, 2012 at 2:26 PM, Suresh Reddy <sureshre...@gmail.com>
    wrote:
    I have the below build.xml and when i runt the tests it is throwing
    an error No suites,classes,methods or jar file was specified.It is
    working fine until the build and I can see the classes built.But when i run
    the tests its throwing an error.Please help me with this





    <?xml version="1.0" encoding="iso-8859-1"?>
    <!DOCTYPE project [
    ]>

    <project name="Learning TestNG" default="usage" basedir=".">

    <!-- ========== Initialize Properties ===================================
    -->
    <property environment="env"/>

    <property name="ws.home" value="${basedir}"/>
    <property name="ws.jars" value="C:\selenium server"/>
    <property name="test.dest" value="${ws.home}/build"/>
    <property name="test.src" value="${ws.home}/Settings_tests"/>
    <property name="ng.result" value="test-output"/>

    <!--target name="start-selenium-server">
    <java jar="${ws.home}/lib/selenium-server.jar"/>
    </target-->

    <target name="setClassPath" unless="test.classpath">
    <path id="classpath_jars">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <pathconvert pathsep=":"
    property="test.classpath"
    refid="classpath_jars"/>
    </target>

    <target name="init" depends="setClassPath">
    <tstamp>
    <format property="start.time" pattern="MM/dd/yyyy hh:mm
    aa" />
    </tstamp>
    <condition property="ANT"
    value="${env.ANT_HOME}/bin/ant.bat"
    else="${env.ANT_HOME}/bin/ant">
    <os family="windows" />
    </condition>
    <taskdef name="testng" classpath="${test.classpath}"
    classname="org.testng.TestNGAntTask" />

    </target>

    <!-- all -->
    <target name="all">
    </target>

    <!-- clean -->
    <target name="clean">
    <delete dir="${test.dest}"/>
    </target>

    <!-- compile -->
    <target name="compile" depends="init, clean" >
    <delete includeemptydirs="true" quiet="true">
    <fileset dir="${test.dest}" includes="**/*.jar"/>
    </delete>
    <echo message="making directory..."/>
    <mkdir dir="${test.dest}"/>
    <echo message="classpath------: ${test.classpath}"/>
    <echo message="compiling..."/>
    <javac
    includeantruntime="false"
    debug="true"
    destdir="${test.dest}"
    srcdir="${test.src}"
    target="1.7"
    classpath="${test.classpath}"
    </javac>
    </target>

    <!-- build -->
    <target name="build" depends="init">
    </target>

    <!-- run -->
    <target name="run" depends="compile">
    <testng classpath="${test.classpath}:${test.dest}"
    suitename="suite1">
    <xmlfileset dir="${ws.home}"
    includes="testng-sequence.xml"/>
    </testng>
    <!--
    <testng classpath="${test.classpath}:${test.dest}"
    groups="fast">
    <classfileset dir="${test.dest}"
    includes="example1/*.class"/>
    </testng>
    -->
    </target>

    <target name="usage">
    <echo>
    ant run will execute the test
    </echo>
    </target>

    <path id="test.c">
    <fileset dir="${ws.jars}" includes="*.jar"/>
    </path>

    <target name="makexsltreports">
    <mkdir dir="${ws.home}/XSLT_Reports/output"/>

    <xslt in="${ng.result}/testng-results.xml"
    style="src/xslt/testng-results.xsl"
    out="${ws.home}/XSLT_Reports/output/index.html"
    classpathref="test.c" processor="SaxonLiaison">
    <param name="testNgXslt.outputDir"
    expression="${ws.home}/XSLT_Reports/output/"/>
    <param name="testNgXslt.showRuntimeTotals"
    expression="true"/>
    </xslt>
    </target>

    <!-- ****************** targets not used ****************** -->

    </project>

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To post to this group, send email to seleniu...@googlegroups.com.
    To unsubscribe from this group, send email to selenium-user...@
    googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msg/selenium-users/-/fmfE-X_7WSMJ.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google
    Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send
    an email to selenium-user...@googlegroups.com.
    To post to this group, send email to seleniu...@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/
    msgid/selenium-users/ebf02252-174a-42d0-917c-d66327f7df29%
    40googlegroups.com?hl=en-US.
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    You received this message because you are subscribed to the Google Groups
    "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an
    email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit
    https://groups.google.com/d/msgid/selenium-users/4bc6bc24-5250-4686-a38b-3be042d50768%40googlegroups.com
    .
    For more options, visit https://groups.google.com/groups/opt_out.

    --
    Thanks & Regards
    Krishnan Mahadevan

    "All the desirable things in life are either illegal, expensive, fattening
    or in love with someone else!"
    My Scribblings @ http://wakened-cognition.blogspot.com/
    --
    You received this message because you are subscribed to the Google Groups "Selenium Users" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
    To post to this group, send email to selenium-users@googlegroups.com.
    To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/5068e875-1cdc-4066-aca4-b64e2fa7eddc%40googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupselenium-users @
categoriesselenium
postedAug 21, '12 at 8:56a
activeMay 26, '15 at 8:57a
posts7
users5
websiteseleniumhq.org

People

Translate

site design / logo © 2022 Grokbase