3 ms·
Only 57% of programmers surveyed say they write unit tests in any language (https://www.jetbrains.com/lp/devecosystem-2021/testing/ https://www.jetbrains.com/lp
by armchairhacker 5y ago
Only 57% of programmers surveyed say they write unit tests in any language (https://www.jetbrains.com/lp/devecosystem-2021/testing/ https://www.jetbrains.com/lp/devecosystem-2021/testing/). In Javascript only ~60% of developers test, and in Swift/ObjC only ~40%.
Surprisingly 93% of Java users surveyed write unit tests though. I thought Kotlin would be similar, but for some reason JetBrains doesn't show any responses for Kotlin users.
- gravypod 5y agoI'd love to see an age distribution of Java develops vs the other languages. My impression is more experienced developers test their code more often. My other impression is some other developers have large egos and think "I don't need to write tests because I know how to test my code and everything I ship works".
- johncena33 5y ago> My impression is more experienced developers test their code more often. Java percentage is unit test is so high most probably because it's an enterprise language. And the whole unit test craze started with Java and jUnit.
- gravypod 5y ago> Java ... because it's an enterprise language I'm not sure that's the main factor. Compared to C# & C++? I don't think "enterprise" has much to do with it.
- ivanche 5y agoI'm sure that "unit test craze" has absolutely nothing to do with Smalltalk, SUnit, Kent Beck and the year 1989. /s
- TeMPOraL 5y agoI think it's even simpler than Java being an enterprise language. Java is a language with a simple grammar and got a working reflection system early on - both facilitated creation of supporting tooling like test coverage reports embedded in the IDE. It's much easier to cover more code with tests when your IDE makes it almost effortless, and constantly reports how well you're doing. And the easier something is, the more often people do it.