Technical Requirements

Learn about the necessary technical specifications and criteria for a project or task.

To code along—which we highly recommend—you need to set up your development environment first. This will use the excellent JetBrains IntelliJ Java IDE, a free-of-charge Java SDK from Amazon, and some libraries to help us with writing our tests and including the libraries in our Java project.

Preparing our development environment

For this project, we’ll be using the following tools:

  • IntelliJ IDEA IDE 2022.1.3 (Community Edition) or higher

  • Amazon Corretto Java 17 JDK

  • The JUnit 5 unit test framework

  • The AssertJ fluent assertions framework

  • The Gradle dependency management system

We’ll begin by installing our Java IDE, the JetBrains IntelliJ IDE Community Edition, before adding the rest of the tools.

Installing the IntelliJ IDE

JetBrains IntelliJ Java IDE is a popular IDE used in the software industry and for good reason. It combines an excellent Java editor with auto-completion and code suggestions, together with a debugger, automated refactoring support, Git source control tools, and excellent integration for running tests.

To install IntelliJ, follow these steps:

  1. Go to https://www.jetbrains.com/idea/download/.

  2. Click the tab for your operating system.

  3. Scroll down to the “Community” section.

  4. Follow the installation instructions for your operating system.

Once complete, the IntelliJ IDE should be installed on your computer. The next step is to create an empty Java project using the Gradle package management system and then set up whichever version of Java we wish to use. The installations for Mac, Windows, and Linux are usually straightforward.

Setting up the Java project and libraries

Once IntelliJ is installed, we can import the starter project provided in the accompanying GitHub repository. This will set up a Java project that uses the Amazon Corretto 17 JDK, the JUnit 5 unit test runner, the Gradle build management system, and the AssertJ fluent assertions library.

To do this, see the following steps:

  1. In your web browser, go to https://github.com/PacktPublishing/Test-Driven-Development-with-Java.

  2. Use your preferred git tool to clone the whole repository on your computer. If you use the git command-line tool, this will be as follows:

Get hands-on with 1400+ tech skills courses.