Skip to content

Releases: embedthis/testme

v0.8.31

03 Dec 09:02

Choose a tag to compare

TestMe v0.8.31 Release Notes

Released: 2025-12-03

Enhancements

Test Class Environment Variable (--class)

Added --class <STRING> CLI argument to set the TESTME_CLASS environment variable for tests.

Features:

  • Sets TESTME_CLASS environment variable for all test types
  • Available in service scripts (prep, setup, cleanup, etc.)
  • Included in Xcode project configurations for --debug mode
  • Useful for test filtering and class identification at runtime

Usage Examples:

tm --class "unit" "*.tst.c"           # Set class to "unit"
tm --class "integration" test/api     # Set class to "integration"
tm --class "smoke" --debug math       # Class available in Xcode debugging

Use Cases:

  • Filter test behavior based on class (e.g., smoke vs full tests)
  • Identify test class at runtime for conditional logic
  • CI/CD pipelines that run different test classes
  • Test frameworks that organize tests by class

Implementation Files:

Windows Performance Optimizations

Comprehensive performance optimizations that dramatically improve test execution speed on Windows.

Key Improvements:

Optimization Impact
C binary caching (mtime comparison) 70-90% faster repeated runs
--rebuild / -R flag Force recompilation when needed
Keep artifacts by default Enables binary caching
Cache shell paths (Git Bash, PowerShell, Unix) Eliminates subprocess spawns
Cache compiler detection Eliminates repeated detection
Cache config file lookups Eliminates directory walks
Replace tasklist with process.kill(pid, 0) Zero-overhead process checks
Cache findInPath results Eliminates where/which calls
Use readdir({ withFileTypes: true }) 50-70% fewer stat() calls
Reduce file deletion retry params 13s → 1.5s worst-case cleanup

New CLI Flag:

tm -R                        # Force recompilation of C tests
tm --rebuild                 # Same as -R

Technical Details:

  1. C Binary Caching: Compares source file mtime with compiled binary mtime. Skips compilation if binary is newer.
  2. Zero-overhead Process Checking: process.kill(pid, 0) checks process existence without spawning subprocesses (works cross-platform).
  3. Module-level Caching: Shell paths, compiler configs, and findInPath results cached in static Maps.
  4. Dirent-based Traversal: readdir({ withFileTypes: true }) returns file type info without separate stat() calls.

Implementation Files:

Compiler Warning Display Option

Added --warning (-w) CLI flag to display compiler warnings and the compile command line for C tests with minimal output.

Features:

  • Shows compiler name and type (e.g., /usr/bin/gcc (gcc))
  • Shows full compile command line with all flags and libraries
  • Shows compiler warnings (stderr) from successful compilations
  • Provides focused output without full configuration dump

Usage Examples:

tm -w test.tst.c             # Show compile command + warnings (minimal)
tm -w "*.tst.c"              # Show for all C tests
tm -w -v test.tst.c          # Combine with verbose for full output

Output Format:

🔧 Compiler: /usr/bin/gcc (gcc)
📋 Compile command: /usr/bin/gcc -Wall -Wextra -o .testme/test/test test.tst.c

Comparison with -s (show):

Flag Config Compile Command Environment Warnings
-w No Yes No Yes
-s Yes Yes Yes No
-s -v Yes Yes Yes Yes

Implementation:

Use Cases:

  • Quickly identify compiler warnings without verbose output
  • Debug compilation issues by seeing exact command line
  • CI/CD pipelines that need to capture warnings
  • Development workflow for cleaning up warnings

Breaking Changes

Workers Flag Changed to -W

The short flag for --workers has changed from -w to -W (capital) to accommodate the new --warning flag.

Migration:

# Before (v0.8.30 and earlier)
tm -w 8 "*.tst.c"            # 8 parallel workers

# After (v0.8.31+)
tm -W 8 "*.tst.c"            # 8 parallel workers (capital W)

Rationale:

  • -w is commonly associated with warnings in compiler tools (e.g., gcc -w)
  • Capital -W is still mnemonic for "Workers"
  • The --workers long form remains unchanged

Bug Fixes

HTTP Health Check Socket Leak

Fixed potential socket leak in HTTP health checks by adding Connection: close header to fetch requests.

Root Cause:

HTTP health check requests were not explicitly requesting connection closure, which could lead to TCP sockets remaining open between polling intervals during service startup.

Fix:

Added Connection: close header to ensure sockets are closed after each health check:

const response = await fetch(config.url, {
    method: 'GET',
    headers: {
        Connection: 'close',
    },
    signal: AbortSignal.timeout(5000),
})

Implementation:

Impact: Improved reliability of health checks during service startup, especially for long-running polling scenarios.

Platform-Specific Exclude Patterns on Windows

Fixed platform-specific exclude patterns in subdirectory testme.json5 configs not working on Windows.

Issue: Exclude patterns like windows: { exclude: ['**/unix.tst.sh'] } in subdirectory configs were not filtering out tests on Windows.

Root Cause: Two issues:

  1. matchesExcludePatterns() passed raw file paths (with Windows \ separators) to glob matcher, while patterns use /
  2. Initial test discovery used root config patterns only; subdirectory config patterns were not applied during grouping

Fix:

  1. Updated matchesExcludePatterns() to normalize paths (convert \ to /) before matching
  2. Made matchesExcludePatterns() public for use during test grouping
  3. Updated groupTestsByConfig() to apply each config's exclude patterns when grouping tests

Implementation:

Impact: Subdirectory testme.json5 configs now properly apply platform-specific exclude patterns. Tests excluded by config patterns (e.g., Unix-only tests on Windows) are filtered out during grouping without requiring a root-level config.

Upgrade Notes

Breaking Change: The -w short flag now means --warning instead of --workers. Update any scripts or CI configurations that use -w for workers to use -W instead.

# Update CI scripts
- tm -w 4                    # Old: workers
+ tm -W 4                    # New: workers

# New warning option
tm -w test.tst.c             # Show compile warnings

Previous Release

See v0.8.30 Release Notes for the previous release.

v0.8.30

19 Nov 22:56

Choose a tag to compare

TestMe v0.8.30 Release Notes

Released: 2025-01-20

Enhancements

Timeout CLI Override

Added --timeout <SECONDS> (-t) CLI flag to override the configured test timeout for a test run. This allows setting a custom timeout without modifying configuration files.

Features:

  • Overrides execution.timeout from testme.json5
  • Accepts timeout value in seconds
  • Must be a positive integer
  • Applies to all tests in the run
  • Can be combined with other options like --verbose, --workers, etc.

Usage Examples:

tm --timeout 60 "long-test"         # 60 second timeout for specific test
tm -t 120 "*.tst.c"                 # 2 minute timeout for all C tests
tm --timeout 300                    # 5 minute timeout for all tests

Implementation:

Use Cases:

  • Override timeout for specific test runs without changing config
  • Use longer timeouts for debugging or slow CI/CD environments
  • Use shorter timeouts for quick feedback during development

Manual Enable Directory Detection

Enhanced enable: "manual" configuration to automatically run manual tests when tm is invoked from within the manual directory or its subdirectories without patterns.

Previous Behavior:

Tests with enable: "manual" only ran when explicitly named by pattern (e.g., tm testname).

New Behavior:

Tests with enable: "manual" now run in two scenarios:

  1. When explicitly named: tm testname (existing behavior)
  2. When tm is invoked from within the manual directory without patterns: cd manual_test_dir && tm

Features:

  • Detects if current working directory is within or equal to the config directory
  • Treats invocation from manual directory as an explicit manual request
  • Applies to both test execution and --list command
  • Does not affect pattern-based invocations from parent directories
  • Provides clearer verbose output: "✓ Running manual tests in: . (invoked from manual directory)"

Usage Examples:

# Directory structure:
# /project/test/manual/testme.json5 (enable: "manual")
# /project/test/manual/slow.tst.c

# From parent directory - skips manual tests
cd /project/test
tm                                   # Skips manual tests (not invoked from manual dir)
tm "*.tst.c"                         # Skips manual tests (wildcard pattern)

# From manual directory - runs manual tests
cd /project/test/manual
tm                                   # Runs manual tests (invoked from manual dir)
tm --list                            # Lists manual tests (invoked from manual dir)

# From subdirectory of manual directory - runs manual tests
cd /project/test/manual/subdir
tm                                   # Runs manual tests in parent (invoked from within manual tree)

# Explicit naming - always works
cd /project/test
tm slow                              # Runs manual test (explicitly named)
tm manual/slow.tst.c                 # Runs manual test (explicitly named)

Implementation:

Use Cases:

  • Developers working on manual tests can simply run tm in the test directory
  • No need to remember test names or use patterns when in the manual directory
  • Maintains protection from accidental execution when running from parent directories
  • Useful for slow tests, destructive tests, or tests requiring special setup

Duration Flag for Test Control

Added --duration <COUNT> CLI flag to set a duration value that is exported to tests and service scripts via the TESTME_DURATION environment variable. This is useful for tests that need to run for a specific duration, such as load tests that scale based on time, performance tests with configurable run times, and integration tests with timeout-based scenarios.

Features:

  • Supports multiple time unit suffixes:
    • No suffix or sec/secs - Seconds (e.g., --duration 30)
    • min/mins - Minutes (e.g., --duration 5mins → 300 seconds)
    • hr/hrs/hour/hours - Hours (e.g., --duration 2hrs → 7200 seconds)
    • day/days - Days (e.g., --duration 3days → 259200 seconds)
  • Supports decimal values (e.g., --duration 1.5hours → 5400 seconds)
  • Duration is always converted to seconds and exported as TESTME_DURATION
  • Available in all test types (C, Shell, JavaScript, TypeScript, Python, Go, Ejscript)
  • Available in all service scripts (skip, environment, prep, setup, cleanup)

Usage Examples:

tm --duration 30 "stress-test"          # 30 seconds
tm --duration 5mins "integration-test"  # 5 minutes = 300 seconds
tm --duration 2hrs "soak-test"          # 2 hours = 7200 seconds
tm --duration 1day "endurance-test"     # 1 day = 86400 seconds

Implementation:

  • CLI flag parsing in src/cli.ts with parseDuration() helper
  • Environment variable export in src/handlers/base.ts and src/services.ts
  • Configuration type updates in src/types.ts
  • Documentation updates in man page, README, and CLI help

Use Cases:

  • Tests that need to run for a specific duration
  • Load tests that scale based on time
  • Performance tests with configurable run times
  • Integration tests with timeout-based scenarios

Bug Fixes

Monitor Mode Not Streaming Output in Real-Time

Fixed --monitor (-m) flag not streaming test output in real-time during test execution. Output now appears progressively as tests run instead of only after completion.

Root Causes:

  1. C Tests: The testme.h header functions (tinfo, tdebug, tskip, twrite, tReport) were not flushing stdout/stderr after printf calls, causing buffered output when stdout was piped to the test runner.

  2. TTY Check: The base.ts handler was enforcing a strict TTY check (process.stdout.isTTY === true), preventing streaming when user explicitly requested --monitor but output was piped.

Fixes:

  • Added fflush(stdout) and fflush(stderr) after all printf/fprintf calls in C test utility functions
  • Removed strict TTY requirement - when user explicitly requests --monitor, honor it regardless of TTY status
  • Added description parameter to runCommand calls for better timeout error messages

Impact: Long-running tests (like memory leak detection) now show progress in real-time when using --monitor flag.

Go Tests Skipped on Windows

Added platform detection to skip Go tests on Windows. Go tests are now automatically skipped on Windows platforms where the Go toolchain may not be available or compatible.

Change: Updated test/go/skip.js to detect Windows platform (process.platform === 'win32') and skip tests before checking for Go installation.

Impact: Tests no longer fail on Windows CI/CD pipelines due to missing Go support.

Manual Test Filtering with Same-Name Tests

Fixed manual test filtering to prevent running manual tests when using base name patterns from outside the manual directory. When a pattern like tm tls was used from a parent directory, it would incorrectly match and run tests with the same base name in subdirectories marked with enable: 'manual', even though they should only run when explicitly targeted with the directory path.

Previous Behavior:

# Directory structure:
# /project/test/tls.tst.c
# /project/test/fuzz/testme.json5 (enable: "manual")
# /project/test/fuzz/tls.tst.c

cd /project/test
tm tls                    # Would run BOTH tls.tst.c AND fuzz/tls.tst.c (incorrect)

Fixed Behavior:

cd /project/test
tm tls                    # Runs only tls.tst.c (skips fuzz/tls.tst.c)
tm fuzz/tls               # Runs fuzz/tls.tst.c (explicit directory path)
tm --list tls             # Lists only tls.tst.c
tm --list fuzz/tls        # Lists fuzz/tls.tst.c

cd /project/test/fuzz
tm tls                    # Runs fuzz/tls.tst.c (invoked from manual directory)

Implementation:

  • Added directory path check for manual tests in src/index.ts:492-513
  • When enable: 'manual' and not invoked from manual directory, patterns must explicitly include the directory path
  • Added path-without-test-extension matching in src/index.ts:360-369
  • Applied same fix to --list command in src/runner.ts:369-403

Test Coverage:

  • Added comprehensive test in test/config/manual-filtering.tst.ts:100-138
  • Tests verify that base name patterns don't match manual tests from outside directories
  • Tests verify that directory-prefixed patterns do match manual tests

Impact: Manual tests are now properly isolated and only run when explicitly intended, preventing accidental execution of tests with common names in manual directories.

Global Prep/Cleanup Output Not Shown in Verbose Mode

Fixed global prep and global cleanup scripts not emitting stdout/stderr output when running with the --verbose (-v) flag. Previously, regular prep/cleanup scripts would show their output in verbose mode, but global prep/cleanup scripts would not.

Root Cause:

The globalPrep and globalCleanup services were using the raw rootConfig without applying CLI overrides (such as --verbose), while regular prep/cleanup scripts used mergedConfig which had CLI overrides applied.

Fix:

Applied CL...

Read more

v0.8.29

05 Nov 06:17

Choose a tag to compare

TestMe v0.8.29 Release Notes

Released: November 4, 2025

Bug Fixes

TESTME_STOP Environment Variable Not Propagating to Tests

Fixed TESTME_STOP environment variable not being set correctly when using the --stop flag. Tests with test-specific configurations were seeing TESTME_STOP=0 even when running with --stop.

Root Cause: The findConfigForTest() method in src/runner.ts was missing stopOnFailure from the list of CLI overrides to preserve during config merging.

Impact: Tests can now reliably detect fast-fail mode (e.g., fuzzers can stop early on first crash when TESTME_STOP=1).

--monitor Flag Not Streaming Output in Real-Time

Fixed --monitor (-m) flag not streaming test output in real-time. Output now appears progressively during execution instead of only after test completion.

Root Cause: Config merging in src/runner.ts wasn't preserving the output.live flag from CLI arguments.

Configuration Variable Expansion in Inherited Configs

Fixed ${CONFIGDIR} expansion in parent configurations. Variables are now substituted with the parent's absolute path before inheritance, preventing incorrect paths in child configs.

Example:

// Parent: /web/test/testme.json5
{
    compiler: {
        c: {
            gcc: {
                flags: ['-Wl,-rpath,${CONFIGDIR}/../build/bin'],
            },
        },
    },
}

// Child: /web/test/fuzz/testme.json5 with inherit: ['compiler']

Before: ${CONFIGDIR} expanded to /web/test/fuzz (child's directory - incorrect)
After: ${CONFIGDIR} expands to /web/test (parent's directory - correct)

Pattern Matching for Subdirectory Paths

Fixed pattern matching for paths with subdirectories. tm subdir/name now correctly matches subdir/name.tst.sh.

Enhancements

Real-Time Test Output Streaming

Added --monitor (-m) flag to stream test output in real-time to console:

tm --monitor              # Stream test output
tm -m --verbose           # Combine with verbose for detailed reporting
  • Only active in TTY (interactive terminal) mode
  • Automatically disabled when output is piped or redirected
  • Works with all test types

TESTDIR and CONFIGDIR Now Use Absolute Paths

${TESTDIR} and ${CONFIGDIR} now provide absolute paths instead of relative paths:

  • ${TESTDIR} expands to absolute path (e.g., /Users/mob/c/web/test)
  • ${CONFIGDIR} expands to absolute path (e.g., /Users/mob/c/web/test)
  • Ideal for rpath: flags: ['-Wl,-rpath,${CONFIGDIR}/../build/${PLATFORM}-${PROFILE}/bin']

Enhanced Environment Variables

Added new environment variable exports for services and tests:

  • TESTME_DEPTH - Set when --depth N is used, otherwise unset
  • TESTME_ITERATIONS - Always set (defaults to '1' if --iterations not specified)
  • TESTME_STOP - Always set to '0' or '1' (based on --stop flag)
  • TESTME_VERBOSE, TESTME_QUIET, TESTME_KEEP - Always set to '0' or '1'

Upgrade Notes

Breaking Change:

  • ${TESTDIR} and ${CONFIGDIR} now return absolute paths instead of relative paths
  • Most use cases benefit from this change (especially rpath flags)
  • If you relied on relative paths, update your configuration to work with absolute paths

Previous Release

See v0.8.28 Release Notes for the previous release.

v0.8.28

05 Nov 06:18

Choose a tag to compare

TestMe v0.8.28 Release Notes

Released: October 31, 2025

Enhancements

Test Error Reporting

Global Installation Path Handling:

  • Fixed stack trace detection when TestMe is installed globally via npm/bun
  • Now correctly identifies test file locations on Windows, macOS, and Linux
  • Handles various installation paths: node_modules/@embedthis/testme, .bun/install/global, etc.
  • Added fallback logic in test() error handler to extract location from error stack when primary detection fails
  • Eliminates "unknown file:unknown line" errors in globally-installed TestMe

Implementation Details

Stack Trace Changes

Enhanced getStack() logic in src/modules/js/index.js:

  • Added Windows-style path separators (backslash) to path filters
  • Now filters out multiple installation path patterns:
    • testme/src/modules/ and testme\src\modules\ (forward and backslash)
    • node_modules/@embedthis/testme and node_modules\@embedthis\testme
    • .bun/install/global/node_modules/@embedthis/testme
  • Handles both Unix-style and Windows-style paths

Enhanced error handling in test() function:

  • Added fallback stack parsing when error message contains "unknown file:unknown line"
  • Extracts actual test file location from error.stack when primary detection fails
  • Replaces "unknown file:unknown line" with actual file:line from stack trace
  • Provides accurate location reporting even when global installation paths interfere
  • Uses same path filtering logic as getStack() for consistency

Files Changed

Upgrade Notes

This is a bug fix release that improves error reporting when TestMe is installed globally. The changes are fully backward compatible and require no configuration updates.

Users upgrading from v0.8.27 will experience:

  • Accurate file:line locations in error messages on all platforms
  • Better error reporting when using globally-installed TestMe
  • Consistent error location reporting across development and CI environments
  • No changes to test execution behavior or configuration format

Previous Release

See v0.8.27 Release Notes for information about the previous release which included:

  • Health check improvements with setup process exit detection
  • Improved stack trace capture with best candidate approach
  • Better handling of complex stack traces

v0.8.27

30 Oct 22:27

Choose a tag to compare

TestMe v0.8.27 Release Notes

Released: October 31, 2025

Enhancements

Health Check Robustness

Setup Process Exit Detection:

  • Health checks now monitor the setup process and stop immediately if it exits
  • Prevents waiting for health check timeout when setup process fails early
  • Provides clearer error messages: "Setup process exited with code X during health check"
  • Non-blocking check polls every 10ms to detect process exit without blocking health checks
  • Improves feedback loop for broken service configurations

Test Error Reporting

Improved Stack Trace Capture:

  • Enhanced getStack() function in JavaScript test module to better identify actual test code
  • Now uses a "best candidate" approach when filtering internal test framework functions
  • Handles edge cases where helper functions throw errors by reporting the next frame up
  • More accurate file and line number reporting for test failures
  • Better handling of complex stack traces with multiple framework layers

Implementation Details

Health Check Changes

Modified HealthCheckManager.waitForHealthy() to accept optional setupProcess parameter:

  • Checks if setup process has exited before each health check attempt
  • Uses Promise.race() with 10ms timeout for non-blocking exit detection
  • Throws descriptive error if process exits during health checks
  • Backward compatible - setupProcess parameter is optional

Stack Trace Changes

Improved getStack() logic in src/modules/js/index.js:

  • Iterates through stack frames and tracks first valid candidate
  • Continues searching for non-helper function frames
  • Returns best candidate if all remaining frames are helper functions
  • Falls back to "unknown file/line" only if no candidates found

Files Changed

Upgrade Notes

This is an enhancement release that improves error handling and diagnostics. The changes are fully backward compatible and require no configuration updates.

Users upgrading from v0.8.26 will experience:

  • Faster failure detection when setup services crash during health checks
  • More accurate error location reporting in JavaScript/TypeScript tests
  • Better error messages when services fail to start
  • No changes to test execution behavior or configuration format

Previous Release

See v0.8.26 Release Notes for information about the previous release which included:

  • Packaging and installation cleanup
  • Removed vendored ejscript module linking
  • Added JavaScript module package.json to npm manifest

v0.8.26

29 Oct 01:22

Choose a tag to compare

TestMe v0.8.26 Release Notes

Released: October 29, 2025

Bug Fixes

Packaging and Installation

Removed Vendored Ejscript Module:

  • Removed attempt to link vendored ejscript module during installation
  • The vendored vendor/ejscript directory was removed in previous cleanup but install script still tried to link it
  • Removed 22 lines of dead code that attempted to bun link a non-existent vendored module
  • Installation now cleaner and faster without unnecessary link attempts

Package File Manifest:

  • Added src/modules/js/package.json to npm package files list
  • Ensures JavaScript test module package metadata is included in published package
  • Improves npm/Bun compatibility for the testme JavaScript module

Files Changed

Upgrade Notes

This is a maintenance release focused on cleaning up installation artifacts. The changes are fully backward compatible and require no configuration updates.

Users upgrading from v0.8.25 will experience:

  • Faster, cleaner installation without attempting to link removed vendored modules
  • No functional changes to test execution or features

Previous Release

See v0.8.25 Release Notes for information about the previous release which included:

  • Service script output handling improvements
  • Enhanced environment variable exports
  • Health check field name backward compatibility
  • Windows process stability fixes

v0.8.25

28 Oct 20:18

Choose a tag to compare

TestMe v0.8.25 Release Notes

Released: October 29, 2025

Bug Fixes

Service Script Output Handling

Fixed several issues with service script output handling to prevent test output contamination and improve debugging:

Setup Service Output Isolation:

  • Setup service stdout/stderr is now piped to prevent it appearing after test results
  • Added proper process exit waiting to ensure all output is captured before cleanup
  • Service output no longer intermingles with test output in verbose mode

Service Script Error Reporting:

  • Both stdout and stderr now displayed from failing service scripts for better debugging
  • Service script output properly captured in non-verbose mode for error reporting
  • Error messages now formatted on new line for better readability

Windows PATH Environment Variable:

  • Fixed Windows PATH environment variable inheritance in setup scripts
  • Setup scripts now correctly receive expanded PATH variables from configuration

Error Message Improvements:

  • Setup service error messages now include relative path to script for easier identification
  • Error output formatting improved for clarity

Environment Variable Exports

Enhanced environment variable exports to service scripts for better test configuration:

New Exports:

  • TESTME_VERBOSE - Always exported ('0' or '1'), previously only set when true
  • TESTME_QUIET - Always exported ('0' or '1')
  • TESTME_KEEP - Always exported ('0' or '1')

Service scripts can now reliably check these flags regardless of whether they're set or not.

Configuration

Health Check Field Name Support

Added backward compatibility for health check configuration field names:

Problem:
Code expected healthCheck (camelCase) but some configurations used healthcheck or health, causing health checks to be ignored and tests to run before services were ready.

Solution:
Now accepts all three variants for backward compatibility:

  • healthCheck (camelCase - preferred/documented)
  • healthcheck (lowercase - legacy)
  • health (short form - convenient)

Health checks now work regardless of which naming convention was used in configuration files.

Windows Process Stability

stdin Pipe Handling:

  • Added stdin: "pipe" to Bun.spawn() on Windows to prevent processes from hanging
  • Fixes timeout issues with Go tests and other subprocess operations on Windows

Documentation

Updated project documentation structure:

AI Directory Refactoring:

  • Moved AI documentation to standardized structure
  • Removed vendored EJS templates
  • Improved documentation organization for better maintainability

Files Changed

Upgrade Notes

This release is fully backward compatible. Health check configurations using any of the three field name variants (healthCheck, healthcheck, health) will work correctly.

Service scripts will now receive properly formatted boolean environment variables that can be reliably checked regardless of whether flags are set or not.

v0.8.24

23 Oct 23:29

Choose a tag to compare

TestMe v0.8.24 Release Notes

Released: 2025-10-24

Bug Fixes

Configuration Path Resolution with Variables

Fixed a critical issue in configuration inheritance where relative paths containing ${...} glob expansion variables were not being resolved correctly.

Problem:
When a parent configuration contained relative paths with glob expansion variables like:

environment: {
    BIN: '../build/${PLATFORM}/bin'
}

The relative path prefix (../build/) was not being resolved to an absolute path before inheritance. This caused child configurations to inherit broken paths relative to the wrong directory.

Solution:
Enhanced the path resolution logic in ConfigManager.resolveRelativePaths() to:

  1. Detect relative paths containing ${...} variables
  2. Split the path into prefix (before first ${) and suffix (from first ${ onward)
  3. Resolve the prefix to an absolute path relative to the config directory
  4. Preserve path separator if the prefix ended with one
  5. Combine resolved prefix with original suffix containing variables

This ensures that child configurations at any depth can inherit paths with variables that will expand correctly when used.

Example:
Parent config at /project/testme.json5:

environment: {
    BIN: '../build/${PLATFORM}/bin'
}

Child config at /project/test/unit/testme.json5 with inherit: ['environment']:

  • Before: Inherited ../build/${PLATFORM}/bin (relative to child dir, wrong!)
  • After: Inherited /project/build/${PLATFORM}/bin (absolute, correct!)

This fix ensures configuration inheritance works correctly for nested test directories that need to reference build artifacts using glob patterns.

Files Changed

v0.8.23

23 Oct 03:13

Choose a tag to compare

TestMe v0.8.23 Release Notes

Released: October 23, 2025

Features

  • Automatic cleanup of test artifacts after successful tests (failed tests preserve artifacts for debugging)
  • --keep flag now prevents cleanup of successful test artifacts

Fixes

  • Fixed duplicate cleanup service execution messages
  • Fixed empty .testme directories remaining after artifact cleanup
  • Fixed Windows file locking errors during artifact cleanup
    • Added retry logic with exponential backoff (up to 10 retries, max 2s delay)
    • Cleanup failures now generate warnings instead of marking tests as failed
    • Handles ENOENT (file doesn't exist) gracefully
  • Fixed Windows PATH environment variable inheritance in setup scripts
  • Fixed service script output capture in non-verbose mode
  • Fixed display of both stdout and stderr from failing service scripts
  • Fixed relative path display in setup service error messages

Documentation

  • Updated CLI help text and man page for artifact cleanup behavior
  • Updated CLAUDE.md with artifact management details
  • Improved project documentation

Notes

This release improves the artifact management workflow by automatically cleaning up build artifacts from passing tests while preserving them for failed tests. This provides a cleaner working directory while maintaining debuggability when tests fail.

The --keep flag now has a clear purpose: preserve artifacts from successful tests for inspection or debugging.