cli-testing-specialist 1.0.10

Comprehensive testing framework for CLI tools - automated analysis, test generation, and security validation
Documentation
# CLI Test Configuration for backup-suite
# Version: 1.0
# Last Updated: 2025-11-14
#
# This configuration file customizes test behavior for backup-suite,
# achieving 100% test success rate (19/19 tests passing).

version: "1.0"
tool_name: "backup-suite"
tool_version: "1.0.0"

test_adjustments:
  # Security Tests: Custom tests for correct behavior validation
  security:
    # DO NOT skip security tests!
    # Instead, add custom tests that verify correct security behavior
    custom_tests:
      # Test 1: Command injection attempt is safely handled
      - name: "test_lang_safely_handles_injection_attempt"
        command: "backup-suite --lang 'test; rm -rf /' --help"
        expected_exit_code: 0
        description: "Invalid language input is ignored, help is displayed (safe fallback)"

      # Test 2: Null byte injection is rejected
      - name: "test_lang_null_byte_rejection"
        command: "backup-suite --lang 'en\x00malicious' --help"
        expected_exit_code: 0
        description: "Null bytes are internally rejected by the option parser"

  # Directory Traversal Tests: Declarative approach (SAFE - no command execution)
  directory_traversal:
    # Recommended: Declarative directory creation (cli-testing-specialist handles it)
    test_directories:
      # Large file count test
      - path: "/tmp/backup-suite-test-large-dir"
        create: true
        file_count: 100
        cleanup: true

      # Deep directory hierarchy test
      - path: "/tmp/backup-suite-test-deep-dir"
        create: true
        depth: 5
        cleanup: true

    # Alternative: Imperative commands (requires --allow-setup flag)
    # Commented out because declarative approach is safer
    # setup_commands:
    #   - "mkdir -p /tmp/backup-suite-test-large-dir"
    #   - "for i in {1..100}; do touch /tmp/backup-suite-test-large-dir/file$i.txt; done"
    #   - "mkdir -p /tmp/backup-suite-test-deep-dir/l1/l2/l3/l4/l5"
    # teardown_commands:
    #   - "rm -rf /tmp/backup-suite-test-large-dir"
    #   - "rm -rf /tmp/backup-suite-test-deep-dir"

  # Destructive Operations: CI/CD compatibility with environment variable
  destructive_ops:
    # Environment variable for auto-confirmation (backup-suite implementation required)
    env_vars:
      BACKUP_SUITE_YES: "true"  # Auto-confirm all destructive operations
      CI: "true"                  # Indicate CI environment

    # backup-suite specific exit code for cancelled operations
    cancel_exit_code: 2

    # Special commands configuration
    special_commands:
      - command: "remove"
        requires_tty: false  # Works in CI with BACKUP_SUITE_YES
        confirm_flag: null   # No --yes flag, uses env var

      - command: "cleanup"
        requires_tty: false  # Works in CI with BACKUP_SUITE_YES
        confirm_flag: null

# Global test settings
global:
  # Timeout for all tests (seconds)
  timeout: 30

  # Retry failed tests (0 = no retry)
  retry_count: 0

  # Verbose output
  verbose: false

  # Environment variables for all tests
  env_vars:
    LANG: "en_US.UTF-8"
    TZ: "UTC"

# CI/CD specific settings
ci:
  # Auto-detect CI environment (GITHUB_ACTIONS, GITLAB_CI, etc.)
  auto_detect: true

  # Skip TTY-requiring tests in CI
  skip_tty_tests: true

  # Skip intensive tests in CI
  skip_intensive_tests: false

# Expected Results:
# - Security Tests: 5/5 passing (3 default + 2 custom)
# - Directory Traversal: 3/3 passing (auto-created directories)
# - Destructive Operations: 2/2 passing (BACKUP_SUITE_YES env var)
# - Other Tests: 9/9 passing (unchanged)
# - Total: 19/19 passing (100% success rate)