tmt
Test management and execution tool
TLDR
List available tests, plans, and stories
Initialize tmt files/project structure
Create a new test with a template and a link
List available tests, plans, or stories
Show detailed test metadata in the given context
Validate tmt files against the specification
Use filter
Display help
SYNOPSIS
tmt [GLOBAL_OPTIONS] <COMMAND> [COMMAND_OPTIONS] [ARGUMENTS...]
Common commands include:
tmt init: Initialize a new tmt project.
tmt run: Run tests according to a plan.
tmt test: Manage test cases.
tmt plan: Manage test plans.
tmt story: Manage user stories.
tmt results: Display and manage test results.
PARAMETERS
--debug, -d
Enable debug output for detailed information.
--verbose, -v
Enable verbose output for more information during execution.
--force
Force the operation, typically overriding existing files or ignoring certain warnings.
--dry-run
Simulate the operation without making any actual changes to the system or project.
--path PATH
Specify the working directory or project root for the command. Defaults to current directory.
--yes, -y
Assume 'yes' to all prompts and run non-interactively.
--help, -h
Show help message and exit. Can be used with subcommands (e.g., tmt run --help).
DESCRIPTION
tmt, which stands for Test Management Tool, is a comprehensive framework for designing, executing, and analyzing tests on Linux systems, particularly focused on Fedora, CentOS, and Red Hat Enterprise Linux. It's a Python-based, open-source solution that allows users to define test plans, create test cases, execute them across various environments (local, virtual machines, containers), and gather results.
It aims to streamline the testing workflow from development to deployment, integrating with various tools and platforms. tmt provides a flexible and declarative way to describe tests, enabling repeatable and robust testing strategies for projects and distributions.
CAVEATS
tmt is not a standard, built-in Linux utility. It needs to be installed separately, typically via a package manager (e.g., dnf install tmt on Fedora/RHEL). Its primary use-case is focused on test management and quality assurance workflows for software projects, making it less of a general-purpose command-line tool.
KEY FEATURES
tmt offers declarative test definition using YAML, support for flexible test environments (local, virtual machines, containers), comprehensive result reporting, seamless integration with Continuous Integration/Continuous Delivery (CI/CD) pipelines, and a modular, extensible design that allows for custom extensions and plugins.
TYPICAL WORKFLOW
Users typically define test cases and test plans within their project's repository using YAML files. The tmt init command sets up the project structure. Tests are then executed using tmt run, which can provision environments, execute tests, and collect results. Results can then be reviewed using tmt results or integrated with external reporting tools.
HISTORY
tmt was developed by Red Hat as an open-source project to address the growing need for robust and scalable test management within their development and quality assurance processes, especially for Fedora and Red Hat Enterprise Linux. It has evolved into a comprehensive framework with a strong community backing, aiming to simplify and standardize the testing of complex software stacks and distributions. Its development emphasizes flexibility, extensibility, and integration with modern CI/CD pipelines.