2014-02-27 24 views
2
  1. 我有一個名爲OneReports在Eclipse項目。在項目中,我有一個名爲測試的軟件包。
  2. 項目如下:enter image description here錯誤 - TestngTestSuiteUsingXML.java:6:錯誤:包org.testng不存在

  3. ,同時運行在Eclipse中** ** TestngTestSuiteUsingXML Java文件則取該的test.xml,它是工作的罰款。

但是,當我驗證了命令提示符得到錯誤一樣如下:

C:\Jars>javac TestngTestSuiteUsingXML.java 
TestngTestSuiteUsingXML.java:6: error: package org.testng does not exist 
import org.testng.TestNG; 
^ 

TestngTestSuiteUsingXML.java:7: error: package org.testng.xml does not exist 
import org.testng.xml.XmlSuite; 
^ 
TestngTestSuiteUsingXML.java:15: error: cannot find symbol 
XmlSuite suite = new XmlSuite(); 
^ 
symbol: class XmlSuite 
location: class TestngTestSuiteUsingXML 
TestngTestSuiteUsingXML.java:15: error: cannot find symbol 
XmlSuite suite = new XmlSuite(); 
^ 
symbol: class XmlSuite 
location: class TestngTestSuiteUsingXML 
TestngTestSuiteUsingXML.java:17: error: cannot find symbol 
List<XmlSuite> suites = new ArrayList<XmlSuite>(); 
^ 
symbol: class XmlSuite 
location: class TestngTestSuiteUsingXML 
TestngTestSuiteUsingXML.java:17: error: cannot find symbol 
List<XmlSuite> suites = new ArrayList<XmlSuite>(); 
^ 
symbol: class XmlSuite 
location: class TestngTestSuiteUsingXML 
TestngTestSuiteUsingXML.java:19: error: cannot find symbol 
TestNG tng = new TestNG(); 
^ 
symbol: class TestNG 
location: class TestngTestSuiteUsingXML 
TestngTestSuiteUsingXML.java:19: error: cannot find symbol 
TestNG tng = new TestNG(); 
^ 
symbol: class TestNG 
location: class TestngTestSuiteUsingXML 
8 errors 
+0

任何人都可以請幫我解決這個問題 – Amirdha

回答