An app that allows farmers to connect with customers. Farmers can upload Produce or Machine Listings to the App. Customers can browse through the lisings and buy items directly from farmers.
Clone the project
git clone https://github.com/vsingh2201/2311-Project-Team1.git
Go to the project directory
cd 2311-Project-Team1
Build the Project
./gradlew build
Run the Project
./gradlew run
You can either use the Mock database or the Local Postgres Database.
To set up the database, go to the DB config.java file at the following location:
<your_project_dir>/app/src/main/java/statics/DbConfig.java
To use Mock Database, set IS_MOCK boolean variable to true.
To use Local Postgres Database, set IS_MOCK boolean variable to false.
Set the name of your local database to farmerhub.
Set DB_USER to the username for your localhost postgres database.
Set DB_PASSWORD to the password for your localhost postgres database.
To run Junit tests, run the following command
./gradlew test
Test Results for Junit tests are available in the following directory:
<your_project_dir>/app/my-reports/tests/test/index.html
Open the index.html in a web browser to see Junit Test Results.
To run Integration test, run the following command
./gradlew integrationTest
Test Results for Integration tests are available in the following directory:
<your_project_dir>/app/my-reports/tests/integrationTest/index.html
To debug the app, set up a new debug configuration in Eclipse IDE as shown in the image below.
Put a breakpoint in the code and then run the gradle debug task.
./gradlew debug