Nelz's Blog

9 April 2008

Migrating from JUnit to TestNG

Filed under: Java — nelz9999 @ 12:09

I found an interesting and helpful bit of info, that I’d like to share.

My company has a bunch of older tests set up using JUnit V.3.8.1. I am trying to convert it over to TestNG.

TestNG has a page explaining the migration utility. One of the things that freaked me out was all the exceptions blown by the utility before actually adding the TestNG annotations.

Luckily, I found this article on TestNG migration this morning. The following quote explained what I was seeing:

"Note that the command will likely spit out a whole bunch of errors about classes that aren’t found; these can be safely ignored since they are emitted by javadoc which is used internally by the utility, and so cannot be suppressed. Your sources will now be annotated, and you will have a testng.xml in the src/test directory."

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

Gravatar
WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.