A kata starter project (skeleton) to practice test-driven development.
This short guide describes:
- Tools you'll need to get started
- How to use this repository template
- How to set up your local kata project
- How to get started with your kata
This starter project uses the Java programming language.
Before getting started, ensure you have Java 17 LTS (or higher) installed locally. The following commands should output the version of Java installed.
$ javac -version
javac 17.0.4
$ java -version
openjdk version "17.0.4" 2022-07-19 LTS
OpenJDK Runtime Environment Zulu17.36+13-CA (build 17.0.4+8-LTS)
OpenJDK 64-Bit Server VM Zulu17.36+13-CA (build 17.0.4+8-LTS, mixed mode, sharing)
If you do not have Java installed, a few options are available:
Follow the JDK installation guide on the Oracle website.
If you are using a Unix based system, we recommend using the SdkMan tool for managing software development kits. Once the SdkMan tool installed, follow the instructions on this page to install the JDK 17.
To use this starter project:
- Click on the
Use this template
button - Fill out the details of your new project
- Then click on
Create repository from template
Once your new repository created, clone it locally:
- replace
${your-username}
with your GitHub username - replace
${repository-name}
with the repository name you created above
git clone [email protected]:${your-username}/${repository-name}.git
cd ${repository-name}
Next, install the project dependencies and validate your project by running the following command at the root of your project:
./mvnw clean validate
If you are on a Windows machine, that will be:
mvnw clean validate
You should see the following console output:
$ ./mvnw clean validate
[INFO] Scanning for projects...
[INFO]
[INFO] --------------< com.codingblackfemales:shopping-basket-kata >---------------
[INFO] Building shopping-basket-kata 1.0.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:3.2.0:clean (default-clean) @ shopping-basket-kata ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.155 s
[INFO] Finished at: 2022-09-14T00:43:32+01:00
[INFO] ------------------------------------------------------------------------
In my case, the above steps would look like the following:
git clone [email protected]:SolangeUG/shopping-basket-kata.git
cd shopping-basket-kata
./mvnw clean validate
Once the project setup completed:
- update the description of your repository to match that of the kata
- update the
artifactId
, and the projectname
in thepom.xml
file to match the name of the kata - execute the following command to run tests
./mvnw clean test
Enjoy working on your kata! 😃