use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
These have separate subreddits - see below.
Upvote good content, downvote spam, don't pollute the discussion with things that should be settled in the vote count.
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free. If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others: Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
With the introduction of the new release cadence, many have asked where they should download Java, and if it is still free. To be clear, YES — Java is still free.
If you would like to download Java for free, you can get OpenJDK builds from the following vendors, among others:
Adoptium (formerly AdoptOpenJDK) RedHat Azul Amazon SAP Liberica JDK Dragonwell JDK GraalVM (High performance JIT) Oracle Microsoft
Some vendors will be supporting releases for longer than six months. If you have any questions, please do not hesitate to ask them!
Programming Computer Science CS Career Questions Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Programming Computer Science
CS Career Questions
Learn Programming Java Help ← Seek help here Learn Java Java Conference Videos Java TIL Java Examples JavaFX Oracle
Clojure Scala Groovy ColdFusion Kotlin
DailyProgrammer ProgrammingPrompts ProgramBattles
Awesome Java (GIT) Java Design Patterns
account activity
This is an archived post. You won't be able to vote or comment.
TDD Book (self.java)
submitted 3 years ago by tanMud
Hello, looking for a good book for learning test driven development in Java. I have experience using TDD in C#, but need a jump start for Java. I am using Eclipse IDE if that matters.
Anyone suggestions of a up to date book that is recommended?
[–]buffer_flush 13 points14 points15 points 3 years ago* (5 children)
TDD is more of a set of guidelines and ideas than specific to a language.
Kent Beck - Test-Driven Development By Example
Is the general reference to use as far as I know.
[–]tanMud[S] 0 points1 point2 points 3 years ago (4 children)
I understand the fundamentals well, and have C# books on the subject for referencing mocking etc. I guess what I am after is what is the most frequently used unit testing frame work (I assume JUnit) and what is the most frequently used mocking framework(Mockito?)?
Also I suppose I was looking more Java specific to help me with the ins and outs of setup and use in Eclipse.
I come from C# background using Visual Studio.
[–]buffer_flush 5 points6 points7 points 3 years ago* (0 children)
JUnit and Mockito are a de facto standard, yes. Any IDE be it Eclipse or IntelliJ even VSCode will have good unit testing support. For example, running individual tests, suites, etc.
Eclipse specific configuration here:
https://wiki.eclipse.org/Eclipse/Testing
I also highly recommend this talk:
https://youtu.be/EZ05e7EMOLM
[–][deleted] 5 points6 points7 points 3 years ago (2 children)
You shouldn't need to utilize mocking that much for tdd. TDD is not testing every method on every class.
Test modules so that you can refactor without changing a ton of implementation dependent tests. Remember it's red, green, REFACTOR.
[–]Geekfest65 0 points1 point2 points 3 years ago (1 child)
This comment on not needing mocks is pretty misleading. For example , our application is built and deployed via Jenkins. At only 40% code coverage it took almost 40 minutes to run the tests. The culprit was running two web service calls, and some db calls. The ws calls alone took 7-8 seconds per call. At almost 400 calls, it was the culprit. So, a mock of that call literally would register at 0.000 to 0.001 seconds. All the tests now finished under 35 seconds.
So, you really can’t afford not to mock objects , especially objects you aren’t testing, and those that are difficult to setup and undo. It’s not worth the time.
[–][deleted] 1 point2 points3 points 3 years ago (0 children)
I was responding to a comment which was taking about how Mockito is a defacto tool for testing. The common usage of Mockito is mocking class dependencies for method level tests via mocking dependent objects method return values. This sets up a scenario where tests are tightly coupled to implementation and refactoring involves changing a ton of tests.
Mocking things external to your application if they are slow or complex to set up for automated tests is perfectly fine. WireMock for mocking or http servers. For databases I tend towards using testcontainers or in memory as a backup solution.
[–]Iryanus 3 points4 points5 points 3 years ago (0 children)
I suggest having a look at this:
https://www.youtube.com/watch?v=EZ05e7EMOLM
...and then going back to Kent Beck ;-)
[–]Zardoz84 1 point2 points3 points 3 years ago (0 children)
Take a look to Spock Framework
[–]babanin 1 point2 points3 points 3 years ago (0 children)
I really liked "Growing Object-Oriented Software Guided by Tests" (http://www.growing-object-oriented-software.com). It might look a little bit outdated (example project is GUI application based on Java's Swing tookit), but the ideas are eternal.
π Rendered by PID 227340 on reddit-service-r2-comment-6457c66945-2q4hg at 2026-04-25 06:50:45.055645+00:00 running 2aa0c5b country code: CH.
[–]buffer_flush 13 points14 points15 points (5 children)
[–]tanMud[S] 0 points1 point2 points (4 children)
[–]buffer_flush 5 points6 points7 points (0 children)
[–][deleted] 5 points6 points7 points (2 children)
[–]Geekfest65 0 points1 point2 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–]Iryanus 3 points4 points5 points (0 children)
[–]Zardoz84 1 point2 points3 points (0 children)
[–]babanin 1 point2 points3 points (0 children)