ant problem

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

ant problem

tarun3kumar

I am trying to run an ant test using TestNG and get the following error:

mytest:
     [echo] Running test groups mocked
   [testng] Unknown option: -suitename
   [testng] Usage:
   [testng] [-d output-directory]
   [testng]             default output directory to : test-output
   [testng] [-testclass list of .class files or list of class names]
   [testng] [-sourcedir a source directory]
   [testng] [-target 1.4 or 1.5]
   [testng]             used only with JDK1.5 to specify the annotation type used in test classes; default target: 1.5
   [testng] [-groups comma-separated list of group names to be run]
   [testng]             works only with -testclass
   [testng] [-excludegroups comma-separated list of group names to be excluded]
   [testng]             works only with -testclass
   [testng] [-testrunfactory list of .class files or list of class names implementing org.testng.ITestRunnerFactory]
   [testng] [-listener list of .class files or list of class names implementing org.testng.ITestListener and/or org.test
ng.ISuiteListener]
   [testng] [-threadcount number of threads to use]
   [testng] [suite definition files*]

   [testng] For details please consult documentation.

My testng.xml file looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="segmentation" verbose="2" annotations="JDK">
        <test name="Mock tests" annotations="JDK" verbose="2">
                <packages>
                        <package name="com.teradata.trm.segmentation.domain" />
                </packages>
        </test>
</suite>

Any help would be appreciated.

Paul Kristoff
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=61519&messageID=119570#119570


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: ant problem

Cédric Beust ♔
Hi Paul, 

Are you running the latest plug-in (5.5.0.1)?

How are you launching this test?

--
Cedric


On 1/30/07, Paul Kristoff <[hidden email]> wrote:

I am trying to run an ant test using TestNG and get the following error:

mytest:
     [echo] Running test groups mocked
   [testng] Unknown option: -suitename
   [testng] Usage:
   [testng] [-d output-directory]
   [testng]             default output directory to : test-output
   [testng] [-testclass list of .class files or list of class names]
   [testng] [-sourcedir a source directory]
   [testng] [-target 1.4 or 1.5 ]
   [testng]             used only with JDK1.5 to specify the annotation type used in test classes; default target: 1.5
   [testng] [-groups comma-separated list of group names to be run]
   [testng]             works only with -testclass
   [testng] [-excludegroups comma-separated list of group names to be excluded]
   [testng]             works only with -testclass
   [testng] [-testrunfactory list of .class files or list of class names implementing org.testng.ITestRunnerFactory]
   [testng] [-listener list of .class files or list of class names implementing org.testng.ITestListener and/or org.test
ng.ISuiteListener]
   [testng] [-threadcount number of threads to use]
   [testng] [suite definition files*]

   [testng] For details please consult documentation.

My testng.xml file looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">

<suite name="segmentation" verbose="2" annotations="JDK">
        <test name="Mock tests" annotations="JDK" verbose="2">
                <packages>
                        <package name="com.teradata.trm.segmentation.domain " />
                </packages>
        </test>
</suite>

Any help would be appreciated.

Paul Kristoff
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=61519&messageID=119570#119570


--
Cédric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: ant problem

Bill Michell-3
In reply to this post by tarun3kumar
This definitely indicates that the ant task is coming from a more recent version of testng than the command line version of testng that is being invoked by the test. You need to sort your classpaths out so that a more recent version of testng is being invoked.

On 30/01/07, Paul Kristoff <[hidden email]> wrote:

I am trying to run an ant test using TestNG and get the following error:

mytest:
    [echo] Running test groups mocked
  [testng] Unknown option: -suitename
  [testng] Usage:
  [testng] [-d output-directory]
  [testng]             default output directory to : test-output
  [testng] [-testclass list of .class files or list of class names]
  [testng] [-sourcedir a source directory]
  [testng] [-target 1.4 or 1.5]
  [testng]             used only with JDK1.5 to specify the annotation type used in test classes; default target: 1.5
  [testng] [-groups comma-separated list of group names to be run]
  [testng]             works only with -testclass
  [testng] [-excludegroups comma-separated list of group names to be excluded]
  [testng]             works only with -testclass
  [testng] [-testrunfactory list of .class files or list of class names implementing org.testng.ITestRunnerFactory]
  [testng] [-listener list of .class files or list of class names implementing org.testng.ITestListener and/or org.test
ng.ISuiteListener]
  [testng] [-threadcount number of threads to use]
  [testng] [suite definition files*]

  [testng] For details please consult documentation.

My testng.xml file looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE suite SYSTEM " http://testng.org/testng-1.0.dtd">

<suite name="segmentation" verbose="2" annotations="JDK">
       <test name="Mock tests" annotations="JDK" verbose="2">
               <packages>
                       <package name="com.teradata.trm.segmentation.domain" />
               </packages>
       </test>
</suite>

Any help would be appreciated.

Paul Kristoff
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=61519&messageID=119570#119570


--
[hidden email]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: ant problem

tarun3kumar

Cedric and Bill,

  Thank you for responding.

  I am calling ant by doing "ant mytest" at a command prompt.  The testng declaration is

        <taskdef resource="testngtasks"
                classpath="${lib.dir}/dev/testng/testng-5.4-jdk15.jar"/>

  I am not sure what plugin you were referring to, Eclipse?  If so, I am not sure what this has to do with the ant call.

Paul
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=61519&messageID=119757#119757


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: ant problem

tarun3kumar

I think I solved the problem.  It turns out that I had two testng jar files (5.2 & 5.4).  Even though I told ant to grab the 5.4 version, it was grabbing the 5.2 version (this is a guess).  Once I removed the 5.2 version from the directory, things started working again.

Paul
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=61519&messageID=119801#119801


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en
-~----------~----~----~----~------~----~------~--~---