I switched several projects from JUnit 3 to TestNG. After some minor problems with the fact that TestNG doesn’t seperate tests as JUnit does per default, everything works in IDEA and Maven. But whatever I tried, I can’t get TestNG to work with Ant. The TestNG Ant task just doesn’t find any tests. I used testjar, dir, includes and it also doesn’t help that the TestNG documentation is sparse and misleading. I moved Messages to TestNG too, but without Ant support this will not be released. Everything works fine, just Ant doesn’t. If I can’t get it working, I’ll give Junit 4 a try.


5 Responses to “Why, oh why, doesn't TestNG work for me?”  

  1. Gravatar Icon 1 Alex Popescu

    Hi Stephan!

    I am wondering what may be wrong because Ant task is the oldest supported by TestNG and evolved all the time. Maybe you can drop an email to user list or if this is not possible drop me an offline message. I am sure we can make it work for you. And I am sure that TestNG will work well for you (or at least this is what I expect ;-) ).

    ./alex

    .w( the_mindstorm )p.

    (TestNG co-founder)
    (http://themindstorms.blogspot.com)

  2. Gravatar Icon 2 stephan

    Thanks. Dropped a mail. Great support :-)

  3. Gravatar Icon 3 stephan

    Thanks. Problem solved with your feedback :-)

  4. Gravatar Icon 4 Alex Popescu

    Glad to hear! Please feel free in future to get to me or to the TestNG user lists. Our support tries
    always to be this way ;-).

    ./alex

    .w( the_mindstorm )p.

    (http://themindstorms.blogspot.com)

  5. Gravatar Icon 5 Rinki Goyal

    Hello,
    I am also facing the same following problem :
    I switched several projects from JUnit 3 to TestNG. After some minor problems with the fact that TestNG doesn’t seperate tests as JUnit does per default, everything works in IDEA and Maven. But whatever I tried, I can’t get TestNG to work with Ant. The TestNG Ant task just doesn’t find any tests. I used testjar, dir, includes and it also doesn’t help that the TestNG documentation is sparse and misleading. I moved Messages to TestNG too, but without Ant support this will not be released. Everything works fine, just Ant doesn’t. If I can’t get it working, I’ll give Junit 4 a try.
    .
    Can anyone provide solution for the same

    Thanks & Regards
    Rinki

Leave a Reply



RSS