WebService Test Rollout Plan

Audience: the platform team and module owners sequencing WebService test coverage across Stella Ops services.

This document defines the rollout plan for applying the WebService Test Discipline to all Stella Ops web services.

Overview

Following the pilot implementation on Scanner.WebService (Sprint 5100.0007.0006), this plan defines the order and timeline for rolling out comprehensive WebService tests to all remaining services.


Service Inventory

ServiceModule PathPriorityStatusSprint
Scanner.WebServicesrc/Scanner/StellaOps.Scanner.WebServiceP0 (Pilot)✅ Existing tests5100.0007.0006
Concelier.WebServicesrc/Concelier/StellaOps.Concelier.WebServiceP1PendingTBD
Excititor.WebServicesrc/Excititor/StellaOps.Excititor.WebServiceP1PendingTBD
Policy.Enginesrc/Policy/StellaOps.Policy.EngineP1PendingTBD
Scheduler.WebServicesrc/Scheduler/StellaOps.Scheduler.WebServiceP2PendingTBD
Notify.WebServicesrc/Notify/StellaOps.Notify.WebServiceP2PendingTBD
Authoritysrc/Authority/StellaOps.AuthorityP2PendingTBD
Signersrc/Signer/StellaOps.SignerP3PendingTBD
Attestorsrc/Attestor/StellaOps.AttestorP3PendingTBD
ExportCenter.WebServicesrc/ExportCenter/StellaOps.ExportCenter.WebServiceP3PendingTBD
Registry.TokenServicesrc/Registry/StellaOps.Registry.TokenServiceP3PendingTBD
VulnExplorer.Apisrc/Findings/StellaOps.VulnExplorer.ApiP3PendingTBD
Graph.Apisrc/Graph/StellaOps.Graph.ApiP3PendingTBD
Orchestratorsrc/JobEngine/StellaOps.JobEngineP4PendingTBD

Rollout Phases

Phase 1: Core Data Flow Services (P1)

Timeline: Sprint 5100.0008.* (Q1 2026)

Services:

Rationale: These services form the core data flow pipeline. They have high traffic, complex contracts, and critical security boundaries.

Test Requirements:

Test TypeConcelierExcititorPolicy
Contract (OpenAPI)RequiredRequiredRequired
OTel tracesRequiredRequiredRequired
Negative testsRequiredRequiredRequired
Auth/AuthZRequiredRequiredRequired
Tenant isolationRequiredRequiredRequired

Phase 2: Scheduling & Notification Services (P2)

Timeline: Sprint 5100.0009.* (Q2 2026)

Services:

Rationale: These services support operational workflows. Authority is critical for security testing of all other services.

Test Requirements:

Test TypeSchedulerNotifyAuthority
Contract (OpenAPI)RequiredRequiredRequired
OTel tracesRequiredRequiredRequired
Negative testsRequiredRequiredRequired
Auth/AuthZN/A (system)RequiredN/A (self)
Token issuanceN/AN/ARequired

Phase 3: Signing & Attestation Services (P3)

Timeline: Sprint 5100.0010.* (Q2-Q3 2026)

Services:

Rationale: These services have specialized contracts and lower traffic. They require careful security testing due to cryptographic operations.

Test Requirements:

Test TypeSignerAttestorOthers
Contract (OpenAPI)RequiredRequiredRequired
OTel tracesRequiredRequiredRequired
Negative testsRequiredRequiredRequired
Crypto validationRequiredRequiredN/A

Phase 4: Orchestration Services (P4)

Timeline: Sprint 5100.0011.* (Q3 2026)

Services:

Rationale: Orchestrator is a meta-service that coordinates other services. Testing depends on other services being testable first.


Test Coverage Targets

Minimum Requirements (PR-Gating)

Test CategoryMin CoverageLane
Contract (OpenAPI)100% of public endpointsContract
Negative (4xx errors)100% of error codesUnit/Security
Auth/AuthZ100% of protected endpointsSecurity
Test CategoryTarget CoverageLane
OTel traces80% of endpointsIntegration
Tenant isolation100% of data endpointsSecurity
Performance baselinesKey endpointsPerformance

Implementation Checklist per Service

## <Service Name> WebService Tests

### Setup
- [ ] Create `<Service>ApplicationFactory` (WebApplicationFactory)
- [ ] Create `<Service>TestFixture` if custom setup needed
- [ ] Add test project: `StellaOps.<Service>.WebService.Tests`
- [ ] Add reference to `StellaOps.TestKit`

### Contract Tests
- [ ] Extract OpenAPI schema snapshot (`Snapshots/<service>-v1.json`)
- [ ] Add schema stability test
- [ ] Add response contract tests for key endpoints

### OTel Tests
- [ ] Add trace assertion tests for key endpoints
- [ ] Verify required tags (tenant.id, request.id, http.route)

### Negative Tests
- [ ] Malformed content type → 415
- [ ] Oversized payload → 413
- [ ] Method mismatch → 405
- [ ] Missing required field → 400
- [ ] Invalid field value → 400

### Auth Tests
- [ ] Anonymous request → 401
- [ ] Expired token → 401
- [ ] Missing scope → 403
- [ ] Cross-tenant access → 404/403

### CI Integration
- [ ] Verify traits assigned: Contract, Security, Integration, Unit
- [ ] PR passes all lanes
- [ ] Add to TEST_COVERAGE_MATRIX.md

Sprint Planning Template

When creating sprints for new service tests:

# Sprint 5100.XXXX.YYYY - <Service> WebService Tests

## Topic & Scope
- Apply WebService test discipline to <Service>.WebService
- Contract tests, OTel traces, negative tests, auth tests
- **Working directory:** `src/<Module>/__Tests/StellaOps.<Module>.WebService.Tests`

## Delivery Tracker
| # | Task ID | Status | Task Definition |
|---|---------|--------|-----------------|
| 1 | WEBSVC-XXXX-001 | TODO | Create <Service>ApplicationFactory |
| 2 | WEBSVC-XXXX-002 | TODO | Add OpenAPI contract tests |
| 3 | WEBSVC-XXXX-003 | TODO | Add OTel trace tests |
| 4 | WEBSVC-XXXX-004 | TODO | Add negative tests (4xx) |
| 5 | WEBSVC-XXXX-005 | TODO | Add auth/authz tests |
| 6 | WEBSVC-XXXX-006 | TODO | Update TEST_COVERAGE_MATRIX.md |

Success Metrics

MetricTargetMeasurement
Services with contract tests100%Count of services with OpenAPI snapshot tests
Services with auth tests100%Count of services with auth boundary tests
Contract test failures in production0Breaking changes detected in staging
Security test coverage100% of auth endpointsAudit of protected routes vs tests

Risks & Mitigations

RiskImpactMitigation
Services lack OpenAPI specCannot do contract testingGenerate spec via Swashbuckle/NSwag
OTel not configured in serviceCannot verify tracesAdd OTel middleware as prerequisite
Auth disabled in test modeFalse confidenceTest with auth enabled, use test tokens
Test fixtures are slowCI timeoutShare fixtures, use in-memory providers

References


Last updated: 2025-06-30 · Sprint 5100.0007.0006