forked from vejeta/conquer
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Issue Type
TEST-AUTOMATION - Testing Infrastructure Enhancement
Severity
High - Required for comprehensive game testing
Phase Discovered
Phase 5.10: New Game Setup Implementation - discovered during new_game target development
Description
The new_game target requires interactive input (conqrun -m and conqrun -a) which prevents automated testing of game functionality that depends on having an initialized world.
Current State
- new_game target implemented but requires manual interaction for world creation
conqrun -mprompts for super-user password interactivelyconqrun -aprompts for player addition interactively- This blocks automated testing of many game functions that require a world to exist
Impact Assessment
Critical for Testing Infrastructure:
- Many game functions require an initialized world to test properly
- Unit tests for game logic need world state (nations, players, sectors, etc.)
- Integration tests cannot verify end-to-end game functionality
- Regression testing blocked for world-dependent features
- CI/CD pipeline cannot include comprehensive game testing
Functions Requiring World State:
- Player management and authentication
- Sector operations and world manipulation
- Combat system testing
- Economic/trade system testing
- Navy and military unit operations
- Administrative functions
- Report generation
Recommended Solutions
Option 1: Expect Script Automation
Create expect scripts to automate the interactive portions:
# scripts/automated_world_creation.exp
expect "Enter Super-User Password:" { send "testpass\n" }
expect "Confirm password:" { send "testpass\n" }
# ... handle all interactive promptsOption 2: Non-Interactive Mode Implementation
Investigate adding command-line options for non-interactive world creation:
conqrun -m --password=testpass --non-interactive- Environment variable support:
CONQUER_ADMIN_PASSWORD=testpass - Configuration file approach for test scenarios
Option 3: Test World Templates
Create pre-initialized world data files for testing:
- Minimal test world with basic structure
- Comprehensive test world with full game state
- Scenario-specific test worlds for different test cases
Option 4: Mock/Stub Approach
Implement test-friendly world initialization:
- Test harness that bypasses interactive setup
- In-memory world state for unit testing
- Test fixtures with known world states
Implementation Priority
Phase 6+: Should be addressed during testing infrastructure expansion
- Required before comprehensive game function testing
- Blocks many integration and system tests
- Essential for automated CI/CD testing
Acceptance Criteria
- Automated world creation works without user interaction
- Test worlds can be created with known/predictable state
- Solution works in headless/CI environments
- Multiple test scenarios supported (minimal, full, custom)
- Integration with existing CMake test infrastructure
- Documentation for test world setup and usage
Dependencies
- new_game target implementation (✅ completed in Phase 5.10)
- Testing infrastructure framework (Phase 6)
- Test harness and fixtures design
Files Affected
scripts/- Automation scripts (expect or alternative)tests/- Test infrastructure integrationCMakeLists.txt- Test target integration- Documentation for automated testing procedures
Session History
- Phase 5.10 (2025-09-28): Discovered during new_game target implementation
- Interactive nature of
conqrun -mandconqrun -aidentified as testing blocker
Technical Notes
- Original Makefile has same limitation - not a regression
- Interactive design appropriate for production use
- Testing automation requires separate approach
- Consider security implications of automated password handling
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels