INQ(1)

NAME
inq - test repository management tool

SYNOPSIS
inq [OPTIONS] <COMMAND>

DESCRIPTION
inq is a test repository management tool for tracking and analyzing test results. It stores test run data in a local repository and provides commands for running tests, viewing results, analyzing failures, and identifying slow or flaky tests.

Configuration is read from inquest.toml (preferred) or .testr.conf (legacy INI format).

OPTIONS

-C, --directory DIRECTORY
    Repository path (defaults to current directory)

-h, --help
    Print help

-V, --version
    Print version

COMMANDS

  auto
Auto-detect project type and generate inquest.toml configuration file.

Detects the project type based on files present in the directory. Supported project types include Cargo (Rust), pytest (Python), unittest/subunit (Python), and prove (Perl).

  init
Initialize a new test repository.

Creates a .inquest directory with the necessary structure to store test results and metadata. If a legacy .testrepository/ directory exists, it will suggest running inq upgrade to convert to the new format.

  run
Run tests and load results.

Executes the test command from the configuration file and loads the results into the repository. Displays a progress bar with color-coded failure rates and ETA based on historical test times.

--failing
    Run only the tests that failed in the last run

--force-init
    Create repository if it doesn't exist

--auto
    Auto-detect project type and generate inquest.toml if missing

--partial
    Partial run mode (update failing tests additively without clearing previous failures)

--load-list FILE
    Only run tests listed in the named file (one test ID per line)

-j, --parallel [N]
    Run tests in parallel across multiple workers (defaults to number of CPUs)

--concurrency
    Alias for --parallel

--until-failure
    Run tests repeatedly until they fail

--isolated
    Run each test in a separate process

--subunit
    Show output as a subunit stream

--all-output
    Show output from all tests (by default only failed tests show output)

TESTFILTER ...
    Test ID filters (regex patterns to filter which tests to run)

Additional arguments can be passed to the underlying test command after --.

Exit code is 0 if all tests passed, 1 if there are failures.

  load
Load test results from stdin.

Reads test results from stdin in subunit format and stores them in the repository.

--force-init
    Create repository if it doesn't exist

--partial
    Partial run mode (update failing tests additively)

  last
Show results from a test run.

Displays test statistics and details about failed tests from a specific run or the most recent run.

-r, --run RUN_ID
    Run ID to show (defaults to latest; supports negative indices like -1, -2)

--subunit
    Show output as a subunit stream

--no-output
    Don't show test output/tracebacks for failed tests

Exit code is 0 if all tests passed, 1 if there are failures.

  rerun
Re-run exactly the tests of a previous run, in the same order with the same ---style test arguments.

The test IDs are read from the recorded subunit stream and replayed under discovery ordering so the original execution order is preserved. Any extra arguments that were forwarded to the test command after -- are pulled from the run's metadata and re-applied.

RUN_ID
    Run ID to re-run (defaults to latest; supports negative indices like -1, -2)

  failing
Show failing tests from the last run.

--list
    List test IDs only, one per line (for scripting)

--subunit
    Show output as a subunit stream

Exit code is 0 if no failing tests, 1 if there are failures.

  config
Print the resolved effective configuration.

Shows the configuration that inq run would use, combining values from the config file (inquest.toml, .inquest.toml, or .testr.conf), CLI overrides, and built-in defaults. Each resolved value is annotated with its source ([config], [cli], or [default]). Useful for debugging configuration precedence.

--test-timeout TIMEOUT
    Per-test timeout override

--max-duration DURATION
    Overall run-duration override

--no-output-timeout DURATION
    No-output timeout override

--order ORDER
    Test ordering strategy override

-j, --parallel N
    Concurrency override

  stats
Show repository statistics.

Displays information about the test repository including total runs, latest run ID, tests in latest run, failures in latest run, and total tests executed across all runs.

  slowest
Show the slowest tests from the last run.

Displays test execution times sorted from slowest to fastest, with timing information and percentage of total time.

-n, --count N
    Number of tests to show (default: 10)

--all
    Show all tests

  log
Show logs for individual tests.

Displays logs and details for specific tests from a test run. Supports glob-style wildcard patterns for matching test IDs.

-r, --run RUN_ID
    Run ID to show logs from (defaults to latest)

TESTPATTERN ...
    Test ID patterns to match (glob-style wildcards). If no patterns are provided, shows all tests.

  prune
Drop older test runs from the repository.

Exactly one selection mode must be given. In-progress runs are always skipped.

--keep N
    Keep the N most recent runs and prune the rest

--older-than DURATION
    Prune runs older than the given duration. Accepts s, m, h, d, and w suffixes (e.g. 30d, 2w, 12h)

--run ID
    Prune the named run by ID. May be given multiple times

--all
    Prune every run in the repository

--dry-run
    Show what would be pruned without modifying the repository

  list-tests
List all available tests.

Queries the test command to discover all available tests in the test suite. Requires a configuration file with a test_list_option or --list flag.

  analyze-isolation
Analyze test isolation issues using bisection.

Identifies test interactions by bisecting the test suite to find which tests affect the outcome of a target test.

TEST
    The test to analyze for isolation issues (required)

The command runs the target test in isolation, then runs all tests together, and uses binary bisection to find and minimize the set of tests that interact with the target test.

  completions
Generate shell completions.

SHELL
    Shell to generate completions for (bash, zsh, fish, etc.)

  upgrade
Upgrade a .testrepository/ to .inquest/ format.

Migrates all test run data, failing tests, and timing information from the legacy .testrepository/ format to the new .inquest/ SQLite-based format. Only available when compiled with the testr feature (enabled by default).

  quickstart
Show quickstart documentation.

  help
Show help information for commands.

COMMAND
    Optional command name to show detailed help for

CONFIGURATION
Configuration is read from inquest.toml in the repository root. Legacy .testr.conf (INI format) is also supported.

Key configuration options:

test_command
    The command to run tests. Supports $LISTOPT and $IDOPTION placeholders.

test_id_option
    Option to pass test IDs to the test command (e.g., --load-list $IDFILE)

test_list_option
    Option to list available tests (e.g., --list)

FILES

.inquest/
    Directory containing the test repository database and metadata

inquest.toml
    Configuration file for the test runner

.testrepository/
    Legacy test repository directory (can be upgraded with inq upgrade)

EXAMPLES
Initialize and run tests:

    inq auto
    inq run

Run only failing tests in parallel:

    inq run --failing -j4

Show the 5 slowest tests:

    inq slowest -n 5

Load test results from a subunit stream:

    python -m subunit.run discover | inq load

View logs for tests matching a pattern:

    inq log 'test_auth*'

Analyze test isolation for a specific test:

    inq analyze-isolation mypackage.tests.test_foo.TestFoo.test_bar

EXIT STATUS

0   Success (or no failing tests for test-related commands)

1   Failure (test failures detected or command error)

SEE ALSO
subunit(1), pytest(1), cargo-test(1)