Test 1: Instantiation - Full Form (CreateObject)
1. Creating WScript.Shell using CreateObject('WScript.Shell')
PASSED: WScript.Shell object created successfully
Object Type: Object
Test 2: Instantiation - Object Verification
2. Verifying shell object is not empty or Nothing
PASSED: Shell object is valid and not Nothing
Test 3: Run Method - Basic Command Execution
3. Execute basic command: 'echo test' with WaitOnReturn=True
PASSED: Command executed
Exit Code: 127 (0 = success)
Note: Exit code was 127 but command executed
Test 4: Run Method - Error Handling
4. Execute invalid command and verify error handling
Invalid Command Exit Code: 127
Expected: Non-zero or negative value indicating failure
PASSED: Error handled correctly (non-zero exit code)
Test 5: Exec Method - WScriptExecObject Creation
5. Execute command using Exec() method
PASSED: Exec() returned WScriptExecObject
Object Type: Object
Test 6: WScriptExecObject - Properties
6. Validate ExecObject properties (Status, ExitCode, ProcessID)
PASSED: Properties accessible
| Property | Value | Description |
|---|
| Status | 0 | 0=Running, 1=Done |
| ProcessID | 69784 | Process ID (PID) |
Test 7: WScriptExecObject - Output Streams
7. Access and validate StdOut stream from Exec object
PASSED: StdOut stream object accessible
Stream Type: Object
Test 8: WScriptExecObject - WaitUntilDone Method
8. Wait for process to complete using WaitUntilDone()
PASSED: WaitUntilDone() executed
Wait Result: True (True=completed, False=timeout)
Test 9: Run Method - WaitOnReturn Parameter
9. Execute with WaitOnReturn=True (wait) vs False (no wait)
PASSED: Both WaitOnReturn modes executed
| Mode | Value | ExitCode |
|---|
| With Wait | True/1 | 127 |
| Without Wait | False/0 | 0 |
Test 10: Environment Variables - GetEnv
10. Retrieve environment variables using GetEnv
PASSED: Environment variables retrieved
| Variable | Value (Truncated) | Length |
|---|
| PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:... | 60 |
| TEMP | | 0 |
| USERPROFILE | | 0 |
Test 11: Run Method - Window Style Parameter
11. Execute with different window styles (hidden=0, normal=1)
PASSED: Different window styles executed
| Style | Description | ExitCode |
|---|
| 0 | Hidden window | 127 |
| 1 | Normal window | 127 |
Test 12: Error Handling & Invalid Parameters
12. Test with empty/null parameters and error handling
PASSED: Empty command returned error code (-1)
Test 13: Object Cleanup & State
13. Verify object remains valid throughout test suite
PASSED: Shell object still valid and accessible
PASSED: Shell methods still callable
Test 14: Type Information & Validation
14. Verify object type information
| Check | Result |
|---|
| IsObject(shell) | True |
| TypeName(shell) | Object |
| shell Is Nothing | False |
PASSED: Object type validation successful
Test 15: Execute test.bat and Capture Output
15. Run test.bat, capture StdOut, and validate ExitCode
Command: cmd /c /opt/axonasp/www/tests/test.bat 2>&1
| Field | Value |
|---|
| Batch Path | /opt/axonasp/www/tests/test.bat |
| WaitUntilDone | True |
| ExitCode | 127 |
| StdOut | |
FAILED: Unexpected batch output or exit code
TEST SUMMARY
| Metric | Count | Percentage |
|---|
| Total Tests | 15 | 100% |
| Passed | 14 | 93% |
| Failed | 1 | 6% |
⚠ MOSTLY PASSED - 1 failures detected