-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Parent: #319
Summary
Implement scale and smoke scenarios that validate generator behavior under realistic load and provide end-to-end validation of the complete workflow. These scenarios ensure the plugin works at scale and can handle full publish→install→generate flows.
Objectives
- Verify generator performance and correctness with many libraries (≥10)
- Validate complete end-to-end workflow from publish to move
- Ensure plugin handles realistic workspace sizes
Scope / Scenario Details
1. SCALE-LIBS - Generate 10+ libs then one lib→lib move
Purpose: Verify performance and correctness with larger workspace
Setup:
- Workspace with ≥10 libraries
- Each library has 2-3 files
- Libraries have interconnected imports (realistic dependency graph)
Implementation:
# Generate 10+ libraries using harness
for i in {1..10}; do
nx generate @nx/js:library lib-$i
done
# Perform a single move between two libraries
nx generate @nxworker/workspace:move-file --source=libs/lib-5/src/lib/util.ts --destination=libs/lib-7/src/libAssertions:
- Move completes successfully (no timeout)
- Imports updated correctly despite large workspace
- No unintended side effects in other libraries
- Performance is reasonable (< 30 seconds for move)
Notes:
- This scenario validates the generator scales to realistic workspace sizes
- Helps identify performance bottlenecks
- Does NOT measure performance metrics (that's in separate benchmark issue E2E Benchmark regression testing #242)
2. SMOKE-SENTINEL - Combined publish+install+single move
Purpose: End-to-end smoke test covering full workflow
Setup:
- Fresh workspace with 1 app + 1 library
- No pre-existing state
Implementation:
# 1. Publish plugin to local registry (reuse from orchestrator)
# 2. Create new workspace with app + lib
npx create-nx-workspace smoke-test --preset=apps
# 3. Install plugin
npm install @nxworker/workspace --registry=http://localhost:4873
# 4. Generate library
nx generate @nx/js:library lib-shared
# 5. Perform app→lib move
nx generate @nxworker/workspace:move-file --source=apps/smoke-test/src/app/helper.ts --destination=libs/lib-shared/src/lib
# 6. Build and verify
nx build smoke-testAssertions:
- Every step succeeds (publish, install, generate, move, build)
- Plugin is properly installed and discoverable
- Move works correctly in fresh workspace
- App builds successfully after move
- App can import from library
Notes:
- This is the ultimate "does it work" scenario
- Combines infrastructure + basic move + app-to-lib patterns
- Should be relatively fast (~2-3 minutes) since it's only 1 app + 1 lib
Tasks
- Implement SCALE-LIBS scenario with 10+ library workspace
- Implement SMOKE-SENTINEL scenario with full workflow
- Add performance reasonableness checks (not strict benchmarks)
- Ensure both scenarios use stdio: 'inherit' for visibility
- Update orchestrator to call implementations instead of placeholders
Acceptance Criteria
- Both scenarios pass locally on Windows and Linux
- SCALE-LIBS completes successfully with ≥10 libraries
- SMOKE-SENTINEL validates complete publish→install→move workflow
- Performance is reasonable (SCALE-LIBS < 30s move, SMOKE-SENTINEL < 3min total)
- Both scenarios provide clear visibility into progress via stdout
Dependencies
- Issue test(e2e): implement harness utilities for new test suite #320 (harness utilities) - completed
- Issue test(e2e): add orchestrator spec for e2e target #321 (orchestrator spec) - completed
- Issue test(e2e): implement infrastructure scenarios #332 (infrastructure scenarios) - SMOKE-SENTINEL reuses registry/publish
Out of Scope
- Strict performance benchmarks (covered by E2E Benchmark regression testing #242)
- Measurement/metrics collection
- Stress testing beyond 10 libraries
Definition of Done
Scale and smoke scenario implementations merged; orchestrator executes them with real assertions; all tests passing; both scenarios provide realistic validation.
Metadata
Metadata
Assignees
Labels
No labels