Skip to main content

Test Management Tool

Project description

Test Management Tool

Description

The tmt python module and command line tool implement the L1 and L2 Metadata Specification which allows to store all needed test execution data directly within a git repository. In this way it makes tests independent on any external test management system.

The Flexible Metadata Format fmf is used to store data in both human and machine readable way close to the source code. Thanks to inheritance and elasticity metadata are organized in the structure efficiently, preventing unnecessary duplication.

Command line tool allows to easily create new tests, convert old metadata, list and filter available tests and verify them against the L1 specification. Plans are used to group tests and precisely define individual test steps defined by the L2 specification, like environment preparation. Stories are used to track implementation, test and documentation coverage for individual features.

Last but not least, the tool provides a user-friendly way how to run, debug and develop tests directly from your laptop across many different test environments. This is currently a proof-of-concept so many features are still on the way. Check stories to see which functionality has already been implemented.

Synopsis

Command line usage is straightforward:

tmt command [options]

Examples

Run all or selected steps for each plan:

tmt run
tmt run discover
tmt run prepare execute

List tests, show details, check against the specification:

tmt test ls
tmt test show
tmt test lint

Create a new test, convert old metadata:

tmt test create
tmt test convert

List plans, show details, check against the specification:

tmt plan ls
tmt plan show
tmt plan lint

List stories, check details, show coverage status:

tmt story ls
tmt story show
tmt story coverage

Many commands support regular expression filtering and other specific options:

tmt story ls cli
tmt story show create
tmt story coverage --implemented

Check help message of individual commands for the full list of available options.

Options

Here is the list of the most frequently used commands and options.

Run

The run command is used to execute test steps. By default all test steps are run. See the L2 Metadata specification for detailed description of individual steps. For now here is at least a brief overview:

discover

gather and show information about test cases to be executed

provision

provision an environment for testing (or use localhost)

prepare

configure environment for testing (e.g. ansible playbook)

execute

run the tests (using the specified framework and its settings)

report

provide an overview of test results and send notifications

finish

additional actions to be performed after the test execution

Note: This is only preview / draft of future functionality. Features described above are not implemented yet.

Test

Manage tests (L1 metadata). Check available tests, inspect their metadata, gather old metadata from various sources and stored them in the new fmf format.

ls

List available tests.

show

Show test details.

lint

Check tests against the L1 metadata specification.

create

Create a new test based on given template.

convert

Convert old test metadata into the new fmf format.

Plan

Manage test plans (L2 metadata). Search for available plans. Explore detailed test step configuration.

ls

List available plans.

show

Show plan details.

lint

Check plans against the L2 metadata specification.

Story

Manage user stories. Check available user stories. Explore coverage (test, implementation, documentation).

ls

List available stories.

show

Show story details.

coverage

Show code, test and docs coverage for given stories.

export

Export selected stories into desired format.

Utils

Various utility options.

--path PATH

Path to the metadata tree (default: current directory)

--verbose

Print additional information standard error output

--debug

Turn on debugging output, do not catch exceptions

Check help message of individual commands for the full list of available options.

Install

The tmt package is available in Fedora and EPEL:

sudo dnf install tmt

Install the latest version from the copr repository:

sudo dnf copr enable psss/tmt
sudo dnf install tmt

When installing using pip you might need to install additional packages on your system:

sudo dnf install gcc python3-devel libvirt-devel
pip install --user tmt

You can omit the --user flag if in a virtual environment.

Develop

In order to experiment, play with the latest bits and develop improvements it is best to use a virtual environment:

mkvirtualenv tmt
git clone https://github.com/psss/tmt
cd tmt
pip install -e .

Install python3-virtualenvwrapper to easily create and enable virtual environments using mkvirtualenv and workon. You can also easily install optional dependencies in this way:

pip install '.[docs]'
pip install '.[tests]'
pip install '.[all]'

Authors

Petr Šplíchal, Miro Hrončok, Alexander Sosedkin, Lukáš Zachar, Petr Menšík, Leoš Pol, Miroslav Vadkerti, Pavel Valena, Jakub Heger, Honza Horák, Rachel Sibley and František Nečas.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

tmt-0.14.1-py3-none-any.whl (67.1 kB view details)

Uploaded Python 3

File details

Details for the file tmt-0.14.1-py3-none-any.whl.

File metadata

  • Download URL: tmt-0.14.1-py3-none-any.whl
  • Upload date:
  • Size: 67.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.6

File hashes

Hashes for tmt-0.14.1-py3-none-any.whl
Algorithm Hash digest
SHA256 78e18b2aba9a79c9a49f5a054da9ca4c85cc723ec1c7f785296eb4a16fabc041
MD5 385f680586a636f6498128315f847ace
BLAKE2b-256 8dd56d7bbe18bd36aaee47395a1d25821fde9bc5527fb1edf92f1e45a3764b79

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page