开发者

TestNG Eclipse plug-in : How to change the name prefix of methods for [New -> TestNG Class]?

Preferred

@Test
public void testMethodName() {} // [New -> JUnit Test Case]

than

@Test
public void methodName() {} // [New -> TestNG Class]

I could achieve what I want by following steps :

  1. [New -> JUnit Test Case].
  2. Quick Assist : Conve开发者_运维百科rt to TestNG (Annotations)

Any easier way ?


This would be pretty easy to add but I'm not sure how useful it really is: ultimately, you will want to rename your method to describe what it actually does as a test. For example, a method called createAccount() should probably be tested with a test method called accountShouldBeCreated().

Also, a single method usually ends up being tested by more than one test method: accountShouldBeCreated(), alreadyExistingAccountShouldNotBeAllowed(), etc...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜