The project developed an Intelligent Tutoring System website that provides adaptive hints and other features.
Before being able to run the code there, an appropriate environment needs to be set up.
- Make sure that you have Java JDK 8 or higher installed. You can check of your java version by running
java -versionin your terminal or CLI. - Ensure that you have a MySQL server installed on your machine.
- Install Gradle. You can follow the Gradle installation guide from here: https://gradle.org/install/.
- Make sure your Gradle installation was successful by running
gradle -v. - Ascertain that your MySQL server is running on port 3306. You can check this by entering into the MySQL interface and running
SHOW GLOBAL VARIABLES LIKE 'PORT';. Alternatively, enter the src/main/resources directory, open the application.properties file and set up thespring.datasource.urlfield to your MySQL server port. - Create a new database in MySQL called 'prj'. Alternatively, if you do not want to name your database 'prj', name it anything you want then open the src/main/resources/application.properties file and change the database name in
spring.datasource.urlfrom 'prj' to the name of your selection. - Ensure that the database credentials
spring.datasource.usernameandspring.datasource.passwordare set up correctly with your database credentials. The default MySQL credentials are pre-written here.
After all the prerequisites are complete the project can be started through Gradle.
- Make sure that you are in the root directory.
- Run
gradle buildin your terminal or CLI to build and compile the project. - Run
gradle bootRunto start the application. - Visit http://localhost:8080/ in a browser of your choice to start working with the application.
- When building/running your application for the first time, you may see an error similar to
java.sql.SQLSyntaxErrorException: Table 'prj.lesson' doesn't exist. Simply ignore this error message and try building/running your application again. - When you unexpectedly get errors, such as
java.lang.ClassNotFoundExceptionorUnable to find a single main class from the following candidates, when building or running the application, try deleting the build directory and building/running again.
If you are unable to run the source code for some reason, you can visit the deployed version of the application on https://prj-its.herokuapp.com/ Please note, that this deployed version has not been well tested to ensure everything is working. The deployed version is much slower as it is deployed on a free hosting service.
- Make sure you are in the root directory of the project.
- Unit tests can be executed by running
gradle testor./gradlew test.
- Make sure you are in the root directory of the project.
- Make sure that your MySQL server is running.
- MVC Integration tests can be executed by running
gradle integrationTest.
Unlike the two cases above, running UI tests takes a little bit more work.
- Ensure you have a Google Chrome browser installed in your machine. Install one if you do not.
- Check the version of your browser and note it down. You can check the version by clicking the three dots menu button on the top right corner, clicking Settings and then clicking on the "About Chrome" button on bottom left.
- Visit https://chromedriver.chromium.org/downloads and download the ChromeDriver matching your Google Chrome version and your operating system.
- Extract the zip folder and move the chromedriver executable to the root directory of the project (/prj).
- Open the src/uiIntegrationTest/java/ui/ChromeDriverLocation.java file and make sure that the
locationfield correctly reflects the name of your chromedriver. Rename it appropriately. - UI integration tests can now be executed by running
gradle uiIntegrationTestfrom the root directory of the project.