What steps will reproduce the problem?
1. create an empty project in Eclipse, having testNg plugin installed
"org.testng.eclipse_5.7.0.1"
2. add a new class, assign TestNg Jar "testng-jdk15.jar
" in build path of project
3. type following code in class
import org.testng.annotations.*;
public class TestNg {
@Test
public void test1(){
System.out.println("Test");
}
}
4. Right select the function in package explorer and click "RunAs" ->
"TestNg Test"
What is the expected output? What do you see instead?
Expected Output: Test (printed on console)
what i see: Exception in thread "main" java.lang.NullPointerException
at
org.testng.xml.TestNGContentHandler.resolveEntity(TestNGContentHandler.java:73)
at
com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(Unkn
own
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(
Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatc
h(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(Un
known
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next
(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown
Source)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocum
ent(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(Unknow
n
Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
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:472)
at org.testng.TestNG.configure(TestNG.java:882)
at org.testng.remote.RemoteTestNG.configure(RemoteTestNG.java:49)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:122)
What version of the product are you using? On what operating system?
Eclipse: Version: 3.3.1.1
Build id: M20071023-1652
org.testng.eclipse_5.7.0.1
lib: testng-jdk15.jar
Please provide any additional information below.
1) Only two libraries in build path
- JRE System
- TestNG
2) The xml generated by TestNg for the above test case is as follows
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Test">
<test verbose="2" name="TestNg" annotations="JDK">
<classes>
<class name="TestNg"/>
</classes>
</test>
</suite>
screen shots attached
-VICKEY SACHDEVA
Original issue reported on code.google.com by VickeySa...@gmail.com on 1 Feb 2008 at 8:16
Original issue reported on code.google.com by
VickeySa...@gmail.com
on 1 Feb 2008 at 8:16Attachments: