Manual Testing Procedures for Visiowings¶
This manual testing guide provides comprehensive, step-by-step instructions to verify the reliability and correctness of visiowings after robustness improvements. Each section lists prerequisites, actions, and expected outcomes.
📋 For release sign-off, use UAT Checklist instead. This page is the tutorial-style deep dive on individual features. The UAT page is the structured pass/fail checklist a tester runs before approving a release; it includes installation, supply-chain verification, and the Phase A–H tooling that this page predates.
Table of Contents¶
- Prerequisites
- Core Functional Tests
- Exporting VBA Modules
- Importing VBA Modules
- Live Editing (File Watcher)
- Bidirectional Sync
- Multi-Document Handling
- Robustness & Edge Case Tests
- File System Race Conditions
- Encoding Edge Cases
- Error Handling (Permissions, Connection Loss)
- Shutdown Reliability
- Document Module Protection
- Folder/Module Naming
Prerequisites¶
- Windows OS, Python 3.8+
- Microsoft Visio with VBA support (Trust access to VBA project object model enabled)
- Test Visio files (at least one
.vsdmwith VBA code) - Visual Studio Code (or compatible text editor)
- Git Bash or similar terminal
Core Functional Tests¶
1. Exporting VBA Modules¶
Goal: Ensure modules are exported to disk in correct format
Steps:¶
- Open a
.vsdmor.vsdxmacro-enabled Visio document with VBA code. - In terminal:
- Confirm output directory is created with subfolders for each open document (drawing, stencil, template, etc).
- Verify that
.bas,.cls,.frmfiles are present. - Open files in your text editor and check for:
Attribute VB_Name = "..."present- No extra VERSION/Begin/End/MultiUse headers
- Encoding is UTF-8 (check in VS Code status bar)
Expected: - All modules exported, headers are stripped, encoding is correct.
2. Importing VBA Modules¶
Goal: Ensure modules can be imported from disk to Visio, repairing headers as needed
Steps:¶
- Save a
.bas/.clsfile with edited code (try changing a Sub/adding new lines). - In terminal:
- In Visio, open VBA editor and verify that changes are reflected.
Expected:
- Modules update as expected.
- No import errors for valid code.
- For files missing Attribute VB_Name, header is added automatically.
3. Live Editing (File Watcher)¶
Goal: Verify live sync (file changes in editor sync to Visio automatically)
Steps:¶
- In terminal:
- Edit a module in VS Code, save the file.
- Within 1-2s, check console for "Change detected" and "Imported" messages.
- In Visio VBA editor, verify that code is updated automatically.
Expected: - Changes detected instantly and synced to Visio. - No errors/logging of failures.
4. Bidirectional Sync¶
Goal: Confirm changes made in Visio are reflected back to code files
Steps:¶
- Start watcher in bidirectional mode:
- In Visio VBA editor, change/add a procedure, save Visio file.
- Wait up to 5 seconds.
- Open code file in VS Code and check if updates appear.
Expected: - Changes in Visio exported back to files within polling interval.
5. Multi-Document Handling¶
Goal: Verify exports/imports work for open drawings, stencils, templates simultaneously
Steps:¶
- Open primary drawing file and a custom stencil/template (each with VBA) in Visio.
- Start watcher and export as before.
- Confirm files appear in separate subfolders (e.g.
drawing/,mystencil/). - Edit files in each folder and check sync/import/export for all.
Expected: - File association by document folder works for all types. - No cross-document overwrites or missing modules.
Robustness & Edge Case Tests¶
6. File System Race Conditions¶
Goal: Check that rapid/simultaneous edits are handled gracefully
Steps:¶
- Edit and save the same module file multiple times quickly (<1s between saves).
- Confirm "Debouncing" messages appear in debug mode and sync does not loop or error.
Expected: - Rapid changes only trigger one sync per second.
7. Encoding Edge Cases¶
Goal: Ensure encoding loss detection and warnings work
Steps:¶
- Insert characters outside cp1252 (e.g. emoji [translate:😀], CJK [translate:你好]) in a VBA file and attempt import.
- Watch for explicit warning messages in terminal about incompatible characters.
- Verify that imported code does not contain broken or replaced characters (or is skipped with a warning).
Expected: - Warnings shown for incompatible characters. No silent data corruption.
8. Error Handling (Permissions, Connection Loss)¶
Goal: Validate user experience in error situations
Steps:¶
- Attempt import/export while Visio is closed.
- Remove write permission from output directory and try exporting.
- Try importing an intentionally corrupt module file (invalid VBA syntax, missing headers).
Expected: - Clear error messages printed. - No crash, application continues running or exits cleanly.
9. Shutdown Reliability¶
Goal: Ensure Ctrl+C / SIGINT exits gracefully every time
Steps:¶
- While watcher is running, press Ctrl+C at different moments (idle, during active import/export, etc).
- Confirm "Shutting down gracefully" message and all threads stop cleanly.
Expected: - Console returns to prompt, no lingering python processes.
10. Document Module Protection¶
Goal: Ensure document modules (ThisDocument.cls) are protected by --force option
Steps:¶
- Remove or edit
ThisDocument.clsin code files. - Try importing without
--force: - Confirm import is skipped with a warning.
- Now re-run with
--forceflag and confirm import proceeds.
Expected:
- Document modules only overwritten with explicit --force option. Skips silently otherwise.
11. Folder/Module Naming Edge Cases¶
Goal: Confirm correct mapping and handling of odd file/folder names
Steps:¶
- Use document/module names with spaces, hyphens, mixed case, and special characters.
- Confirm all such names are mapped correctly to valid folders/files.
- Ensure import/export does not fail or misassign code modules.
Expected: - All files/folders processed and associated correctly, regardless of name complexity.
12. Rubberduck Integration¶
Goal: Verify directory structure export/import with Rubberduck annotations
Steps:¶
- In a VBA module, add
'@Folder("Parent.Child")annotation. - Run export with flag:
visiowings export ... --rd. - Verify file is exported to
output/Parent/Child/Module.bas. - Move a file to a new subfolder locally (e.g.
output/NewFolder/Module.bas). - Run import with flag:
visiowings import ... --rd. - Verify imported code in Visio contains
'@Folder("NewFolder").
Expected: - Files move to folders based on annotations (export). - Annotations update based on folders (import).
How to Report Issues¶
- Document any test that fails, with steps to reproduce and output/error messages.
- Open issues on GitHub with full details.
- For encoding or data loss bugs, attach a minimal example file.
Summary¶
Following this procedure ensures all core features and critical edge cases in visiowings are tested thoroughly after major robustness or bug fix releases.