Eclipse函数/插件找到相应的junit类? [英] Eclipse function/plugin that finds corresponding junit class?

查看:119
本文介绍了Eclipse函数/插件找到相应的junit类?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在搜索高低的Eclipse功能,让您右键单击主源类并找到相应的JUnit类,而无需浏览我的项目的测试类。我正在使用Mylyn,这有助于减少杂乱,但是如果有自动执行查找的功能会更容易。

I've been searching high and low for an Eclipse feature that lets you right-click on a main source class and find the corresponding JUnit class(es), without me having to navigate through the test classes of my project. I am using Mylyn which helps reduce the clutter but it would be much easier if there was a feature that performs a find automagically.

我遵循Maven标准目录布局( / src / main / java / src / test / java 等)。我所有的测试类都被命名为 * Test 。我想象这可以被可行地实现,可能已经存在。

I am following the Maven standard directory layout (/src/main/java, /src/test/java, etc.). And all of my test classes are named *Test. I'd imagine this can be feasibly implemented and probably already exists.

Eclipse中是否有一个功能或插件,可以为给定的主类找到相应的JUnit测试类?

Is there a function or plugin in Eclipse that finds the corresponding JUnit test classes for a given main class?

推荐答案

moreUnit 插件可能适合你。

功能(来自其网站):


  • 装饰有测试用例的类

  • 在编辑器中标记正在测试的方法。

  • 通过菜单或快捷方式跳转到编辑器中的testcase / testmethod。 / li>
  • 重命名类/方法和moreUnit将重命名相应的测试代码。

  • 移动类和moreUnit将移动相应的测试。

  • 通过菜单或快捷方式在编辑器中为cursor-position下的方法生成testmethod存根。

  • Decorate classes which have a testcase.
  • Mark methods in the editor which are under test.
  • Jump to a testcase/testmethod in the editor via the menu or a shortcut.
  • Rename classes/methods and moreUnit will rename the corresponding testcode too.
  • Move classes and moreUnit will move the corresponding tests.
  • Generate a testmethod stub for the method under cursor-position in the editor via the menu or a shortcut.

这篇关于Eclipse函数/插件找到相应的junit类?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆