Squash TM¶
Squash TM (Test Management) is the open source ALM used by PerfShop for managing requirements, test cases, campaigns, and executions. It is shipped by the Squashtest vendor and actively maintained.
Source of truth
This page is drawn from the perfshop-squash-db, perfshop-testmgmt, and perfshop-squash-seed blocks of the compose files, the configuration bind mounts (squash-seed/start-plugins.cfg, squash-seed/squash.tm.cfg.properties), and the squash-seed/seed.py script.
Dedicated PostgreSQL database¶
Squash TM is deliberately coupled to PostgreSQL 16 — not MySQL, not the perfshop-db database. This is the choice made by the official Squashtest stack for the most stable support, and PerfShop sticks to it:
perfshop-squash-db:
image: postgres:16
container_name: perfshop-squash-db
environment:
- POSTGRES_DB=squashtm
- POSTGRES_USER=squashtm
- POSTGRES_PASSWORD=${SQUASH_DB_PASSWORD:-squashtm}
volumes:
- squash-db-data:/var/lib/postgresql/data
ports:
- "${SQUASH_DB_PORT:-5433}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U squashtm -d squashtm"]
interval: 10s
timeout: 5s
retries: 5
| Aspect | Value |
|---|---|
| Image | postgres:16 |
| Database | squashtm |
| User | squashtm (default, overridable through SQUASH_DB_PASSWORD) |
| Named volume | squash-db-data → /var/lib/postgresql/data |
| Default host port | 5433 (to avoid a conflict with a possible local PostgreSQL) |
| Healthcheck | pg_isready |
The coexistence of MySQL 8 (for perfshop-app) and PostgreSQL 16 (for Squash TM) in the same stack is pedagogically useful: students see two DBMSes side by side, each with its official image and its own healthcheck.
The Squash TM service¶
Block of docker-compose.desktop.yml (same service in docker-compose.build.yml); secret default values elided ("…"). The NAS local compose declares image: squashtest/squash-tm:latest: the running version is shown in the interface (question handled in Lot F).
perfshop-testmgmt:
platform: linux/amd64
build:
context: ./squash-tm # FROM squashtest/squash:9.0.0
dockerfile: Dockerfile
container_name: perfshop-testmgmt
ports:
- "${SQUASH_HTTP_PORT:-9086}:8080"
volumes:
- ./squash-seed/start-plugins.cfg:/opt/squash-tm/conf/start-plugins.cfg:ro
- ./squash-seed/squash.tm.cfg.properties:/opt/squash-tm/conf/squash.tm.cfg.properties:ro
environment:
SQTM_DB_TYPE: postgresql
SQTM_DB_HOST: perfshop-squash-db
SQTM_DB_PORT: 5432
SQTM_DB_NAME: squash
SQTM_DB_USERNAME: squash
SQTM_DB_PASSWORD: ${SQUASH_DB_PASSWORD:-…}
SPRING_DATASOURCE_URL: jdbc:postgresql://perfshop-squash-db:5432/squash
SPRING_DATASOURCE_USERNAME: squash
SPRING_DATASOURCE_PASSWORD: ${SQUASH_DB_PASSWORD:-…}
SQUASH_TM_ADMIN_LOGIN: ${SQUASH_ADMIN_LOGIN:-…}
SQUASH_TM_ADMIN_PASSWORD: ${SQUASH_ADMIN_PASSWORD:-…}
SQUASH_JWT_SECRET: ${SQUASH_JWT_SECRET:-…}
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/squash/isSquashAlive"]
interval: 15s
timeout: 5s
retries: 20
start_period: 90s
depends_on:
perfshop-squash-db:
condition: service_healthy
networks:
- perfshop-network
restart: unless-stopped
Key points¶
| Aspect | Value |
|---|---|
| Image | built from squashtest/squash:9.0.0 (squash-tm/Dockerfile, official vendor image); NAS local compose: squashtest/squash-tm:latest |
| JDBC URL | jdbc:postgresql://perfshop-squash-db:5432/squash |
| Internal port | 8080 |
| Default host port | 9086 |
| Healthcheck endpoint | http://localhost:8080/squash/isSquashAlive (public Squash TM endpoint, no authentication required) |
start_period |
120 seconds — Squash TM starts slowly (Spring Boot + PostgreSQL init + plugins) |
Critical variables¶
| Variable | Role |
|---|---|
SQUASH_JWT_SECRET |
Base64 secret used to sign JWT tokens that Squash TM sends to Squash Orchestrator. This is the key that authenticates execution jobs submitted to the orchestrator. Must be random and stable. |
SQUASH_ADMIN_LOGIN / _PASSWORD |
Squash TM superadmin account (default admin / admin) |
DATABASE_URL |
Always jdbc:postgresql://perfshop-squash-db:5432/squashtm |
The JWT secret is shared with the orchestrator
The same SQUASH_JWT_SECRET variable is used by perfshop-testmgmt (for signing) and by perfshop-orchestrator (for verification). Changing it without restarting both will cause jobs to be rejected by the orchestrator with a JWT error. See squash-orchestrator.md.
Configuration by bind mount¶
Three files are mounted read-only into the Squash TM container:
start-plugins.cfg¶
Controls which Squash TM plugins are loaded at startup. PerfShop enables at least:
- The Git SCM connector (
squash-tm-scm-git) — to poll the Forgejo repository and discover scripts - The Squash Orchestrator connector — to submit execution jobs to the orchestrator
squash.tm.cfg.properties¶
Spring properties file that overrides the Squash TM defaults:
- Public URL (
squash.tm.url) - JDBC connection pool configuration
- SCM integration options (polling interval, timeout)
squash.rest-api.jwt.secret: secret of the personal API tokens (HS512), set in this file tracked by git — theSQUASH_JWT_SECRETvariable of the compose files is not read by any configuration (measured on 2026-09-30); on an exposed installation, see Harden an exposed installation
Orchestrator token¶
Squash TM holds no key: it presents to the orchestrator the RS512 token pasted in its automated execution server.
This token is signed on first start with the installation's private key, and the orchestrator verifies it with the
matching public key (orchestrator-secret and orchestrator-trust volumes, see
Squash Orchestrator). It is distinct from Squash TM's personal API tokens (HS512,
squash.rest-api.jwt.secret).
The squash-seed seed¶
The perfshop-squash-seed service is a Python container that runs at every docker compose up, then stops:
perfshop-squash-seed:
image: python:3.11-slim
command: ["python", "-u", "/app/seed.py"]
volumes:
- ./squash-seed/seed.py:/app/seed.py:ro
environment:
SQUASH_URL: http://perfshop-testmgmt:8080/squash
PERFSHOP_LANG: ${PERFSHOP_LANG:-fr} # language of the PerfShop messages
SQUASH_USER: ${SQUASH_ADMIN_LOGIN:-admin}
SQUASH_PASSWORD: ${SQUASH_ADMIN_PASSWORD:-admin}
# … (SQUASH_ADMIN_*, SCM_*: passed, not read by the seed)
depends_on:
perfshop-forgejo-seed:
condition: service_completed_successfully
perfshop-testmgmt:
condition: service_healthy
restart: "no"
The seed only uses the Python standard library (urllib): nothing is downloaded or built at startup, the python:3.11-slim image is enough (offline deployment).
Double dependency¶
The Squash TM seed depends on two conditions:
perfshop-testmgmt: service_healthy— Squash TM must respond on/squash/isSquashAliveperfshop-forgejo-seed: service_completed_successfully— the Forgejo seed must have succeeded: theperfshop-ciCI account and theperfshop-testsrepository exist when the trainer declares the SCM server in Squash TM. The Squash seed itself reads no token.
This double dependency is one of the most constrained startup chains of the whole PerfShop stack: a failure of the Forgejo seed (exit code 1) prevents the Squash seed from starting.
What the seed does¶
sequenceDiagram
autonumber
participant S as squash-seed
participant STM as perfshop-testmgmt
S->>STM: GET /squash/isSquashAlive<br/>(30 × 15 s)
STM-->>S: 200 {"isAlive":"true"}
Note over S: 5 s margin
loop pages of the list (50 projects per page)
S->>STM: GET /squash/api/rest/latest/projects?page=N (Basic)
STM-->>S: 200 (401: credentials refused ⇒ exit 1)
end
alt "PerfShop QA" found on a page
S->>S: nothing to do
else missing from every page
S->>STM: POST /squash/api/rest/latest/projects<br/>{"_type":"project","name":"PerfShop QA",…}
STM-->>S: 201 Created
end
S->>STM: GET /squash/backend/system-view (Basic)
STM-->>S: 200, current messages + XSRF-TOKEN cookie
loop login message, then welcome message
alt different from PerfShop's
S->>STM: POST /squash/backend/system/messages/login-message<br/>(or welcome-message) — Basic + XSRF token (header and cookie)
STM-->>S: 200
end
end
Note over S,STM: exit 0, or 1 if Squash is unreachable, the list unreadable, the creation refused, the messages unreadable or refused
The seed creates the PerfShop QA project, if it does not exist, and sets the PerfShop messages (below). It looks for it on every page of the list: a project placed beyond the first page (more than 20 projects, for example one project per trainee group) is not created again. If the list cannot be read, it creates nothing and exits with 1. The password is never written in the log.
Exit code: 0 if the project exists (created or already there) and both messages are PerfShop's, 1 otherwise — a failure shows in docker compose ps -a (Exited (1)) and in the summary of docker logs perfshop-squash-seed.
Login page and welcome page messages¶
The message Squash TM shows by default on its login page — a public page — and on its welcome page names the
default administrator account (finding (28), measured on the NAS public page on 2026-10-15; decision of
2026-10-16: "neutral message"). The seed sets two PerfShop messages instead, which name no account — the login
page tells students to sign in with the account their trainer gave them, the welcome page's accounts being for
the trainer and demonstrations —, in the platform's language
(PERFSHOP_LANG: fr by default, en; any other value falls back to French). At every start, a message that has
changed gets PerfShop's back: a message edited in the Squash TM administration does not survive the next
docker compose up.
No SQL: the seed goes through the administration API, like its UI (measured on Squash TM 9.0.0 on
2026-10-18) — GET /squash/backend/system-view returns the current messages and sets the XSRF-TOKEN cookie;
then POST /squash/backend/system/messages/login-message (and welcome-message), body {"loginMessage": "…"},
with the account (Basic) and the token, as an X-XSRF-TOKEN header and as a cookie. Without the token, or
without an account, Squash returns 401. Neither the token nor the password is written to the log.
Check without an account: GET /squash/backend/login-page (what the login page reads) returns the
loginMessage field.
Minimalist seed
The Squash TM seed is intentionally minimalist: it does not create test cases, campaigns, requirements, nor the SCM and automation servers. This is deliberate — students are left to discover how to create these artifacts in the web UI, which is one of the pedagogical goals; the servers are declared by hand (Squash TM configuration).
Measurements of 2026-09-28¶
- First startup without Internet: QA chain replayed as the compose defines it on an internal Docker network (no way out), everything fresh — Forgejo, Forgejo seed (exit code 0), PostgreSQL, Squash TM 9.0.0 (healthy in less than a minute, without Internet), Squash seed: exit code 0,
PerfShop QAproject created; rerun: exit code 0, still a single project. - More than 20 projects: with 25 other projects, the former seed (which only read the first page) created the project, then on rerun no longer found it, tried to create it again and exited with 1 at every startup (Squash answers 412: name already used); the current seed finds it on page 2 (exit code 0).
- The former definition (image built with
pip install requests) does not start without a build, and thispip installfails without network (exit code 1 after 10 s).
Tests: squash-seed/test_seed.py (fake Squash TM reachable over HTTP, standard library):
docker run --rm --pull never -v "$PWD/squash-seed:/t:ro" -w /t python:3.11-slim python -B -m unittest -v test_seed
From the repository root; under Git Bash (Windows), prefix with MSYS_NO_PATHCONV=1.
Healthcheck and public endpoint¶
The http://perfshop-testmgmt:8080/squash/isSquashAlive endpoint is public (no authentication) and returns 200 OK with a simple body when Squash TM is ready to serve. It is the target of the Docker healthcheck (start_period: 120s) and of the seed polling.
Once healthy, Squash TM exposes its full UI at http://localhost:9086/squash/ (default host port).
Communication with other services¶
flowchart LR
STM["perfshop-testmgmt"]
STM -->|"JDBC :5432"| SQDB[("perfshop-squash-db<br/>PostgreSQL 16")]
STM -->|"Git clone/pull :3000<br/>(CI token)"| FG[("perfshop-forgejo")]
STM -->|"POST /jobs (JWT RS512)"| ORCH["perfshop-orchestrator"]
ORCH -.->|"results"| STM
USER["Instructor<br/>(browser)"] -->|"HTTP :9086/squash/"| STM
Three outbound channels:
- To PostgreSQL: all business data (projects, tests, campaigns, executions)
- To Forgejo: regular SCM polling to discover Robot Framework scripts
- To the orchestrator: JWT-signed submission of execution jobs
Volumes¶
| Volume | Mount point | Content |
|---|---|---|
squash-db-data (named) |
/var/lib/postgresql/data |
PostgreSQL data |
./squash-seed/start-plugins.cfg (bind RO) |
/opt/squash-tm/conf/start-plugins.cfg |
List of enabled plugins |
./squash-seed/squash.tm.cfg.properties (bind RO) |
/opt/squash-tm/conf/squash.tm.cfg.properties |
Squash TM Spring properties |
forgejo-token-data (named, RO) |
/token:ro (for the seed) |
Forgejo CI token read by the seed |
Ports¶
| Service | Host port | Container port | Environment variable |
|---|---|---|---|
perfshop-squash-db |
5433 | 5432 | SQUASH_DB_PORT |
perfshop-testmgmt |
9086 | 8080 | SQUASH_HTTP_PORT |
Going further¶
- QA Stack — Overview — complete end-to-end workflow
- Squash Orchestrator — the recipient of JWT jobs
- Forgejo — the SCM polled by Squash TM
- Test Runner — the final target of execution jobs