Life ConnectLife Connect
Table of contents
Architecture
Services
Swagger Docs
GitHub
Table of contents
Architecture
Services
Swagger Docs
GitHub
  • Backend (Java / Spring Boot)

    • adb (parent Maven + proxy)
    • adb-persons
    • adb-parts
    • adb-contracts
    • adb-accounting
    • adb-files
    • adb-utilities
    • adb-aggregates
    • adb-views
    • adb-reports
  • Frontend

    • adb-ui
    • adb-web
  • Infrastructure & Outillage

    • adb-charts
    • adb-infrastructure
    • adb-tests-artillery
    • adb-doc
  • Services externes (hors monorepo)

    • adb-tickets (externe)
    • adb-notes (déprécié)
    • adb-graph (externe, statut incomplet)

adb-tests-artillery

Rôle

Suite de tests de charge et de validation API end-to-end basée sur Artillery.js. Cible la gateway publique (BE_HOST), s'authentifie via Keycloak, peuple/nettoie MongoDB directement, et vérifie le comportement des endpoints REST sous charge.

Lancée en pipeline Bitbucket avec différents profils (ENV_NAME, CLEANUP_BEFORE).

Stack

ÉlémentValeur
Artillery2.0.18
Node.js23.6.1 (Alpine pour CI) ou 18.20.3
MongoDB drivermongodb 6.9.0
Données de testGoogle Sheets (google-spreadsheet)
TemplatingMustache

Structure

adb-tests-artillery/
├── tests/
│   ├── 01-setup/                     Récupération profils utilisateur
│   ├── 02-create/                    CRUD : owner, tenant, supplier,
│   │                                 part, file, ticket, RDC, RC,
│   │                                 call-rc-first-rent, call-rc-regular-rent
│   └── 03-apicheck/                  Validation API par domaine
│       ├── accounting/               ledger-account, accounting-entries,
│       │                             ledger-auxiliary-account, accounting-event
│       └── persons/                  tenant, person, organization
├── envs/                             .env files par environnement
├── utils/                            scripts utilitaires
│   ├── env-activation.mjs            charge .env
│   ├── g-sheet.mjs                   extraction Google Sheets
│   ├── switching-data.mjs            switching données
│   └── data-cleanup.mjs              cleanup MongoDB
├── reports/                          sortie Mochawesome (CI artifact)
├── config.yml                        config Artillery
└── bitbucket-pipelines.yml           pipeline custom

Architecture du test

flowchart TB
    PreSetup[Pre-setup<br/>g-sheet → fixtures]
    Cleanup[Data cleanup<br/>MongoDB direct]
    Auth[Auth Keycloak<br/>POST /realms/ADB/protocol/openid-connect/token]
    Tests[Artillery scenarios]
    Reports[reports/*.json<br/>format Mochawesome]

    GS[Google Sheets<br/>GOOGLE_SHEET_ID]
    Mongo[(MongoDB Atlas)]
    KC[Keycloak]
    Backend[adb-* via BE_HOST]

    PreSetup --> GS
    Cleanup --> Mongo
    Auth --> KC
    Tests --> Backend
    Tests --> Reports

Variables d'environnement

VariableRôle
MONGO_DB_URL_<ENV_NAME>Connection string MongoDB par env
BE_HOSTURL backend (gateway)
ADMIN_USERNAME / ADMIN_PASSWORDCredentials admin Keycloak
G_CONFIGCredentials Google Sheets
GOOGLE_SHEET_IDID de la feuille de données de test
ENV_NAMEdev / athena / hephaestus / int
CLEANUP_BEFOREfull / partial / no

Commandes principales

npm run utils-activate-all          # Setup complet
npm run utils-cleanup-all           # Cleanup 13+ collections
npm run utils-cleanup-partial       # Cleanup partiel
npm run create-all                  # Créer tous les éléments de test
npm run create-organization
npm run create-fiscal-year
npm run create-owner / tenant / supplier
npm run create-part / file / rdc / rc
npm run test-api-accounting         # Tests API accounting
npm run test-api-persons

Chaque commande génère un rapport reports/*.json au format Mochawesome.

Pipeline Bitbucket

Custom pipeline (déclenchée manuellement) :

image: node:23.6.1-alpine
stages:
  - npm install
  - utils-activate-all
  - cleanup (selon CLEANUP_BEFORE)
  - exécution des scénarios Artillery
artifacts: reports/**

Scénarios principaux

  • 01-setup — login admin, login représentant.
  • 02-create — création complète d'un dataset : organisation, fiscal year, propriétaires, locataires, fournisseurs, comptes bancaires, parts, fichiers, tickets, contrats RDC et RC, premiers loyers et loyers récurrents.
  • 03-apicheck — vérification des endpoints par domaine :
    • accounting/ : ledger-account, accounting-entries, ledger-auxiliary-account, accounting-event.
    • persons/ : tenant, person, organization.

Liens

  • Code : adb-tests-artillery/
  • Doc CFR stress test : technical-epics/stress-test/i-can-stress-test-the-cfr.md
  • Rapports historiques : technical-epics/stress-test/reports/
Edit this page
Last Updated:
Contributors: gregory
Prev
adb-infrastructure
Next
adb-doc