in "junit v testng: managing external dependencies," the founders of zutubi discuss how junit and testng both manage reliance on external resources, with testng having a huge advantage due to some annotati features. how do you solve resolution of external dependencies with either framework?

in junit3, they describe two possibilities: is having an assertion that looks for the resource and fails upon not finding it, which tends to yield large stack traces; an alternative is to use a decorator that checks the resource, but this has the disadvantage of being fairly invasive for every test.

in testng, the @test annotation can include dependencies on other methods; if the other methods fail, then tests with those dependencies w run. this makes for a more clean implementation and runtime, compared to the junit 3 implementation.

from the post:
given these results, i certainly prefer the testng solution. the output is clear and the association of dependencies to tests is defined with each test case and on a per test basis, not on the per class basis as with junit. now if i was using testng. maybe it is time to run the junittotestngc

i am curious to know if other people run into this issue? and if so, how do you solve it? maybe you do of the above, or have written custom annotati or extended junit. please let me know, i would love to hear about it.