JUnit 无法启动 JUnit 插件测试。为什么?
我第一次尝试 Junit,点击以下链接: http://www.vogella.de/articles/JUnit/article.html
当我将 testClass 作为 Run-As-> 运行时联合测试。下面说的事情。 请帮我弄清楚。
Could not launch the JUnit plug-in tests because project 'SalesTax'
is not a plug-in project.
SalesTax:是项目名称
First time I am trying Junit and I am following below link:
http://www.vogella.de/articles/JUnit/article.html
When I run my testClass as Run-As-> Junit Test. It says below thing.
Please help me in figure it out.
Could not launch the JUnit plug-in tests because project 'SalesTax'
is not a plug-in project.
SalesTax: Is the Project Name
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我怀疑您确实创建了一个 Eclipse 'jUnit Plugin Test' 启动配置,该配置旨在运行 Eclipse 插件 jUnit 测试(在某种模拟的 Eclipse 环境中)。
尝试创建一个简单的“jUnit”启动配置。
I suspect you did create an Eclipse 'jUnit Plugin Test' launch configuration which is designed to run Eclipse plugins jUnit tests (in some kind of mocked eclipse environment).
Try to create a simple 'jUnit' launch configuration instead.
建议 - 按照教程进行操作。输入教程中的(3 行)示例“MyClassTest”。验证您是否可以使教程正常运行。如果对本教程有任何疑问,请回复。
一旦您获得一个完整的端到端示例(您的代码、JUnit 测试代码以及在 IDE 中成功构建和执行至少一个 JUnit 测试),然后尝试让您的“SalesTax”项目正常运行。
问:我猜您正在使用 Eclipse,对吗?日食3.7?
PS:
这是另一个很好的教程:
http://www.ibm.com/developerworks /java/tutorials/j-junit4/
Suggestion - Follow the tutorial. type in the (3-line) example "MyClassTest" from the tutorial. Verify that you can get the tutorial working. Post back with any questions about the tutorial.
Once you get one complete example working, end-to-end (your code, your JUnit test code, and successfully building and executing at least one JUnit test in your IDE), then try to get your "SalesTax" project working.
Q: I presume you're using Eclipse, correct? Eclipse 3.7?
PS:
Here's another good tutorial:
http://www.ibm.com/developerworks/java/tutorials/j-junit4/