Poll: which test framework do you use?

I’m finding more and more people are using TestNG and JUnit 4, so I’m curious to see what this copasetic poll brings. This is, obviously, Java specific and does make the assumption you actually write tests, man– of course, you can always select the last option if that’s you.

Also, if you are using another hip framework not listed, I’m interested in hearing about it! Leave a comment, man.

Which test framework do you use?
View Results

As always, many thanks for your participation!

21 Responses to “Poll: which test framework do you use?”


  1. […] Don’t forget to take part in the latest scientific study related to test frameworks. […]

  2. on 16 Jul 2007 at 6:43 am Kocka

    Hmm, I hoped that I can vote 3 times :)
    junit 3.8 if I do not care
    junit 4.x if I can spend time on overriding the default maven archetype-project
    testNG if I have time for it and noone else work on the project

  3. on 16 Jul 2007 at 7:33 am Tobias

    Ideally only TestNG, but sometimes Maven and TestNG won’t work together well, esp. if you have a mixed environment (JUnit and TestNG). But with Maven you can always configure TestNG, it will run JUnit tests as well.

  4. on 16 Jul 2007 at 6:31 pm Andy

    Yeah, that’s another thing I’m seeing– I mix of hip frameworks (that also happens to be me). I also find the statement “junit 3.8 if I do not care” interesting as it is also what I hear when I talk to people sometimes– the xUnit mindset has been adopted by a lot of people and it works for them, hence, why go through the trouble of using something else…

    Thanks for your comments (and votes)!!

  5. on 16 Jul 2007 at 11:00 pm Robert Fischer

    JUnit 4 saves a lot of hassle over JUnit 3, so I pretty much always use it.

    I’ve never been annoyed by xUnit, and I’ve often been pleased with its ubiquitous support. So that’s why I use it, and I haven’t even looked into TestNG.

  6. on 17 Jul 2007 at 12:36 am Andy

    Thanks for your input, man. After I wrote one of my TestNG articles a reader wrote me and said that the pain of JUnit wasn’t enough for him to switch. Interesting that at this point (July 16) that TestNG and JUnit 4 are neck and neck. Perhaps it has something to do with annotations– if are going to “upgrade” from JUnit 3, I wonder if more people are giving TestNG a try?

    Thanks for participating, Robert!

  7. on 17 Jul 2007 at 12:29 pm Kocka

    Tobias: Earlyer there were problems with maven surefire plugin, but I think these problems are already solved, and it works just fine for me…
    I usualy do not use TestNG if others work on the project, because it is not as much supported by IDEs as junit.

  8. on 17 Jul 2007 at 12:43 pm Kocka

    I wonder why anyone would write a homegrown test framework.

  9. on 17 Jul 2007 at 5:39 pm Nelz

    We are starting a new project and I am pushing for TestNG, or JUnit4 at the very least… I am thinking about adopting some of the BDD practices (”should” prefix, etc…), and JUnit 3.X just isn’t capable of playing well with that.

  10. on 18 Jul 2007 at 2:02 am Andy

    Kocka- I’ve run across a few homegrown frameworks before– usually around older systems that approached testing before JUnit become hip. I haven’t seen one that is as simple as the xUnit paradigm though.

  11. on 19 Jul 2007 at 1:15 am Andy

    Nelz– have you tried or considered using JBehave for BDD practices?


  12. […] JUnit 4.4 Released- based upon the response of the test framework poll, it appears a lot of you will download this version! […]

  13. on 23 Jul 2007 at 3:07 pm Test Early » Embracing JUnit 4

    […] JUnit 4 has been on the streets for almost 2 years and it appears that it is readily being embraced based upon the data thus far gathered from an informal poll. While it’s no surprise that a majority of respondents (40%) are still using the bellwether of developer testing (JUnit 3.8.x), it is rather impressive that the second most popular framework is JUnit 4 at 33%. […]

  14. on 23 Jul 2007 at 3:31 pm Nelz

    Andy - I did look into it a bit, but I am definitely an ‘early adopter’ on testing tech in my company. The majority of my team (and some of the management) is only now arriving late in the game to testing… And they are very reluctant to embrace a newer framework. I succeeded in getting TestNG adopted only because of it’s integration testing lifecycle abilities, and then pushing for a reduced cognitive load by using the same framework for unit testing.

  15. on 23 Jul 2007 at 5:39 pm Alex Ruiz

    I would vote for both TestNG and JUnit 4. At my day job we use JUnit just because it is a “standard.” On the other hand, on my own personal/open source project(s), I use TestNG for the following reasons:
    1. “Dependent tests”…eliminates a lot of noise
    2. More flexible, e.g. @BeforeClass methods don’t need to be static
    Is it valid to vote for both frameworks? :)

  16. on 24 Jul 2007 at 12:54 am Andy

    Right on, Alex– I should have added another choice for a combination thereof! Thanks for voting, man!

  17. on 10 Aug 2007 at 2:02 pm Adrian Howard

    What about us dynamic language folk! Recently I’ve been using:
    * JavaScript’s JSUnit
    * Ruby’s Test::Unit.
    * Perl’s Test::Builder/Harness based framework (Test::More, Test::Class, etc.)

  18. on 10 Aug 2007 at 3:58 pm Andrew Badera

    NUnit 2.4.2

  19. on 11 Aug 2007 at 3:17 pm Rick Mugridge

    I use FitLibrary as well as JUnit4.4 with JMock2 and Hamcrest

    FitLibrary is “homegrown” for me :-)

  20. on 11 Aug 2007 at 7:52 pm Dale Emery

    NUnit 2.*.*
    NUnitForms
    FitNesse
    Watir


  21. […] If you are using another trippin’ framework instead of NUnit (like MSTest, etc) let me know if you plan on jumping ship as well. And if the term NUnit is strangely foreign to you, man, you may have better luck at the Java test framework poll. As always, copious thanks for participating in this most scientific poll. […]

Trackback this Post | Feed on comments to this Post

Leave a Reply