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.
- Node 15+
- Java 11+
- MySQL 5.7+
- Lombok
-
Node 15 https://nodejs.org/en/download/
-
Java 11 https://www.oracle.com/br/java/technologies/javase/jdk11-archive-downloads.html
-
MySQL 5.7 https://dev.mysql.com/downloads/windows/installer/5.7.html;
-
Visual Studio Code https://code.visualstudio.com/download
To run both frontend and backend you need to execute the following steps:
You need to have in Windows environment Variables the folder path of java, mysql and node.
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.
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
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:
- ADMIN:
- user: maria@email.com
- password: 123456
- GUEST:
- user: daniel@email.com
- password: 123456
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