Life ConnectLife Connect
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
Wiki index
Architecture
Services
Concepts
Runbooks
Infra
Swagger Docs
GitHub
  • Backend (Java / Spring Boot)

    • adb
    • adb-persons
    • adb-parts
    • adb-contracts
    • adb-accounting
    • adb-files
    • adb-utilities
    • adb-aggregates
    • adb-views
    • adb-reports
  • Frontend

    • adb-ui
    • adb-web
  • Infrastructure & tooling

    • adb-charts
    • adb-infrastructure
    • adb-tests-artillery
    • adb-doc
  • External services (out-of-monorepo)

    • adb-tickets
    • adb-notes
    • adb-graph
Last updated 2026-05-03

adb-tests-artillery

AI-generated content

This document was generated by an AI assistant. Verify accuracy before relying on the details.

Role

End-to-end load and API validation testing suite based on Artillery.js. It targets the public gateway (BE_HOST), authenticates via Keycloak, populates/cleans MongoDB directly, and verifies REST endpoint behaviour under load.

Run as a Bitbucket pipeline with various profiles (ENV_NAME, CLEANUP_BEFORE).

Stack

ItemValue
Artillery2.0.18
Node.js23.6.1 (Alpine for CI) or 18.20.3
MongoDB drivermongodb 6.9.0
Test dataGoogle Sheets (google-spreadsheet)
TemplatingMustache

Structure

adb-tests-artillery/
├── tests/
│   ├── 01-setup/                     User profile retrieval
│   ├── 02-create/                    CRUD: owner, tenant, supplier,
│   │                                 part, file, ticket, RDC, RC,
│   │                                 call-rc-first-rent, call-rc-regular-rent
│   └── 03-apicheck/                  API validation per domain
│       ├── accounting/               ledger-account, accounting-entries,
│       │                             ledger-auxiliary-account, accounting-event
│       └── persons/                  tenant, person, organization
├── envs/                             .env files per environment
├── utils/                            utility scripts
│   ├── env-activation.mjs            loads .env
│   ├── g-sheet.mjs                   Google Sheets extraction
│   ├── switching-data.mjs            data switching
│   └── data-cleanup.mjs              MongoDB cleanup
├── reports/                          Mochawesome output (CI artifact)
├── config.yml                        Artillery config
└── bitbucket-pipelines.yml           custom pipeline

Test architecture

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

    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

Environment variables

VariableRole
MONGO_DB_URL_<ENV_NAME>MongoDB connection string per env
BE_HOSTBackend (gateway) URL
ADMIN_USERNAME / ADMIN_PASSWORDKeycloak admin credentials
G_CONFIGGoogle Sheets credentials
GOOGLE_SHEET_IDID of the test-data sheet
ENV_NAMEdev / athena / hephaestus / int
CLEANUP_BEFOREfull / partial / no

Main commands

npm run utils-activate-all          # Full setup
npm run utils-cleanup-all           # Cleanup of 13+ collections
npm run utils-cleanup-partial       # Partial cleanup
npm run create-all                  # Create all test items
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         # Accounting API tests
npm run test-api-persons

Each command produces a reports/*.json report in Mochawesome format.

Bitbucket pipeline

Custom pipeline (manually triggered):

image: node:23.6.1-alpine
stages:
  - npm install
  - utils-activate-all
  - cleanup (depending on CLEANUP_BEFORE)
  - run Artillery scenarios
artifacts: reports/**

Main scenarios

  • 01-setup — admin login, representative login.
  • 02-create — full dataset creation: organisation, fiscal year, owners, tenants, suppliers, bank accounts, parts, files, tickets, RDC and RC contracts, first rents and recurring rents.
  • 03-apicheck — endpoint verification per domain:
    • accounting/: ledger-account, accounting-entries, ledger-auxiliary-account, accounting-event.
    • persons/: tenant, person, organization.

Links

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