Eclipse problem

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

Eclipse problem

tarun3kumar

I am trying to run a testNG test in Eclipse and get the following problem:

org.xml.sax.SAXParseException: The element type "groups" must be terminated by the matching end-tag "</groups>".
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1219)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:176)
        at org.testng.xml.Parser.parseOneFile(Parser.java:261)
        at org.testng.xml.Parser.parse(Parser.java:158)
        at org.testng.TestNG.setTestSuites(TestNG.java:491)
        at org.testng.TestNG.configure(TestNG.java:1061)
        at org.testng.remote.RemoteTestNG.configure(RemoteTestNG.java:49)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:120)
WARNING: No test suite found.  Nothing to run

The code 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">
                <groups>
                        <exclude name="broken" />
                        <include name="mock" />
                        </run>
                </groups>
                <packages>
                        <package name="com.domain" />
                </packages>
        </test>
</suite>

If I remove the </run> from the xml file, the test runs but I it ignores the "mock" groups.

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


--~--~---------~--~----~------------~-------~--~----~
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: Eclipse problem

Cédric Beust ♔
Paul,

There is an error in your XML file, it needs a <run> as shown in bold:

               <groups>
                       <run>
                        <exclude name="broken" />
                       <include name="mock" />
                       </run>
               </groups>

--
Cedric


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

I am trying to run a testNG test in Eclipse and get the following problem:

org.xml.sax.SAXParseException: The element type "groups" must be terminated by the matching end-tag "</groups>".
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException (ErrorHandlerWrapper.java:236)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (XMLErrorReporter.java:386)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java :1438)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1219)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch (XMLDocumentFragmentScannerImpl.java:1685)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse (XML11Configuration.java:834)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java :148)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
        at javax.xml.parsers.SAXParser.parse (SAXParser.java:176)
        at org.testng.xml.Parser.parseOneFile(Parser.java:261)
        at org.testng.xml.Parser.parse(Parser.java:158)
        at org.testng.TestNG.setTestSuites(TestNG.java:491)
        at org.testng.TestNG.configure(TestNG.java:1061)
        at org.testng.remote.RemoteTestNG.configure(RemoteTestNG.java:49)
        at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:120)
WARNING: No test suite found.  Nothing to run

The code 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">
                <groups>
                        <exclude name="broken" />
                        <include name="mock" />
                        </run>
                </groups>
                <packages>
                        <package name="com.domain" />
                </packages>
        </test>
</suite>

If I remove the </run> from the xml file, the test runs but I it ignores the "mock" groups.

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


--
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: Eclipse problem

tarun3kumar

Cedric,

  It worked.

  Thanks,

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


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---