Completion of Marketstack API E2E tests
Ticket #221: Completion of Marketstack API E2E tests
Type: Automation / API Testing / Security
Affected Component: e2e/src/tests/marketstackApi.spec.ts, e2e/scripts/save-windows-secrets.ps1, e2e/scripts/run-with-windows-secrets.ps1, e2e/src/utils/requiredEnv.ts, e2e/package.json, .github/workflows/deploy.yml, docs/tests/pipeline.md, docs/fr/tests/pipeline.md, docs/features/chapter3.md, docs/fr/features/chapter3.md
1. Context and objective
This intervention continues the work started in Task 6 - Advanced API tests (Ticket #172). That earlier step established technical API testing capabilities. This new step focused on a concrete target: validating a real business process tied to Marketstack.
The goal of this session was to finalize a suite that is useful in production operations: business-oriented API validation, secure local and CI execution, and documentation aligned with the real state of the repository.
2. Initial problems identified
Before this intervention, validation was incomplete on critical points:
- no dedicated Marketstack suite validating the core business flow;
- inconsistent local and CI execution for API key handling;
- test status pages not fully synchronized with the implemented coverage;
- operator commands for E2E/API execution spread across documentation.
3. Implemented solutions
The following actions were implemented:
-
Dedicated Marketstack E2E suite
- created
marketstackApi.spec.tsaround business-relevant API calls; - added coverage for key incidents (timeout, server error, invalid JSON);
- added explicit CI failure rules for missing or invalid API keys.
- created
-
Windows local secret security
- extended the local DPAPI vault to include
MARKETSTACK_API_KEY; - added a targeted
-Target marketstackupdate mode; - kept runtime-only in-memory injection, with no plaintext storage in the repository.
- extended the local DPAPI vault to include
-
CI validation aligned with business need
- added a dedicated GitHub Actions step for Marketstack tests;
- explicit failure when
MARKETSTACK_API_KEYis missing; - targeted reproducible execution through
test:marketstack:ci.
-
EN/FR documentation and command alignment
- activated
tc-pipe-api01andtc-pipe-api02in pipeline test pages; - updated functional rate to 94%;
- consolidated user-facing E2E/API commands in chapter 3.2.5.
- activated
4. Validation and results
Validation confirmed that:
- critical API scenarios are covered with clear failure signaling;
- the Marketstack key is not handled in plaintext in the standard workflow;
- operator documentation reflects the real implementation status.