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?
As always, many thanks for your participation!
Monday 16 Jul 2007 | Andy | Developer Testing, JUnit, TestNG
[…] Don’t forget to take part in the latest scientific study related to test frameworks. […]
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
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.
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)!!
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.
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!
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.
I wonder why anyone would write a homegrown test framework.
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.
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.
Nelz– have you tried or considered using JBehave for BDD practices?
[…] JUnit 4.4 Released- based upon the response of the test framework poll, it appears a lot of you will download this version! […]
[…] 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%. […]
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.
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?
Right on, Alex– I should have added another choice for a combination thereof! Thanks for voting, man!
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.)
NUnit 2.4.2
I use FitLibrary as well as JUnit4.4 with JMock2 and Hamcrest
FitLibrary is “homegrown” for me
NUnit 2.*.*
NUnitForms
FitNesse
Watir
[…] 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. […]