Eclipse Testng 插件 5.14.6.20110125_1620 有问题
将插件更新到 5.14.6.20110125_1620 后,在 eclipse 上运行 testng 测试时开始出现问题。我收到此类错误:
启动 AdvanceSearchToCheckoutPage 时遇到问题。单击对话框详细信息显示“在以下过程中发生内部错误:“启动 AdvanceSearchToCheckoutPage”。 在类路径中找不到类:sandy.selenium.testng.SearchToCheckoutNav.AdvanceSearchToCheckoutPage”
注意此测试前一天运行得非常好。我如何运行我的测试?我右键单击该测试并选择以 testng 运行。现在我想恢复到我的旧插件版本并遇到各种问题
当需要塞德里克时他在哪里
?
org.testng.TestNGException: 在类路径中找不到类:alibris.selenium.testng.SearchToCheckoutNav.AdvanceSearchToCheckoutPage 在 org.testng.xml.XmlClass.loadClass(XmlClass.java:72) 在 org.testng.xml.XmlClass.init(XmlClass.java:64) 在 org.testng.xml.XmlClass.(XmlClass.java:50) 在 org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:503) 在 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) 在 com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767) 在com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1363) 在 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755) 在 com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) 在com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511) 在 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808) 在 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) 在 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119) 在com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) 在 com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) 在 javax.xml.parsers.SAXParser.parse(SAXParser.java:395) 在javax.xml.parsers.SAXParser.parse(SAXParser.java:198) 在 org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:17) 在 org.testng.xml.SuiteXmlParser.parse(SuiteXmlParser.java:10) 在 org.testng.xml.Parser.parse(Parser.java:153) 在 org.testng.eclipse.util.CustomSuite.createXmlFileFromTemplate(CustomSuite.java:150) 在 org.testng.eclipse.util.CustomSuite.createContentBuffer(CustomSuite.java:105) 在 org.testng.eclipse.util.CustomSuite.getSuiteBuffer(CustomSuite.java:222) 在 org.testng.eclipse.util.CustomSuite.save(CustomSuite.java:241) 在org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.createVMRunner(TestNGLaunchConfigurationDelegate.java:238) 在org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launchTypes(TestNGLaunchConfigurationDelegate.java:109) 在org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchConfigurationDelegate.java:67) 在 org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853) 在 org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702) 在 org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923) 在 org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126) 在 org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Started getting issues running my testng tests on eclipse after updating plugin to 5.14.6.20110125_1620. I get error of this sort:
Launching AdvanceSearchToCheckoutPage has encountered a problem. Clicking dialog details say "internal error occurred during: "Launching AdvanceSearchToCheckoutPage".
Cannot find class in classpath: sandy.selenium.testng.SearchToCheckoutNav.AdvanceSearchToCheckoutPage"
Note this test was running perfectly fine day before. How do I run my test? I right-click the test and select run as testng. Now i want to revert to my old plugin version and running into all kinds of issues
Where is cedric when he is needed?
heres the stacktrace
org.testng.TestNGException:
Cannot find class in classpath: alibris.selenium.testng.SearchToCheckoutNav.AdvanceSearchToCheckoutPage
at org.testng.xml.XmlClass.loadClass(XmlClass.java:72)
at org.testng.xml.XmlClass.init(XmlClass.java:64)
at org.testng.xml.XmlClass.(XmlClass.java:50)
at org.testng.xml.TestNGContentHandler.startElement(TestNGContentHandler.java:503)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:767)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1363)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)
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:153)
at org.testng.eclipse.util.CustomSuite.createXmlFileFromTemplate(CustomSuite.java:150)
at org.testng.eclipse.util.CustomSuite.createContentBuffer(CustomSuite.java:105)
at org.testng.eclipse.util.CustomSuite.getSuiteBuffer(CustomSuite.java:222)
at org.testng.eclipse.util.CustomSuite.save(CustomSuite.java:241)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.createVMRunner(TestNGLaunchConfigurationDelegate.java:238)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launchTypes(TestNGLaunchConfigurationDelegate.java:109)
at org.testng.eclipse.launch.TestNGLaunchConfigurationDelegate.launch(TestNGLaunchConfigurationDelegate.java:67)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:853)
at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:702)
at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:923)
at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1126)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我从未走远。
缺少的类似乎表明这不是 TestNG 问题。旧版本的插件运行正常吗?
I'm never far.
The missing class seems to indicate this is not a TestNG issue. Is it running fine with an older version of the plug-in?
这一行告诉您,当您将代码作为 testNG 测试用例运行时,Eclipse 不知道在哪里编译代码。
有多种解决方案可以完成,但最适合我的一个是,您必须将项目添加到类路径中,
希望这张图片也有帮助
图片
This line is telling you that eclipse doesnt know where to look to compile your code when your run it as testNG test case.
There are multiple solution that can be done but the one that works for me most of the time is that you have to add your project to class path
hope this image also helps
Image