This test suite provides comprehensive edge case validation for Scriptographer without modifying any application code. It includes automated tests, manual verification procedures, and test data generators.
tests/
├── run_all_tests.ps1 # Master test runner (START HERE)
├── edge_case_tests.ps1 # Automated test harness
├── generate_test_scripts.ps1 # Generates 10 test scripts
├── generate_target_lists.ps1 # Generates 10 target lists
├── MANUAL_VERIFICATION_CHECKLIST.md # Manual testing guide
└── README.md # This file
cd c:\Dev\Scriptographer\tests
.\run_all_tests.ps1This will:
- Check prerequisites (PowerShell version, WinRM, admin rights)
- Generate test data (scripts and target lists)
- Run 30+ automated tests
- Generate comprehensive report
Output: test_results_YYYYMMDD_HHMMSS\TEST_REPORT.md
.\run_all_tests.ps1 -QuickRuns only critical network and script content tests.
.\run_all_tests.ps1 -GenerateOnlyCreates test scripts and target lists for manual testing in the application.
-
Network & Connectivity (10 tests)
- Invalid hostnames
- Localhost variations
- Timeout handling
- DNS failures
-
Script Content (8 tests)
- Special character escaping (quotes, unicode)
- Large scripts (10KB+)
- Empty scripts
- Syntax errors
- Exception handling
- Multiline scripts
-
Execution Methods (5 tests)
- PsExec availability
- WinRM service status
- PS Remoting to localhost
- C$ share access
- Temp directory write access
-
Target Specifications (5 tests)
- Empty targets
- Whitespace-only targets
- Duplicate detection
- Mixed valid/invalid targets
- Large target lists (1000+)
See MANUAL_VERIFICATION_CHECKLIST.md for detailed step-by-step instructions.
The generated TEST_REPORT.md includes:
- Executive Summary: Pass/fail counts and overall pass rate
- Prerequisites Check: System configuration validation
- Results by Category: Breakdown by test category
- Detailed Results: Table of all test outcomes
- Recommendations: Critical issues and warnings
- Next Steps: Suggested follow-up actions
- 95%+: ✓ Excellent - Robust edge case handling
- 80-94%: ⚠ Good - Minor improvements recommended
- 60-79%: ⚠ Fair - Several issues to address
- <60%: ✗ Needs Improvement - Significant work required
.\generate_test_scripts.ps1
.\generate_target_lists.ps1This creates:
test_scripts\- 10 PowerShell scripts covering edge casestest_targets\- 10 target list files
- Open Scriptographer application
- For each file in
test_scripts\:- Create new script
- Copy content (skip the Name/Description/Tags lines)
- Save with descriptive name
Follow the checklist in MANUAL_VERIFICATION_CHECKLIST.md:
- Network & Connectivity (3 tests)
- Script Content (6 tests)
- Execution Methods (3 tests)
- Target Specifications (4 tests)
- Database Operations (3 tests)
- UI/Frontend (3 tests)
- Critical Edge Cases (4 tests)
Use the checklist to track:
- Tests passed
- Tests failed
- Issues discovered
- Recommendations
These are the highest-priority edge cases based on code analysis:
Risk: Nested quotes may break script execution
Test: Execute script with 'It''s a "test"' via PS Remoting
Expected: Output matches input exactly
Risk: Failed cleanup leaves .ps1 files on remote systems
Test: Check C:\Temp for leftover script_*.ps1 files
Expected: No leftover files after execution
Risk: Ping succeeds but WinRM fails
Test: Execute on target where WinRM is disabled
Expected: Clear error message about WinRM
Risk: Scripts running longer than 60s hang indefinitely
Test: Execute 30-second script, verify completion
Expected: Completes within timeout, no hang
| Category | Critical | High | Medium | Low | Total |
|---|---|---|---|---|---|
| Network | 4 | 3 | 2 | 1 | 10 |
| Script Content | 3 | 4 | 2 | 1 | 10 |
| Execution Methods | 4 | 3 | 2 | 0 | 9 |
| Target Specs | 2 | 2 | 2 | 1 | 7 |
| Database | 3 | 2 | 1 | 0 | 6 |
| Error Handling | 3 | 2 | 1 | 0 | 6 |
| UI/Frontend | 1 | 2 | 2 | 1 | 6 |
| TOTAL | 20 | 18 | 12 | 4 | 54 |
Start-Service WinRM
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "localhost" -ForceRight-click PowerShell → "Run as Administrator"
Download from: https://docs.microsoft.com/en-us/sysinternals/downloads/psexec
Ensure PS Remoting is enabled:
Enable-PSRemoting -Force01_special_characters.txt- Quote and unicode handling02_long_running.txt- 30-second timeout test03_error_throw.txt- Exception handling04_large_output.txt- 100KB output test05_syntax_error.txt- Malformed script06_empty_script.txt- Empty content07_memory_intensive.txt- Large array operations08_multiple_commands.txt- Sequential commands09_file_operations.txt- File create/delete10_network_operations.txt- Connectivity tests
invalid_hostnames.txt- DNS failure scenarioslocalhost_variations.txt- Different localhost referencesmixed_targets.txt- Valid/invalid/empty mixlarge_target_list.txt- 1000 targetsduplicate_targets.txt- Duplicate detectionempty_targets.txt- Only whitespacespecial_char_targets.txt- Invalid charactersip_addresses.txt- IPv4/IPv6 addressesunreachable_targets.txt- Timeout scenariossingle_target.txt- Single target test
- Run automated tests first to identify systemic issues
- Review the test report before manual testing
- Test one category at a time to isolate issues
- Document all failures with screenshots/logs
- Retest after fixes to verify resolution
- Test on clean system for accurate results
For questions or issues with the test suite:
- Review
edge_case_test_plan.mdfor detailed test descriptions - Check
MANUAL_VERIFICATION_CHECKLIST.mdfor step-by-step procedures - Examine test output logs in
test_results_*\directories
The application passes edge case testing if:
- ✓ No Silent Failures: All errors logged and visible
- ✓ No Crashes: Application remains stable
- ✓ Data Integrity: Database stays consistent
- ✓ Clear Errors: Users understand what went wrong
- ✓ Proper Cleanup: Temp files removed
- ✓ Accurate Counts: Success/fail counts match reality
- ✓ Timeout Enforcement: No indefinite hangs
- ✓ Resource Cleanup: No memory/handle leaks
Last Updated: 2026-02-10
Test Suite Version: 1.0
Compatible with: Scriptographer 1.0.0