Configuration

Customize alt.qa for your project's needs.

Configuration File

alt.qa uses altqa.yml (or altqa.yaml) in your project root. Create one with:

altqa init

Full Configuration Reference

# altqa.yml - Complete example

# Project identification
project:
  name: my-app
  version: 1.0.0

# Test framework settings
framework:
  # Supported: jest, mocha, vitest, pytest, rspec
  name: jest
  config: jest.config.js

# Source code settings
source:
  # Directories containing source code
  include:
    - src/
    - lib/
  # Directories to exclude
  exclude:
    - node_modules/
    - dist/
    - coverage/

# Test settings
tests:
  # Test file patterns
  patterns:
    - '**/*.test.js'
    - '**/*.spec.js'
    - '__tests__/**/*.js'
  # Timeout per test (ms)
  timeout: 30000
  # Retry failed tests
  retries: 0
  # Run tests in parallel
  parallel: true
  # Number of parallel workers
  workers: auto

# Coverage settings
coverage:
  # Enable coverage collection
  enabled: true
  # Minimum coverage threshold (%)
  threshold: 80
  # Coverage reporters
  reporters:
    - text
    - html
    - lcov
  # Files to include in coverage
  include:
    - src/**/*.js
  # Files to exclude from coverage
  exclude:
    - '**/*.test.js'
    - '**/mocks/**'

# AI settings
ai:
  # Enable AI test generation
  generation: true
  # AI model to use (default: auto)
  model: auto
  # Types of tests to generate
  generate:
    - unit
    - integration
    - edge_cases
  # Maximum tests to generate per file
  max_tests_per_file: 20

# Flaky test detection
flaky:
  # Enable flaky detection
  enabled: true
  # Quarantine flaky tests
  quarantine: true
  # Runs to confirm flakiness
  detection_runs: 3

# GitHub integration
github:
  # Test on pull requests
  pr_testing: true
  # Add inline comments
  inline_comments: true
  # Required check for merge
  required_check: true
  # Coverage threshold for PRs
  pr_coverage_threshold: 80

# CI/CD settings
ci:
  # Fail build on test failure
  fail_on_error: true
  # Fail build below coverage threshold
  fail_on_coverage: true
  # Upload artifacts
  artifacts: true

# Notifications
notifications:
  # Slack webhook
  slack:
    webhook: $SLACK_WEBHOOK_URL
    on:
      - failure
      - recovery
  # Email notifications
  email:
    recipients:
      - [email protected]
    on:
      - failure

Environment Variables

Configuration can be overridden with environment variables:

# Authentication
ALTQA_API_KEY=your-api-key
ALTQA_ORG=your-organization

# Behavior
ALTQA_CI=true              # Enables CI mode
ALTQA_COVERAGE=true        # Enable coverage
ALTQA_PARALLEL=false       # Disable parallel runs
ALTQA_TIMEOUT=60000        # Test timeout in ms

# Integrations
ALTQA_SLACK_WEBHOOK=https://hooks.slack.com/...
ALTQA_GITHUB_TOKEN=ghp_...

Configuration Inheritance

You can extend base configurations:

# altqa.yml
extends: ./altqa.base.yml

# Override specific settings
coverage:
  threshold: 90

Environment-Specific Config

Use different configs for different environments:

# altqa.production.yml
coverage:
  threshold: 95

ci:
  fail_on_coverage: true

Then run with:

altqa test --config altqa.production.yml
Pro Tip

Use altqa config validate to check your configuration file for errors.

Schema Validation

Add schema validation for IDE support:

# altqa.yml
# yaml-language-server: $schema=https://alt.qa/schemas/config.json

project:
  name: my-app
  ...

Need help?

Our team is ready to assist you.

Contact Support