如何在Eclipse中以包级别运行scalatest [英] how to run scalatest at package level in Eclipse
本文介绍了如何在Eclipse中以包级别运行scalatest的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
警告:-p已被弃用,将被重用对于ScalaTest 2.0中的一个不同的(但仍然很酷)的目的。请更改-p到-R的所有用途。
运行启动。预期测试次数为:0
DiscoverySuite:
运行在57毫秒内完成。
运行的测试总数:0
套件:完成1,中止0
测试:成功0,失败0,忽略0,挂起0
所有测试通过。
那么还需要做什么,我可以在包中运行所有的测试? / p>
解决方案
这是盲人领导盲人,但是我发现,当你将测试类移动到同一个包中时
奇怪的。
I'm using ScalaTest in Eclipse (Juno) with Scala 2.10, and the RunConfigurations window has the ability to run a test file, a test suite, or a test package. When I right click on a package name in the explorer window, there is an option to run the package (thereby running all the tests in that package). However, when I do that, no tests run and it displays this:
WARNING: -p has been deprecated and will be reused for a different (but still very cool) purpose in ScalaTest 2.0. Please change all uses of -p to -R.
Run starting. Expected test count is: 0
DiscoverySuite:
Run completed in 57 milliseconds.
Total number of tests run: 0
Suites: completed 1, aborted 0
Tests: succeeded 0, failed 0, ignored 0, pending 0
All tests passed.
So, what else do I need to do so I can run all the tests in the package?
解决方案
This is the blind leading the blind, but what I found was that when you move the test classes into the same package as the tested classes, then the discovery works.
Weird.
这篇关于如何在Eclipse中以包级别运行scalatest的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文