Skip to content

Commit

Permalink
Merge branch 'newDevelop' into newJota
Browse files Browse the repository at this point in the history
  • Loading branch information
uo289432 committed Apr 30, 2024
2 parents 87a76fe + 88eb1a9 commit 8bf9540
Show file tree
Hide file tree
Showing 13 changed files with 82 additions and 1,686 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
teamname="wiq_es05a"
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@ on:
branches:
- master
- develop
- newDevelop
- LaraFMz
- Pablo-Arreglos
- jota
- newJota
- Pablo-Arreglos
- Pablo-AjustesFinales
pull_request:
types: [opened, synchronize, reopened]
jobs:
Expand Down
32 changes: 15 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3'
services:
mongodb:
container_name: mongodb-${teamname:-wiq5a}
container_name: mongodb-${teamname:-wiq_es05a}
image: mongo
profiles: ["dev", "prod"]
volumes:
Expand All @@ -12,8 +12,8 @@ services:
- mynetwork

questionservice:
container_name: questionservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/questionservice:latest
container_name: questionservice-${teamname:-wiq_es05a}
image: ghcr.io/arquisoft/wiq_es05a/questionservice:latest
profiles: ["dev", "prod"]
build: ./questionservice
ports:
Expand All @@ -25,8 +25,8 @@ services:
- mynetwork

authservice:
container_name: authservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/authservice:latest
container_name: authservice-${teamname:-wiq_es05a}
image: ghcr.io/arquisoft/wiq_es05a/authservice:latest
profiles: ["dev", "prod"]
build: ./userservice/authservice
depends_on:
Expand All @@ -39,8 +39,8 @@ services:
MONGODB_URI: mongodb://mongodb:27017/userdb

userservice:
container_name: userservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/userservice:latest
container_name: userservice-${teamname:-wiq_es05a}
image: ghcr.io/arquisoft/wiq_es05a/userservice:latest
profiles: ["dev", "prod"]
build: ./userservice/userservice
depends_on:
Expand All @@ -53,8 +53,8 @@ services:
MONGODB_URI: mongodb://mongodb:27017/userdb

gatewayservice:
container_name: gatewayservice-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/gatewayservice:latest
container_name: gatewayservice-${teamname:-wiq_es05a}
image: ghcr.io/arquisoft/wiq_es05a/gatewayservice:latest
profiles: ["dev", "prod"]
build: ./gatewayservice
depends_on:
Expand All @@ -72,8 +72,8 @@ services:
QUESTION_SERVICE_URL: http://questionservice:8003

webapp:
container_name: webapp-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_5a/webapp:latest
container_name: webapp-${teamname:-wiq_es05a}
image: ghcr.io/arquisoft/wiq_es05a/webapp:latest
profiles: ["dev", "prod"]
build: ./webapp
depends_on:
Expand All @@ -82,8 +82,8 @@ services:
- "3000:3000"

prometheus:
image: ghcr.io/arquisoft/wiq_5a/prometheus:latest
container_name: prometheus-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_es05a/prometheus:latest
container_name: prometheus-${teamname:-wiq_es05a}
build: ./monitoring/prometheus
profiles: ["dev", "prod"]
networks:
Expand All @@ -94,18 +94,16 @@ services:
- "9090:9090"
depends_on:
- gatewayservice


grafana:
image: ghcr.io/arquisoft/wiq_5a/grafana:latest
container_name: grafana-${teamname:-wiq5a}
image: ghcr.io/arquisoft/wiq_es05a/grafana:latest
container_name: grafana-${teamname:-wiq_es05a}
build: ./monitoring/grafana
profiles: ["dev", "prod"]
networks:
- mynetwork
volumes:
- grafana_data:/var/lib/grafana
- ./gatewayservice/monitoring/grafana/provisioning:/etc/grafana/provisioning
environment:
- GF_SERVER_HTTP_PORT=9091
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER:-admin}
Expand Down
Binary file removed docs/images/07_DiagramaDespliegue3.png
Binary file not shown.
4 changes: 4 additions & 0 deletions docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ include::src/11_technical_risks.adoc[]
// 12. Glossary
include::src/12_glossary.adoc[]

<<<<
// 13. Testing
include::src/13_testing.adoc[]

// horizontal line
***
include::src/about-arc42.adoc[]
2 changes: 0 additions & 2 deletions docs/src/02_architecture_constraints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,4 @@ servicios estarán comunicados por 'gatewayservice'._
|*Convenciones del lenguaje de programación*
|_Es fundamental adherirse a las convenciones de los diferentes lenguajes de programación utilizados para garantizar que la aplicación tenga un código legible,
que facilite su mantenimiento._


|===
51 changes: 51 additions & 0 deletions docs/src/13_testing.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-testing]]
== Testing
=== Tests unitarios (TDD)

Para los tests unitarios utilizamos Jest y Testing Library de React para probar los componentes de nuestra aplicación web.

Creamos pruebas separadas para cada componente, con el fin de probar partes aisladas y verificar si cada aspecto de nuestra
aplicación funcionaba correctamente, pero enfrentamos algunos problemas en el proceso, ya que resultó ser casi imposible verificar
todo, principalmente debido a problemas de tiempo y dificultad para probar los errores.

En el momento de escribir este documento, alcanzamos una cobertura total del 91% con 14 archivos tests para los componentes,
8 de ellos cubiertos al 100%.

=== Tests de integración (BDD)

Utilizamos Jest y Puppeteer para realizar pruebas de integración en nuestra aplicación.
Diseñamos pruebas e Historias de Usuario con la estructura: "Dado, Cuando, Entonces", lo que resultó en muchas facilidades al implementarlas.

Al final, logramos tener 3 pruebas generales e2e.

====
Feature: Registering a new user
Scenario: The user is not registered in the site
Given An unregistered user
When I fill the data in the form and press submit
Then A confirmation message should be shown in the screen
====

====
Feature: Logging in as a user
Scenario: Logging in with valid credentials
Given A user that is logged in the application
When I enter valid username and password
Then A confirmation message should be shown in the screen
====

====
Feature: Access the app
Scenario: A registered user enters the app
Given A user that is logged in the application
When I navigate to the Home page
Then I should be able to interact with the app
====

=== Tests de carga
TODO
1 change: 0 additions & 1 deletion monitoring/grafana/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM grafana/grafana

COPY provisioning/ /etc/grafana/provisioning/
COPY grafana.ini /etc/grafana/grafana.ini

CMD ["./bin/grafana"]
Loading

0 comments on commit 8bf9540

Please sign in to comment.