Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Later
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I have been messing with TestNG and I think we should switch to it. It is very similar to junit 4 with annotations, but it supports several features which would allow our build to become slightly more sane:

      • test groups allow us to separate slow/fast tests from each other
      • surefire support for running specific groups would allow 'check in tests' vs 'hudson/integration tests' (ie fast/slow)
      • it supports all the features of junit 4, plus it is VERY similar, making for the transition easy.
      • they have assertEquals(byte[],byte[])

        Activity

        Hide
        Gary Helmling added a comment -

        +1, the test grouping alone seems worth it. Would be really nice to have a relatively fast "smoke test" group vs. the full 1.5 hr suite.

        But agree we should discuss on the dev list.

        Show
        Gary Helmling added a comment - +1, the test grouping alone seems worth it. Would be really nice to have a relatively fast "smoke test" group vs. the full 1.5 hr suite. But agree we should discuss on the dev list.
        Hide
        stack added a comment -

        I'd suggest you lads bring this up on the mailing list (Discussion inside issues is seen by a few only). If no objection, a patch and we're up on TestNG.

        Show
        stack added a comment - I'd suggest you lads bring this up on the mailing list (Discussion inside issues is seen by a few only). If no objection, a patch and we're up on TestNG.
        Hide
        Lars Francke added a comment -

        For what it's worth I too am in favor of TestNG over JUnit. And as Ophir mentioned: The migration path is pretty easy.

        Show
        Lars Francke added a comment - For what it's worth I too am in favor of TestNG over JUnit. And as Ophir mentioned: The migration path is pretty easy.
        Hide
        Ophir Cohen added a comment -


        I'm working with TestNG for more than 4 years and to my humble opinion its much better than JUnit.

        My favourite features (and the main reasons for me to work with TestNG):

        1. Data providers - decoupling data from logic is always good idea, but in here its great: you write one test and run it few times with different data each time or, alternatively, you run few test with the same data.

        2. Groups - simple way to groups test and, as Ryan mention, to make the slow test run only in the nightly build etc...

        PS
        No migration need, the TestNG configuration knows to take JUnit test and run them.

        Show
        Ophir Cohen added a comment - I'm working with TestNG for more than 4 years and to my humble opinion its much better than JUnit. My favourite features (and the main reasons for me to work with TestNG): 1. Data providers - decoupling data from logic is always good idea, but in here its great: you write one test and run it few times with different data each time or, alternatively, you run few test with the same data. 2. Groups - simple way to groups test and, as Ryan mention, to make the slow test run only in the nightly build etc... PS No migration need, the TestNG configuration knows to take JUnit test and run them.
        Hide
        Lars George added a comment -

        +1, they also have injection support, which can be used to specify data providers to create test data based on the method name calling on the injection.

        Show
        Lars George added a comment - +1, they also have injection support, which can be used to specify data providers to create test data based on the method name calling on the injection.

          People

          • Assignee:
            Unassigned
            Reporter:
            ryan rawson
          • Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development