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

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

问题描述

我一直在寻找 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插件可能适合你.

能力(来自其网站):

  • 装饰有测试用例的类.
  • 在编辑器中标记正在测试的方法.
  • 通过菜单或快捷方式跳转到编辑器中的测试用例/测试方法.
  • 重命名类/方法和moreUnit也会重命名相应的测试代码.
  • 移动类和 moreUnit 将移动相应的测试.
  • 通过菜单或快捷方式为编辑器中光标位置下的方法生成测试方法存根.

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

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