Configuration Squash TM — Guide pas-à-pas¶
Ce guide couvre la configuration complète de Squash TM pour PerfShop après le premier démarrage.
Le seed automatique (perfshop-squash-seed) crée le projet PerfShop QA.
Les serveurs SCM et d'automatisation sont à configurer manuellement selon les étapes ci-dessous.
Accès Squash TM¶
| Environnement | URL |
|---|---|
| NAS prod | https://perfshop-squash.perfshop.io/squash |
| Docker Desktop / build local | http://localhost:9086/squash |
Login : admin / admin
Compte admin
Le compte par défaut Squash TM est admin / admin (pas perfshop).
Le mot de passe peut être changé après la première connexion.
Étape 1 — Serveur de partage de code source (SCM)¶
Administration → Serveurs (icône barre gauche) → onglet </> (Serveurs de partage de code source) → +
Valeurs à saisir¶
| Champ | Valeur |
|---|---|
| Nom | PerfShop |
| Type | Git |
| URL | http://perfshop-forgejo:3000/perfshop-ci/ |
| Protocole d'authentification | basic authentication |
| Login | admin |
| Mot de passe | perfshop |
Cliquer Enregistrer.
Ajouter le dépôt¶
Dans la section Dépôts → + :
| Champ | Valeur |
|---|---|
| Nom du dépôt | perfshop-tests |
| Branche | main |
| Chemin du dossier de travail | tests/bdd_squash |
Cliquer Ajouter.
Le dépôt apparaît avec son chemin local automatique (../git-repositories/perfshop%2Dforgejo%3A300.../tests/bdd_squash).
Contenu du dépôt perfshop-tests
Le dépôt est initialisé automatiquement par perfshop-forgejo-seed au démarrage.
Il contient tous les scripts .robot et .py présents dans test-runner/scripts/.
Étape 2 — Serveur d'exécution automatisée¶
Administration → Serveurs → onglet robot (Serveurs d'exécution automatisée) → +
Valeurs à saisir¶
| Champ | Valeur |
|---|---|
| Nom | PerfShop |
| Type | Squash Orchestrator |
| URL du réceptionist | http://perfshop-orchestrator:7774 |
| URL de l'observer | http://perfshop-orchestrator:7775 |
| URL de l'event bus | http://perfshop-orchestrator:38368 |
| URL du killswitch | http://perfshop-orchestrator:7776 |
| Protocole d'authentification | token authentication |
| Tags d'environnement | linux + robotframework |
Jeton RSA RS512 (obligatoire)¶
Dans le champ Jeton, coller exactement ce token :
eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzcXVhc2ggb3JjaGVzdHJhdG9yIiwic3ViIjoic3F1YXNoLXRtIn0.kGOOzOetXc8kRCekQnzwbZ58A38SWFI99fQUQ6ys_eWqH7o1iSfp9xEIdRMTAPOtqNxK8LFwMmj4DlSCT5bB-Hjdi1wP5lyW1408FYfV3pA-ut6mQAJkrOjiRHBs3WwasUhMhwoPvWm5R8u960XQQJbL7e_BWogZCGL6Oct-HMnjevLji1PF-33i15DMdTfhdg0dP-2N2ZeLoRWWnFXXJ0LxQ5Hx13qLZ2o94hlbCoIVAClMpgqvg-saHJY7ym0Zm8Qv76PJcKONuocek_nTRgmRl4XuEH8_WWZShtkPiDEOHZDSctUkjIAi460ka1U4_WZHCIjHtJkbStxDQ-TuXymB7MmwSuKFFMCYGP8-O4PVreGtOru9Pi4ZP6IcdO8zPTOkKTUIYAXR6ckf86uM3WJ0CCEMHOgGe6ynZVOyqfWczTiQB_KPuntIJGSCcXN9YMBejk5OpGPwWHOhfC-m0vZJSp_hZrBPDBhBoJfuwEnVevpud-IdeprmW9ZM5qa4zKtQnVfrgxDDQDDAfLtpcPqi5vxEIcly2pDNQvYahAYzL48O6bWbxzCwFYodsZ0D3GbWHMzoBoIEOZAGdQ_lr0v5vom0vj2qSbjObz1KPcMZUA3LmCZ35aPXcFilqDHUSDQ8BDrAZ1F0T0sE18b2qLwyd1XlJ4lv6zx1ulYTYXE
Cliquer Enregistrer.
Token RS512 uniquement
Le token commence par eyJhbGciOiJSUzUxMiI (RS512).
Ne jamais utiliser un token commençant par eyJhbGciOiJIUzUxMiJ9 (HS512 personnel — ne fonctionne pas ici).
Vérifier l'environnement disponible¶
Après enregistrement, la section Environnements disponibles doit afficher :
| Nom | Tags d'environnement | Statut |
|---|---|---|
perfshop-test-runner |
linux, robotframework |
IDLE |
Étape 3 — Configuration du projet PerfShop QA¶
Administration → Projets → PerfShop QA → section Automatisation
Valeurs à configurer¶
| Champ | Valeur |
|---|---|
| Technologie d'implémentation BDD | Robot Framework |
| Langue des scripts BDD | Anglais |
| Workflow d'automatisation | Squash simple |
| Utiliser l'arborescence de Squash dans le dépôt | activé (toggle bleu) |
| Serveur de partage de code source | PerfShop (http://perfshop-forgejo:3000/perfshop-ci) |
| Dépôt | perfshop-tests (main) |
| Serveur d'exécution automatisée | PerfShop |
| Tags d'environnements par défaut | linux + robotframework |
Cliquer Enregistrer.
La section Environnements disponibles doit afficher perfshop-test-runner avec statut IDLE.
Étape 4 — Créer les cas de test¶
Espace Cas de test → PerfShop QA → + → Nouveau cas de test
Onglet Automatisation :
| Champ | Valeur (exemple CT-001) |
|---|---|
| Éligibilité | Éligible |
| Technologie | Robot Framework |
| Référence | perfshop-tests/smoke-test.robot |
| Statut | Automatisé |
| Cas de test | Référence du script | Type |
|---|---|---|
CT-001 Smoke test API |
perfshop-tests/smoke-test.robot |
Robot Framework |
CT-002 Cohérence prix panier |
perfshop-tests/CT-002-prix-coherence.robot |
Robot Framework |
CT-003 Prix panier pytest |
perfshop-tests/test_prix_panier.py |
pytest / Selenium |
Format de la référence
Format correct : perfshop-tests/fichier.robot (sans espaces autour du /)
Étape 5 — Lancer les tests¶
- Espace Campagnes → PerfShop QA → + → Nouvelle campagne
- Dans la campagne → + → Nouvelle itération
- Dans l'itération → + → Ajouter des cas de test → sélectionner CT-001, CT-002, CT-003
- Cliquer l'icône Exécuter automatiquement (triangle play avec rouages)
Résultat attendu : statut Succès (vert) sur tous les cas de test.
Résumé de la configuration¶
Squash TM (admin/admin)
├── Administration → Serveurs
│ ├── SCM (onglet </>)
│ │ └── PerfShop
│ │ ├── Type : Git
│ │ ├── URL : http://perfshop-forgejo:3000/perfshop-ci/
│ │ ├── Login : admin / perfshop
│ │ └── Dépôt : perfshop-tests (main)
│ │
│ └── Exécution automatisée (onglet robot)
│ └── PerfShop
│ ├── Type : Squash Orchestrator
│ ├── URLs : :7774 (réceptionist) / :7775 (observer) / :38368 (event bus) / :7776 (killswitch)
│ ├── Jeton : eyJhbGciOiJSUzUxMiI... (RS512)
│ └── Environnement : perfshop-test-runner [linux, robotframework] IDLE
│
└── Administration → Projets → PerfShop QA → Automatisation
├── SCM : PerfShop / perfshop-tests (main)
├── Serveur autom : PerfShop
├── Workflow : Squash simple
├── Technologie : Robot Framework
└── Tags : linux + robotframework
Problèmes fréquents¶
Le token est refusé¶
Le token HS512 a été utilisé à la place du RS512. → Cliquer Effacer le jeton puis coller le token RS512 ci-dessus.
L'environnement n'apparaît pas¶
Le container perfshop-test-runner n'est pas démarré.
→ docker compose restart perfshop-orchestrator
La référence du script génère une erreur "file not found"¶
Des espaces entourent le / dans la référence.
→ Corriger en perfshop-tests/smoke-test.robot (sans espaces)
Le dépôt ne se clone pas depuis Squash¶
L'URL pointe vers un mauvais serveur ou les credentials sont incorrects.
→ Vérifier que l'URL SCM est http://perfshop-forgejo:3000/perfshop-ci/
→ Le login doit être admin / perfshop
Connexion SCM refusée — authentication not supported¶
Le mot de passe du compte CI contient des caractères spéciaux (/, *) mal encodés par jGit 6.10.
→ Utiliser un mot de passe alphanumérique simple (ex: perfshop) pour le compte perfshop-ci.
→ Vérifier la variable FORGEJO_CI_PASSWORD dans .env ou docker-compose.desktop.yml.