πŸ§ͺ Testing Suite

Comprehensive Test Framework for Blade Generation

πŸ“‹ Testing Overview

The testing framework ensures blade generation quality, performance, and regression prevention across all system components.

βœ… Current Test Status

SuiteTestsPassingStatus
Integration Tests5 modes5/5βœ… PASS
JSON Parser6 tests6/6βœ… PASS
Timing Suite96 permutations-πŸ”„ Ready
Regression Suite--πŸ“ Planned

πŸƒ Test Runner Architecture

Master Test Runner

A unified macro that orchestrates all test suites with logging and reporting:

'*** Master Test Runner - fxTestRunner.ovm
'*** Usage: call fxTestRunner i_mode
'***
'***   Mode 0: Run ALL test suites (full regression)
'***   Mode 1: Quick smoke test (key scenarios only)
'***   Mode 2: Performance timing suite only
'***   Mode 3: Integration tests only
'***   Mode 4: Generate HTML report from last run

Test Suites

SuiteMacroPurpose
Integration fxIntegrationTest.ovm End-to-end JSON→Blade pipeline validation
Timing fxTestBladeTimingSuite.ovm Performance benchmarks (48 permutations)
Unit Tests fxTestUnitSuite.ovm Individual function validation
Regression fxTestRegression.ovm Compare against saved baselines
Edge Cases fxTestEdgeCases.ovm Boundary conditions, error handling

πŸ”¬ Integration Test Modes

File: io\json\testing\fxIntegrationTest.ovm

ModeSphereBladesVerboseDescription
0ON (forced)1OFFDemo mode - shows sphere progress
1OFF1OFFProduction - fastest, no sphere
2OFF1ONDebug - extra output, no sphere
3ON (forced)5OFFPresentation - multi-blade demo
99varies1OFFBENCHMARK - runs all optimization combos
'*** Example usage:
call fxIntegrationTest 0 80      ' Demo with body 80
call fxIntegrationTest 1 0       ' Quick production test
call fxIntegrationTest 99 80     ' Full benchmark suite

⏱️ Timing Suite Permutations

File: modeling\blade\testing\fxTestBladeTimingSuite.ovm

Test Variables (96 permutations = 2Γ—2Γ—2Γ—3Γ—2Γ—2)

VariableValuesGlobal
Progress DisplayOFF (0), ON (1)i_FX_SHOW_PROGRESS
Limit View ModeOFF (0), ON (1)i_FX_LIMIT_VIEW_MODE
OGL GraphicsOFF, ONogl don/ena dra
Mosaic FilterAUTO (0), ALWAYS (1), NEVER (2)i_FX_MOSAIC_FILTER_MODE
Blade TypeOrthogonal, Compound (15Β°)Normal vector
WatertightOFF (0), ON (1)Pre-processed body

πŸ†• Watertight Dimension (Jan 2026)

The timing suite now includes watertight preprocessing as a test dimension:

  • Creates watertight body once upfront using fxMakeWatertight
  • Uses call fxHideAllSolids / call fxShowAllSolids during creation
  • Tests blade generation on both original and watertight bodies
  • If sphere initialized, fxMakeWatertight v1.3 shows progress

Test Modes

ModeTestsDescription
096Full permutation suite (48 configs Γ— 2 watertight states)
116Quick key configurations (8 configs Γ— 2 watertight)
23Watertight comparison only
99-Geometry setup only
1001Single test with current globals
'*** CSV Output Format:
TEST,NUM,NAME,PROGRESS,LIMITVIEW,OGL,FILTER,BLADE,WATERTIGHT,AVG_TIME,SHEETS,ITERATIONS

🎯 Specific Test Cases

Blade Configuration Tests

Test CaseDescriptionExpected Result
TC-BLD-001Orthogonal blade (X normal)Clean profile, no artifacts
TC-BLD-002Orthogonal blade (Y normal)Clean profile, no artifacts
TC-BLD-003Orthogonal blade (Z normal)Clean profile, no artifacts
TC-BLD-004Compound angle (15Β° Z rotation)Valid profile at angle
TC-BLD-005Compound angle (45Β° arbitrary)Valid profile at angle
TC-BLD-006Blade through hollow regionGraceful handling or warning
TC-BLD-007Blade at part edgePartial profile or skip
TC-BLD-008Blade outside part boundsEmpty result, no error

Edge Cases

Test CaseDescriptionExpected Result
TC-EDG-001Zero thickness bladeError or minimum enforced
TC-EDG-002Negative thicknessAbsolute value used
TC-EDG-003Very thin part (<1mm)Valid profile or skip
TC-EDG-004Very large part (>10m)Performance acceptable
TC-EDG-005Complex geometry (1000+ faces)Complete within timeout
TC-EDG-006Non-manifold geometryGraceful handling
TC-EDG-007Missing body IDError message, no crash
TC-EDG-008Invalid JSON inputParse error reported

πŸ“Š Results Reporting

Output Formats

FormatFilePurpose
CSVtest_results_YYYYMMDD.csvRaw data for analysis
HTMLtest_report_YYYYMMDD.htmlHuman-readable report
JSONtest_results_YYYYMMDD.jsonMachine-readable, CI integration
Logtest_log_YYYYMMDD.txtFull console output

Report Contents

  • Summary: Pass/fail counts, overall status
  • Timing: Per-test duration, total runtime
  • Failures: Detailed error messages, stack traces
  • Comparison: Delta from baseline (if available)
  • Trends: Performance over time (historical data)

πŸ“ Output Location

fixture_dev_2026Q1\io\json\testing\results\

πŸ“ˆ Regression Testing

Baseline Management

Baselines capture expected results for comparison against future runs:

'*** Save current results as baseline
call fxTestRegression 'save' 'baseline_v1.0'

'*** Compare against saved baseline
call fxTestRegression 'compare' 'baseline_v1.0'

'*** List available baselines
call fxTestRegression 'list'

Baseline Contents

DataComparisonTolerance
Sheet countExact match0
Profile geometryBounding box0.001mm
Execution timePercentageΒ±20%
Memory usagePercentageΒ±10%

Regression Triggers

  • FAIL: Sheet count differs
  • FAIL: Geometry outside tolerance
  • WARN: Performance degraded >20%
  • INFO: Performance improved >10%

πŸ“… Testing Roadmap

PhaseDeliverableStatusTarget
Phase 1 Integration test modes (0-3, 99) βœ… Complete Jan 2026
Phase 2 Timing permutation suite βœ… Complete Jan 2026
Phase 3 Master test runner πŸ”„ In Progress Jan 2026
Phase 4 HTML report generation πŸ“ Planned Feb 2026
Phase 5 Baseline save/compare πŸ“ Planned Feb 2026
Phase 6 Edge case suite πŸ“ Planned Mar 2026
Phase 7 CI/CD integration πŸ“ Planned Q2 2026

πŸ“ Test File Locations

FileLocation
fxIntegrationTest.ovmio\json\testing\
fxTestBladeTimingSuite.ovmmodeling\blade\testing\
fxTestHideAll.ovmmodeling\blade\testing\
fxMakeWatertight.ovmmodeling\blade\
blade_test_body80.jsonio\json\testing\
Test Resultsio\json\testing\results\
Baselinesio\json\testing\baselines\

Visibility Helper Macros

Standalone files in modeling\ (each macro in its own .ovm for proper scoping):

FilePurpose
fxHideAllSolids.ovmHide all solids (fastest, no sphere)
fxShowAllSolids.ovmShow all solids
fxHideAllExceptSphere.ovmHide all, keep NucleoSphere visible
fxRestoreHiddenBodies.ovmRestore after fxHideAllExceptSphere
fxEnsureSolidsVisible.ovmError recovery