addianto / sitodo

A basic Java and Spring Boot-based todo app for teaching basic Web programming, Git workflows, and CI/CD. Heavily inspired by the running example in "Test-Driven Development with Python" book by Harry Percival.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sitodo

Quality Gate Status Coverage

A basic todo app project for teaching basic Web programming, Git workflows, code quality, and CI/CD. Heavily inspired by the running example in "Test-Driven Development with Python" book by Harry Percival.

Setting Up Development Environment

The following tools need to be installed in order to build and run the project:

Ensure java, javac, and mvn commands can be invoked from inside the shell:

$ java --version
openjdk 17.0.3 2022-04-19
OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7)
OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
$ javac --version
javac 17.0.3
$ mvn --version
Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)

We recommend IntelliJ IDEA Community Edition as the IDE for developing the project. Other IDE or text editors, such as Eclipse and Visual Studio Code, might work. However, we may not be able to help troubleshoot any IDE-related issues. In addition, we include IntelliJ-specific run configurations in the codebase that will add shortcuts for running the test suites and coverage reporting from within IntelliJ.

Getting Started

To run the whole test suite, execute:

mvn test

To run a select test suite, e.g. unit or functional test, add -Dgroups parameter. For example, to run only the unit test suite, execute mvn test -Dgroups=unit. Similarly, to run only the functional test suite, execute mvn test -Dgroups=e2e.

To build an executable Spring Boot application, execute:

mvn package -DskipTests

The -DskipTests option lets package task to build the app into executable JAR file without running all test suites. If the option was omitted, then all test suites will run, thus increasing the duration of the building process, especially the functional test suite that runs much longer than the unit test suite.

The JAR file will be generated at ./target directory. To run it, execute:

java -jar sitodo.jar

You can customise the configuration by providing an application.properties file in the same directory as the executable JAR file. See the built-in configuration in the source code.

Running Example

See the running example based on the main branch at Heroku.

License

This project is licensed under the terms of the MIT license. The included static site is licensed under Creative Commons Attribution-ShareAlike 4.0.

About

A basic Java and Spring Boot-based todo app for teaching basic Web programming, Git workflows, and CI/CD. Heavily inspired by the running example in "Test-Driven Development with Python" book by Harry Percival.

License:MIT License


Languages

Language:Java 88.7%Language:HTML 8.2%Language:Dockerfile 1.7%Language:Gherkin 1.3%Language:Procfile 0.1%