1PYTHON-NITRATE(1)                User Commands               PYTHON-NITRATE(1)
2
3
4

NAME

6       python-nitrate - Python API for the Nitrate test case management system
7

DESCRIPTION

9       python-nitrate  is  a Python interface to the Nitrate test case manage‐
10       ment system. The package consists of a high-level Python  module  (pro‐
11       vides natural object interface), a low-level driver (allows to directly
12       access Nitrate's xmlrpc API) and a command line interpreter (useful for
13       fast debugging and experimenting).
14

FEATURES

16       Among the most essential python-nitrate features are:
17
18          · Natural and concise Python interface
19
20          · Custom level of caching & logging
21
22          · Automated status coloring
23
24          · Integrated test suite
25
26          · Utility functions
27
28       The  main  motivation  was  to  hide unnecessary implementation details
29       wherever possible so that using the API is as concise as possible.
30
31       Scripts importing python-nitrate can make use of several useful  helper
32       functions  including  info() for logging to stderr, listed() which con‐
33       verts list into nice human readable form, color() for coloring  and  of
34       course log.{debug,info,warn,error} for logging.
35

EXAMPLES

37       Initialize or create an object:
38
39          testcase = TestCase(1234)
40          testrun = TestRun(testplan=<plan>, summary=<summary>)
41
42       Default iterators provided for all container objects:
43
44          for case in TestRun(1234):
45              if case.automated:
46                  case.status = Status("RUNNING")
47                  case.update()
48
49       Linking case to a plan is as simple as adding an item to a set:
50
51          testplan.testcases.add(testcase)
52          testplan.update()
53
54       However,  it's  still  possible to use the low-level driver when a spe‐
55       cific features is not implemented yet or not efficient enough:
56
57          inject = Nitrate()._server.TestCase.get(46490)
58
59       For a quick start you can get some inspiration in the  examples  direc‐
60       tory.  The  'matrix.py'  script  demonstrates  how  to easily display a
61       matrix view of the test run results for a specific test plan. The 'cre‐
62       ate.py'  script  gives  a  broader  overview  covering object creation,
63       attribute setting, adjusting logs and caching.
64

INSTALLATION

66       Install directly from Fedora/Copr repository using yum or dnf:
67
68          yum install python-nitrate
69
70       or use PIP (sudo required if not in a virtualenv):
71
72          pip install nitrate
73
74       Note that for successfull pip installation several  extra  dependencies
75       are necessary:
76
77          yum install gcc python-devel krb5-devel postgresql-devel
78
79       Here's the list of required packages for Debian systems:
80
81          apt install gcc python-dev libkrb5-dev libpq-dev
82

CONFIGURATION

84       To  be  able  to  contact the Nitrate server a minimal user config file
85       ~/.nitrate has to be provided in the user home directory:
86
87          [nitrate]
88          url = https://nitrate.server/xmlrpc/
89

TEST SUITE

91       The high-level interface has an integrated test  suite,  which  can  be
92       easily  run  against  a  stage  server  instance.  For this a couple of
93       objects needs to be prepared and already existing on the server so that
94       we  can  check  valid results. For detailed information about what data
95       has to be prepared see the module documentation.
96
98       Project page: https://github.com/psss/python-nitrate
99
100       Download: https://github.com/psss/python-nitrate/releases
101
102       Copr repo: http://copr.fedoraproject.org/coprs/psss/python-nitrate/
103
104       PyPI: https://pypi.python.org/pypi/nitrate
105
106       File                                                              bugs:
107       https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=python-nitrate
108
109       Nitrate: https://fedorahosted.org/nitrate/
110

SEE ALSO

112       Manual pages covering command line interpreter and release notes:
113
114          nitrate
115          nitrate-notes
116
117       For more detailed and most  up-to-date  description  of  all  available
118       nitrate module features see the Python online documentation:
119
120          pydoc nitrate
121
122       For area-specific details see respective module documentation:
123
124          nitrate.base ......... Nitrate class, search support
125          nitrate.cache ........ Persistent cache, multicall support
126          nitrate.config ....... Configuration, logging, coloring, caching
127          nitrate.containers ... Container classes implementation
128          nitrate.immutable .... Immutable Nitrate objects
129          nitrate.mutable ...... Mutable Nitrate objects
130          nitrate.teiid ........ Teiid support
131          nitrate.tests ........ Test suite
132          nitrate.utils ........ Utilities
133          nitrate.xmlrpc ....... XMLRPC driver
134

AUTHORS

136       High-level  Python  module:  Petr  Šplíchal, Zbyšek Mráz, Martin Kyral,
137       Lukáš Zachar, Filip Holec, Aleš Zelinka, Miroslav Vadkerti,  Leoš  Pol,
138       Iveta Wiedermann, Martin Frodl, Alexander Todorov, Robbie Harwood, Mar‐
139       tin Zelený and Lumír Balhar.
140
141       Low-level XMLRPC driver: Airald Hapairai, David  Malcolm,  Will  Woods,
142       Bill Peck, Chenxiong Qi, Tang Chaobin, Yuguang Wang and Xuqing Kuang.
143
144       Hope,  the  library  will save you time and bring some joy when writing
145       scripts interacting with the Nitrate server. Looking  forward  to  your
146       feedback, comments, suggestions and patches ;-)
147
148       Petr Šplíchal <psplicha@redhat.com>
149
151       Copyright (c) 2012 Red Hat, Inc. All rights reserved.
152
153       This library is free software; you can redistribute it and/or modify it
154       under the terms of the GNU Lesser General Public License  as  published
155       by  the Free Software Foundation; either version 2.1 of the License, or
156       (at your option) any later version.
157
158
159
160
161                                 February 2012               PYTHON-NITRATE(1)
Impressum