A repository with a javafx project, with maven setup for Java 17 and JavaFX 17, and JUnit 5 (Jupiter) and TestFX for testing.
To see more recommended extentions for running the app, see extension file
Contains the source code for the workout logging app. The user can run the app locally or remote with Springboot.
The project is a maven modules project with four modules:
Contains the core logic of the app and related tests.
Handles persistence with json and related tests.
Contains controller classes and app classes for the user interface of local and remote app, including related tests.
Contains classes related to the Springboot REST API (rest controller, service class, configuration class and api application class), integration test and related tests.
The completed app has the following features:
- Log individual workout sessions with date and name of workout
- Save and load logs automatically upon creation/startup
- Editing previously made logs
- Delete singular workouts or the entire log
Before running the app, run the command mvn clean install from it1901/gr2405/gr2405/workout-app
To run the local app (App.java, located in it1901/gr2405/gr2405/workout-app/ui/src/main/java/ui), navigate to the ui module and run the command mvn javafx:run. When you get to the welcome window, click "Local App".
To run the remote app you need to have two terminals open (splitted terminals). In one of them, navigate to the springboot.workoutApi module and run the command mvn spring-boot:run. After that, navigate to the ui module in the other terminal and run the command mvn javafx:run. When you get to the welcome window, click "Remote App". Make sure the IP field contains "localhost" before pressing the button.
Alternatively, if the server is running on a different computer, type the server IP into the input field on the welcome window.
To download the app on your computer, make sure you are in it1901/gr2405/gr2405/workout-app, and have run mvn clean install.
First run the command mvn -pl ui javafx:jlink, then the command mvn -pl ui jpackage:jpackage. The installer should now be on your computer named "workout-app-fx" in the target ui folder, install the app according to your operating system. You can then open the app "workout-app-fx".
Some window users have recieved an error when running the mvn -pl ui jpackage:jpackage command due to missing wix tools. If this issue arises follow the link https://wixtoolset.org and install wix.
[INFO] [12:58:12.535] Can not find WiX tools (light.exe, candle.exe)
[INFO] [12:58:12.535] Download WiX 3.0 or later from https://wixtoolset.org and add it to the PATH.To run the tests, navigate to it1901/gr2405/gr2405/workout-app and run the command mvn test
How to check the test coverage after running tests:
- Navigate to the module you want to check (ui, persistence or core), then to target/site/jacoco
- Open index.html in browser
To run the integration test, navigate to the workoutApi module and run the command mvn verify