Hello,
I have download the install TestNg and Eclipse Indigo on my Window machine. I am having problem configuring TestNg with Eclipse Indigo. I already install the TestNg plugin from Eclispe. click Help > Install New Software > work with:http://beust..com/eclipse/click add/select TestNg. After installation completed > restart the eclipse > Click dropdown run did not see the TestNg. Need help configure!!!
Thanks,
Neville
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/U45UBaKWBf4J.
To post to this group, send email to testng...@googlegroups.com.
To unsubscribe from this group, send email to testng-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Thanks & Regards,
DAYANANDA REDDY CHALLA
The sooner you fall behind, the more time you'll have to catch up.
Hi
I have the following testng.xml:
<suite>
<test name="test-name">
<classes>
<class name="A" />
</classes>
</test>
</suite>
And when executed (from eclipse) I get the following exception:
[TestNG] Reporter org.testng.reporters.XMLReporter@1ded0fd failed
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at java.util.Properties.setProperty(Unknown Source)
at org.testng.reporters.XMLReporter.getSuiteAttributes(XMLReporter.java:147)
at org.testng.reporters.XMLReporter.writeSuiteToBuffer(XMLReporter.java:113)
at org.testng.reporters.XMLReporter.writeSuite(XMLReporter.java:85)
at org.testng.reporters.XMLReporter.generateReport(XMLReporter.java:62)
at org.testng.TestNG.generateReports(TestNG.java:1064)
at org.testng.TestNG.run(TestNG.java:1023)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
[TestNG] Reporter org.testng.reporters.SuiteHTMLReporter@21b6d failed
java.lang.NullPointerException
at java.util.Hashtable.put(Unknown Source)
at java.util.Properties.setProperty(Unknown Source)
at org.testng.xml.XmlSuite.toXml(XmlSuite.java:452)
at org.testng.reporters.SuiteHTMLReporter.generateXmlFile(SuiteHTMLReporter.java:91)
at org.testng.reporters.SuiteHTMLReporter.generateReport(SuiteHTMLReporter.java:76)
at org.testng.TestNG.generateReports(TestNG.java:1064)
at org.testng.TestNG.run(TestNG.java:1023)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
It took me some time to realize what I did wrong. I couldn’t tell much from the exception message. But I finally realized I had missed the “name” attribute in the <suite> tag. Can this behavior be changed and a better error message provided? Do I need to write some tracker for this?
For an example, if I forget to add the “name” attribute within the <test> tag, there’s a very good error message. Would it be possible to get a similar error message, when “name” attribute is missing from <suite> tag? This is what the exception looks like when “name” is missing from <test> tag:
org.testng.TestNGException:
Test <test> element must define the name attribute
at org.testng.xml.TestNGContentHandler.xmlTest(TestNGContentHandler.java:252)
at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:487)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17)
at org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10)
at org.testng.xml.Parser.parse(Parser.java:170)
at org.testng.TestNG.initializeSuitesAndJarFile(TestNG.java:304)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:86)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
RemoteTestNG finishing: 0 ms
With testng.xml
<suite name="suite-name">
<test>
<classes>
<class name="A" />
</classes>
</test>
</suite>
Regards,
Alex
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
Just tested it and it looks great!