1TMT(1)                           User Commands                          TMT(1)
2
3
4

NAME

6       tmt - Test Management Tool
7

DESCRIPTION

9       The  tmt  python  module  and command line tool implement the L1 and L2
10       Metadata Specification which allows to store all needed test  execution
11       data directly within a git repository. In this way it makes tests inde‐
12       pendent on any external test management system.
13
14       The Flexible Metadata Format fmf is used to store data  in  both  human
15       and  machine  readable  way close to the source code. Thanks to inheri‐
16       tance and elasticity metadata are  organized  in  the  structure  effi‐
17       ciently, preventing unnecessary duplication.
18
19       Command  line tool allows to easily create new tests, convert old meta‐
20       data, list and filter available tests and verify them  against  the  L1
21       specification. Plans are used to group tests and precisely define indi‐
22       vidual test steps defined by the  L2  specification,  like  environment
23       preparation.  Stories  are used to track implementation, test and docu‐
24       mentation coverage for individual features.
25
26       Last but not least, the tool provides a user-friendly way how  to  run,
27       debug and develop tests directly from your laptop across many different
28       test environments. This is currently a proof-of-concept  so  many  fea‐
29       tures  are  still  on the way. Check stories to see which functionality
30       has already been implemented.
31

SYNOPSIS

33       Command line usage is straightforward:
34
35          tmt command [options]
36

EXAMPLES

38       Run all or selected steps for each plan:
39
40          tmt run
41          tmt run discover
42          tmt run prepare execute
43
44       List tests, show details, check against the specification:
45
46          tmt test ls
47          tmt test show
48          tmt test lint
49
50       Create a new test, convert old metadata:
51
52          tmt test create
53          tmt test convert
54
55       List plans, show details, check against the specification:
56
57          tmt plan ls
58          tmt plan show
59          tmt plan lint
60
61       List stories, check details, show coverage status:
62
63          tmt story ls
64          tmt story show
65          tmt story coverage
66
67       Many commands support regular expression filtering and  other  specific
68       options:
69
70          tmt story ls cli
71          tmt story show create
72          tmt story coverage --implemented
73
74       Check  help  message of individual commands for the full list of avail‐
75       able options.
76

OPTIONS

78       Here is the list of the most frequently used commands and options.
79
80   Run
81       The run command is used to execute test  steps.  By  default  all  test
82       steps  are run. See the L2 Metadata specification for detailed descrip‐
83       tion of individual steps. For now here is at least a brief overview:
84
85       discover
86              gather and show information about test cases to be executed
87
88       provision
89              provision an environment for testing (or use localhost)
90
91       prepare
92              configure environment for testing (e.g. ansible playbook)
93
94       execute
95              run the tests (using the specified framework and its settings)
96
97       report provide an overview of test results and send notifications
98
99       finish additional actions to be performed after the test execution
100
101       Note: This is only preview / draft of future  functionality.   Features
102       described above are not implemented yet.
103
104   Test
105       Manage  tests (L1 metadata). Check available tests, inspect their meta‐
106       data, gather old metadata from various sources and stored them  in  the
107       new fmf format.
108
109       ls     List available tests.
110
111       show   Show test details.
112
113       lint   Check tests against the L1 metadata specification.
114
115       create Create a new test based on given template.
116
117       convert
118              Convert old test metadata into the new fmf format.
119
120   Plan
121       Manage  test  plans (L2 metadata). Search for available plans.  Explore
122       detailed test step configuration.
123
124       ls     List available plans.
125
126       show   Show plan details.
127
128       lint   Check plans against the L2 metadata specification.
129
130   Story
131       Manage user stories. Check available  user  stories.  Explore  coverage
132       (test, implementation, documentation).
133
134       ls     List available stories.
135
136       show   Show story details.
137
138       coverage
139              Show code, test and docs coverage for given stories.
140
141       export Export selected stories into desired format.
142
143   Utils
144       Various utility options.
145
146       --path PATH
147              Path to the metadata tree (default: current directory)
148
149       --verbose
150              Print additional information standard error output
151
152       --debug
153              Turn on debugging output, do not catch exceptions
154
155       Check  help  message of individual commands for the full list of avail‐
156       able options.
157

INSTALL

159       The tmt package is available in Fedora and EPEL:
160
161          sudo dnf install tmt
162
163       Install the latest version from the copr repository:
164
165          sudo dnf copr enable psss/tmt
166          sudo dnf install tmt
167
168       When installing using pip you might need to install additional packages
169       on your system:
170
171          sudo dnf install gcc python3-devel libvirt-devel
172          pip install --user tmt
173
174       You can omit the --user flag if in a virtual environment.
175

DEVELOP

177       In  order to experiment, play with the latest bits and develop improve‐
178       ments it is best to use a virtual environment:
179
180          mkvirtualenv tmt
181          git clone https://github.com/psss/tmt
182          cd tmt
183          pip install -e .
184
185       Install python3-virtualenvwrapper to easily create and  enable  virtual
186       environments using mkvirtualenv and workon. You can also easily install
187       optional dependencies in this way:
188
189          pip install '.[docs]'
190          pip install '.[tests]'
191          pip install '.[all]'
192
194       Git: https://github.com/psss/tmt
195
196       Docs: http://tmt.readthedocs.io/
197
198       Stories: https://tmt.readthedocs.io/en/latest/stories.html
199
200       Issues: https://github.com/psss/tmt/issues
201
202       Releases: https://github.com/psss/tmt/releases
203
204       Copr: http://copr.fedoraproject.org/coprs/psss/tmt
205
206       PIP: https://pypi.org/project/tmt/
207
208       Travis: https://travis-ci.org/psss/tmt
209
210       Coveralls: https://coveralls.io/github/psss/tmt
211
212       Metadata Specification: https://tmt.readthedocs.io/en/latest/spec.html
213
214       Flexible Metadata Format: http://fmf.readthedocs.io/
215
216       Packit & Testing Farm: https://packit.dev/testing-farm/
217

AUTHORS

219       Petr Šplíchal, Miro Hrončok, Alexander  Sosedkin,  Lukáš  Zachar,  Petr
220       Menšík,  Leoš  Pol, Miroslav Vadkerti, Pavel Valena, Jakub Heger, Honza
221       Horák and Rachel Sibley.
222
224       Copyright (c) 2019 Red Hat, Inc.
225
226       This program is free software; you can redistribute it and/or modify it
227       under the terms of the MIT License.
228
229
230
231
232                                September 2019                          TMT(1)
Impressum