Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

» Selecting the input for auto populating element
Sat Jul 29, 2017 7:53 pm by kdabbara

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Ant build file for TestNG not running

View previous topic View next topic Go down

Ant build file for TestNG not running

Post by shweta.bet on Fri Nov 14, 2014 3:52 pm

Hi,

I m using Ant Build.xml for TestNG.xml to run testng with ANT.
My Build.xml looks like this..
Code:

<?xml version="1.0" encoding="UTF-8" ?>

<project name="ANT File For TestNG" default="runTest"
basedir=".">

 

 <property name="src" location="src" />

  <property name="bin" location="bin" />

  <property name="lib" location="D:\\Reference Library"
/>

<path id="class.path">

   <pathelement
location="${lib}/selenium-server-standalone-2.43.1.jar" />

   <pathelement location="${lib}/testng-5.5.jar" />

   <pathelement location="${lib}/ReportNG/guice-3.0.jar"
/>

   <pathelement location="${lib}/ReportNG/reportng-1.1.2"
/>

   <pathelement location="${lib}/ReportNG/velocity-dep-1.4"
/>

   <pathelement location="${lib}/ojdbc6_g.jar" />

   <pathelement location="${bin}" />

</path>

<target name="ktele">

 <mkdir dir="${bin}"/>

  <javac classpathref="class.path" destdir="${bin}"
encoding="UTF-8" srcdir="${src}"/>

</target>

 

<taskdef name="testng" classname="org.testng.TestNGAntTask">

   <classpath>

      <pathelement location="${lib}/testng-5.5.jar"
/>

   </classpath>

</taskdef>

<target name="runTest" depends="ktele">

 <testng outputdir="test-output" classpathref="class.path"
sourceDir="${bin}">

  <xmlfileset dir="." includes="TestNG.xml" />

 </testng>

</target>

</project>


and after running this build file..
Buildfile: D:\OllehSpace\Ktele\build.xml
ktele:
    [javac] D:\OllehSpace\Ktele\build.xml:20: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
runTest:
   [testng] Usage:
[options] The XML suite files to run
   [testng]   Options:
   [testng]     -configfailurepolicy               Configuration failure policy (skip or
   [testng]                                        continue)
   [testng]     -d                                 Output directory
   [testng]     -dataproviderthreadcount           Number of threads to use when running
   [testng]                                        data providers
   [testng]     -excludegroups                     Comma-separated list of group names to
   [testng]                                        exclude
   [testng]     -groups                            Comma-separated list of group names to be
   [testng]                                        run
   [testng]     -junit                             JUnit mode
   [testng]                                        Default: false
   [testng]     -listener                          List of .class files or list of class
   [testng]                                        names implementing ITestListener or
   [testng]                                        ISuiteListener
   [testng]     -methods                           Comma separated of test methods
   [testng]                                        Default: []
   [testng]     -methodselectors                   List of .class files or list of class
   [testng]                                        names implementing IMethodSelector
   [testng]     -mixed                             Mixed mode - autodetect the type of
   [testng]                                        current test and run it with appropriate runner
   [testng]                                        Default: false
   [testng]     -objectfactory                     List of .class files or list of class
   [testng]                                        names implementing ITestRunnerFactory
   [testng]     -parallel                          Parallel mode (methods, tests or classes)
   [testng]     -port                              The port
   [testng]     -reporter                          Extended configuration for custom report
   [testng]                                        listener
   [testng]     -suitename                         Default name of test suite, if not
   [testng]                                        specified in suite definition file or source code
   [testng]     -suitethreadpoolsize               Size of the thread pool to use to run
   [testng]                                        suites
   [testng]                                        Default: 1
   [testng]     -testclass                         The list of test classes
   [testng]     -testjar                           A jar file containing the tests
   [testng]     -testname                          Default name of test, if not specified in
   [testng]                                        suitedefinition file or source code
   [testng]     -testnames                         The list of test names to run
   [testng]     -testrunfactory, -testRunFactory   The factory used to create tests
   [testng]     -threadcount                       Number of threads to use when running
   [testng]                                        tests in parallel
   [testng]     -usedefaultlisteners               Whether to use the default listeners
   [testng]                                        Default: true
   [testng]     -log, -verbose                     Level of verbosity
   [testng]     -xmlpathinjar                      The full path to the xml file inside the
   [testng]                                        jar file (only valid if -testjar was
   [testng]                                        specified)
   [testng]                                        Default: testng.xml
   [testng] Unknown option: -d D:\OllehSpace\Ktele\test-output -sourcedir D:\OllehSpace\Ktele\bin -suitename "Ant suite" -testname "Ant test" "D:\OllehSpace\Ktele\TestNG.xml"
BUILD SUCCESSFUL
Total time: 2 seconds

I will get BUILD succes msg but script inside TestNg.xml are not running.
Can anyone help me ?

shweta.bet

Posts : 7
Join date : 2014-11-14
Age : 34

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum