Skip to content

Commit

Permalink
Merge pull request #226 from Arquisoft/add-question-templates
Browse files Browse the repository at this point in the history
Updated documentation and README
  • Loading branch information
uo287545 authored Apr 28, 2024
2 parents d575cb4 + 02aa49f commit ec99864
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 7 deletions.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,34 @@
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04b&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04b)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Arquisoft_wiq_es04b&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Arquisoft_wiq_es04b)

### 🚀 TEAM
### 🚀 TEAM:

- **Pelayo Rojas Iñigo**
- **Álvaro Arias Martínez De Vega**
- **Ricardo Díaz Núñez**
- **Roberto Peña Goy**
- **Iker Álvarez Fernández**

### Local deployment instructions:

#### Without docker (slower):

1. Fist you have to clone the repository using a CMD and the following command: `git clone https://github.com/Arquisoft/wiq_es04b.git` or using an IDE with Git integration or any other app of your preference.

2. Then you have to execute the [runServer.bat](https://github.com/Arquisoft/wiq_es04b/blob/master/database/hsqldb/bin/runServer.bat) to start the local database.

3. With the database initialized you have to open a CMD in the project root directory and execute the following command `mvnw spring-boot:run`, to start the application.

4. When the application is started the web app uses the port 3000. You can access the app through any web client using the following URL: http://localhost:3000/.

5. If you wish to execute the tests you have to open a CMD in the project root directory (you could use the same you used before), you have to execute `set EXCLUDE_JUNIT=true` if you also want to execute the E2E tests. Then to execute the tests you have to use the following command: `mvnw org.jacoco:jacoco-maven-plugin:prepare-agent verify`.

6. If you want to obtain the report you have to torn off the app and in the same CMD as before execute the following command: `mvnw org.jacoco:jacoco-maven-plugin:report`.

#### With docker (faster):

> #### *Disclaimer: This method is faster but it is not recommended for development because it is harder to debug and to see the logs and it is harder to execute the tests.*
1. First you need to have installed [docker](https://www.docker.com/#build) and docker [compose](https://docs.docker.com/compose/install/).
2. Then you have to clone the repository using a CMD and the following command: `git clone https://github.com/Arquisoft/wiq_es04b.git` or using an IDE with Git integration or any other app of your preference.
3. Then you have to open a CMD in the project root directory and execute the following command: `docker-compose up`. This is going to deploy the docker image that is in our repository. This docker will contain the app, a MySql database, Graphana and Prometheus. The app will be available in the port 443 https.
2 changes: 1 addition & 1 deletion docs/src/01_introduction_and_goals.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The overall goal of the application is to provide a fun and challenging experien
=== Quality Goals
[options="header",cols="1,2,2"]
|===
|Nº|Atributo|Motivacion
|Nº|Quality Goal|Motivation
| 1 | Efficiency | Access, creation of questions, and navigation between them should be fast to ensure user satisfaction.
| 2 | Usability | The application should be appealing to all fans of the original program while also offering a wide variety of questions.
| 3 | Manteinance | The application should ensure easy expansion and modification to provide users with new features.
Expand Down
1 change: 0 additions & 1 deletion docs/src/03_system_scope_and_context.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ System -----> developers : Provides\nPlayer &\n Question Data
* **HTTPS:** Represents the communication channels, with HTTPS being the protocol used for secure communication.
* **Question Generation:** Represents the means used for question and answers generation.
* **Database:** Represents whichever system used for data persistence.
* **To be decided:** Indicates that specific details about the channels and protocols are yet to be determined.

==== Input/Output Mapping Table

Expand Down
2 changes: 1 addition & 1 deletion docs/src/09_architecture_decisions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ The purpose of this section is to create an ordered list of architectural decisi
* https://github.com/Arquisoft/wiq_es04b/wiki/Record-of-architectural-decisions#dto-pattern[ADR 05] - DTO Pattern
* https://github.com/Arquisoft/wiq_es04b/wiki/Record-of-architectural-decisions#mysql-in-production-and-hsqldb-in-local[ADR 06] - MySQL in production and HSQLDB in local
* https://github.com/Arquisoft/wiq_es04b/wiki/Record-of-architectural-decisions#monolithic-architecture[ADR 07] - Monolithic architecture
* https://github.com/Arquisoft/wiq_es04b/wiki/Record-of-architectural-decisions#use-of-tbd[ADR 08] - Use of TBD
* https://github.com/Arquisoft/wiq_es04b/wiki/Record-of-architectural-decisions#use-of-gitflow[ADR 08] - Use of GitFlow
* https://github.com/Arquisoft/wiq_es04b/wiki/Record-of-architectural-decisions#questions-refreshing[ADR 09] - Questions refreshing
2 changes: 0 additions & 2 deletions docs/src/11_technical_risks.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ ifndef::imagesdir[:imagesdir: ../images]
[cols="1,2,3a", options="header"]
|===
| Priority | Debt | Description
| Low | Microservices | Research about microservices and what they can contribute to the project

|===
2 changes: 1 addition & 1 deletion docs/src/14_testing.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ ifndef::imagesdir[:imagesdir: ../images]

[[section-testing]]
== Testing

To be able to achieve continuous delivery, we need to have a good test coverage. We need to have a good test coverage to be able to refactor the code without breaking it, to be able to deliver the software with confidence and to be able to deliver the software with quality.

=== Unit Test
In our project, we have implemented unit tests for various components of the application. The tests are written in Java and use the JUnit 5 framework for testing. We also use the Spring Boot Test framework for testing Spring Boot applications, which provides utilities and annotations to test the application in a way that is very close to its actual runtime behavior. The tests are located in the src/test/java/com/uniovi directory. The main test class is Wiq_UnitTests.java, which contains tests for various services and repositories in our application.

=== Integration Test (E2E)
All the cucumber files are located in the src/test/resources/features directory. We've implemented all the cucumber steps in the src/test/java/com/uniovi/steps directory. The main test class is Wiq_IntegrationTests.java in src/test/java/com/uniovi, which you should run to execute the integration tests.

=== Load Test
We have implemented load tests to evaluate the performance of our website under extreme situations. For this we use the "Gatling" application, which allows us to evaluate a set of web requests by simulating the number of users who make them simultaneously.
Expand Down

0 comments on commit ec99864

Please sign in to comment.