Alex Blewitt wrote:
On 06/07/06, Richard Liang <[EMAIL PROTECTED]> wrote:

It seems that you're very familiar with TestNG.  ;-) So would you please
identify what we shall do to transfer from junit to TestNG? Thanks a lot.

Me? I'm just highly opinionated :-)

Hi Alex,

I think we are all pretty much in the TestNG novice category :-)



There's guidelines for migrating from JUnit to TestNG at the home page:
http://testng.org/doc/migrating.html

"Here is a sample use that will convert all the JUnit tests in the
src/ directory to TestNG:

java org.testng.JUnitConverter -overwrite -annotation -srcdir src"

:-)


I have done some private experimentation with this command line utility and it seems to work well. In the first instance it would be good to preserve the JUnit "nature" of the tests - i.e. still have the test classes extend from JUnit TestCase etc - so that there is always a backwards migration path. That's me being paranoid. Note that the equivalent migration functionality in the latest TestNG plug-in for Eclipse did not allow that but, in addition to adding in the annotations, insisted on removing the inheritance from TestCase.


There's also instructions about how to set it up with an Ant-based build:
http://testng.org/doc/ant.html

I'll see if I can migrate the tests I've got in the Pack200 dir to use
TestNG, so that you can see what it looks like. Unfortunately, I doubt
that I'm going to be able to get to that much before 2 weeks time due
to other outstanding commitments ...

Alex.

Although we haven't gotten round to discussing specifics yet, it is probably timely to mention here that using the TestNG annotations approach (as opposed to the pre-1.5 Javadoc comments approach) will not work so long as we are compiling Harmony code with the "jsr14" target. It looked like the annotation metadata did not make it into the generated class files (at least this is what I saw in my own experiments). If we want to use the annotations approach we will have to wait until we move up to compiling for a 1.5 target. Hopefully that will not be too long now......

In the meantime you could try out using the Javadoc comments approach, just to get a feel for how things run. The downside to that is that your test source needs to be available at runtime so that the comments are available for the framework to examine.

Best regards,
George


---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to