Skip to content

Computer Science Final Paper about tests in a hostel reservation system app

Notifications You must be signed in to change notification settings

rodrigo-pagliares/Hostel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

HostelApp

Computer Science final paper whose goal is to show the importance of software tests, applied in an application that simulates a hostel reservation system.
The application was created using React for front-end, SpringBoot for back-end and MySQL for data storage. To perform the tests was used JUnit for unity and integration tests and Selenium for end-to-end tests.

Requeriments

  • Node 15+
  • Java 11+
  • MySQL 5.7+
  • Lombok

Links (optional):

Execution steps

To run both frontend and backend you need to execute the following steps:

Set Environment Variables

You need to have in Windows environment Variables the folder path of java, mysql and node.

Install lombok in your IDE

For Eclipse, you just need to open the cmd in the folder where you have downloaded the lombok jar and execute java -jar lombok.jar.
A window will be shown to select eclipse folder and install.

Backend directory

You need to open your IDE (Eclipse in the example case used above) and importing Hostel backend folder as maven project:
Then, in Hostel\backend\src\main\resources\application.properties you need to set the informations about your mysql admin user by changing the following properties:

spring.datasource.username=username
spring.datasource.password=password

Finally, run as Java Application the main class HostelSpringBootApplication.class

Frontend directory

You need to open your IDE (Visual Studio Code in the example case used above) and open the Hostel frontend folder.
Then, open the IDE terminal and excute npm install in order to install all of dependencies and then execute npm start.
To log into the application there are two users pre-registered:

Tests Execution Steps

You just need to right click on the project and run as JUnit Test.
You can also run either e2e suite class or integration and unity suite class present in /backend/src/test/java/br/com/hostel/suite/ in order to run the tests separately.

obs: to run e2e tests is needed to be running both backend and frontend applications

Some frontend screens

Login

guest-login

Guest profile without reservations

guest-without-reservations

Guest reservation creation

create1

create2

create3

Guest profile with reservation

guest-with-reservation

Admin profile

admin