Skip to content

byronlloydwakeman/Inventory-Management-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BS2202 Byron Lloyd - Wakeman

Quality Gate Status Bugs Code Smells Security Rating Technical Debt

Introduction

This is the repository for the summative assessment for module BS2202.

Tech Stack

Java  Maven  Maven  Maven 

Documentation

For the JavaDoc and further documentation please seek the 'docs' folder in the root directory for the generated JavaDocs.

Running the Application

Once the repo has been cloned or forked, mvn clean install will need to be ran to install all the required dependencies.
If the maven clean install has completed successfully the program can now be ran.

Creating the Database

All the scripts needed to create the schemas, tables and entries are in the sql folder in the root of the project.

Refer the sql scripts 'DatabaseCreation.sql' and 'TestDatabaseCreation.sql' in order to create the database and tables for the production environment (non-testing) and the testing environment (the database that will be used for tests).

Then the 'Groceries.sql' and 'Nutrients.sql' scripts can be run on the summative database to add entity values that will be used when the application is run.

Logging In

Note that if Users.sql is used, then the password of the user inserted into the database is 'password' and is an admin account.

Intellij

To run the code locate the HelloApplication class inside src/main/java/com/example/summativeui If running in Intellij there should be a green play button next to the class name, right click this and it will show a pop-up. img.png Click modify run configuration. The run configuration should look like this - img_1.png Click the once the given run config has been selected, click the green play button and the app should run.

Installation

If the javafx imports are giving the error 'not resolved' make sure to reload the project by right clicking the pom.xml file, navigaing to maven and clicking 'Reload Project'.

Testing

When running a test make sure to add the following CLI argument
-ea --add-opens javafx.graphics/com.sun.javafx.application=ALL-UNNAMED
This solves a permission error caused by javafx.

Make sure to also include the ENVIRONMENT env variable which specifies the given environment the code will be run in. The available options are 'test' and 'production'

Unable to locate any tests error

this is caused by the testfx maven dependency not being loaded properly. To solve this simply remove the testfx.junit5 dependency and reload it. Use version org.testfx:testfx-junit5:4.0.15-alpha

Test Evidence

Please see the recorded videos in the test/evidence folder for the recorded evidence of the tests passing.