Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

jUnit versus TestNG

  • 15-03-2014 1:23pm
    #1
    Registered Users, Registered Users 2 Posts: 81,220 ✭✭✭✭


    I'm working on a project with some fellas from India and they are using TestNG in Eclipse as opposed to jUnit.
    TestNG seems to be very popular in India but not so known in Ireland?
    Is anyone using TestNG?


Comments

  • Moderators, Sports Moderators, Regional Abroad Moderators Posts: 2,666 Mod ✭✭✭✭TrueDub


    I've used it - it's no better or worse than Junit. There are things that are easier in one or the other, but it's really a personal choice sort of thing.


  • Registered Users, Registered Users 2 Posts: 159 ✭✭magooly


    Have always used JUnit up to recently when it was decided we were moving to TestNG. TestNG offers some new quirks in allowing injecting of datasets to tests that junit didn't. From listening to advocates of TestNG junit is seen as having fallen behind TestNG but I aint so sure.

    Really it just means your tests run with a different runner. I noticed very little difference only some frustration around how mocks are initialised is subtly different than in Junit. Also the TestNG folks decided to re-order the assertEquals(expected,actual) to assertEquals(actual, expected) which really pissed me off.

    Pick one and stick to it, if you mix tests in your project between testng and junit only one these sets will execute during your build leading to a scenario where many of your tests are ignored. TestNG has a migration tool to convert your exisiting junit tests to TestNG.

    To be honest I didn't think the move was worth the effort in the end.


  • Closed Accounts Posts: 8,015 ✭✭✭CreepingDeath


    magooly wrote: »
    TestNG offers some new quirks in allowing injecting of datasets to tests that junit didn't.

    We use DBUnit to inject datasets into our test cases for JUnit.


Advertisement