PyTestLog2DB 0.3.4__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
PyTestLog2DB/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Robert Bosch GmbH
1
+ # Copyright 2020-2026 Robert Bosch GmbH
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
PyTestLog2DB/__main__.py CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Robert Bosch GmbH
1
+ # Copyright 2020-2026 Robert Bosch GmbH
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- # Copyright 2020-2023 Robert Bosch GmbH
1
+ # Copyright 2020-2026 Robert Bosch GmbH
2
2
  #
3
3
  # Licensed under the Apache License, Version 2.0 (the "License");
4
4
  # you may not use this file except in compliance with the License.
PyTestLog2DB/version.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # **************************************************************************************************************
2
2
  #
3
- # Copyright 2020-2023 Robert Bosch GmbH
3
+ # Copyright 2020-2026 Robert Bosch GmbH
4
4
  #
5
5
  # Licensed under the Apache License, Version 2.0 (the "License");
6
6
  # you may not use this file except in compliance with the License.
@@ -18,5 +18,5 @@
18
18
  #
19
19
  # Version and date of PyTestLog2DB
20
20
  #
21
- VERSION = "0.3.4"
22
- VERSION_DATE = "02.08.2024"
21
+ VERSION = "0.4.0"
22
+ VERSION_DATE = "23.03.2026"
@@ -0,0 +1,346 @@
1
+ Metadata-Version: 2.4
2
+ Name: PyTestLog2DB
3
+ Version: 0.4.0
4
+ Summary: Imports pytest result(s) to TestResultWebApp database
5
+ Author-email: Tran Duy Ngoan <Ngoan.TranDuy@vn.bosch.com>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://pypi.org/project/PyTestLog2DB/
8
+ Project-URL: Documentation, https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/PyTestLog2DB/PyTestLog2DB.pdf
9
+ Project-URL: Readme, https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/README.rst
10
+ Project-URL: Repository, https://github.com/test-fullautomation/python-pytestlog2db
11
+ Project-URL: Issues, https://github.com/test-fullautomation/python-pytestlog2db/issues
12
+ Keywords: pytest,testresults,database
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Software Development
16
+ Requires-Python: >=3.11
17
+ Description-Content-Type: text/x-rst
18
+ License-File: LICENSE
19
+ Requires-Dist: docutils>=0.22.4
20
+ Requires-Dist: colorama
21
+ Requires-Dist: TestResultDBAccess
22
+ Requires-Dist: lxml
23
+ Requires-Dist: PythonExtensionsCollection
24
+ Requires-Dist: GenPackageDoc
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest>=6.0; extra == "dev"
27
+ Requires-Dist: pytest-cov>=3.0; extra == "dev"
28
+ Provides-Extra: docs
29
+ Requires-Dist: docutils>=0.22.4; extra == "docs"
30
+ Dynamic: license-file
31
+
32
+ PyTestLog2DB
33
+ ============
34
+
35
+ Table of Contents
36
+ -----------------
37
+
38
+ - `Getting Started <#getting-started>`__
39
+
40
+ - `How to install <#how-to-install>`__
41
+ - `Usage <#usage>`__
42
+ - `Example <#example>`__
43
+ - `Contribution <#contribution>`__
44
+ - `Sourcecode Documentation <#sourcecode-documentation>`__
45
+ - `Feedback <#feedback>`__
46
+ - `About <#about>`__
47
+
48
+ - `Maintainers <#maintainers>`__
49
+ - `Contributors <#contributors>`__
50
+ - `License <#license>`__
51
+
52
+ Getting Started
53
+ ---------------
54
+
55
+ **PyTestLog2DB** is a command-line tool that enables you to import pytest_ XML
56
+ result files into TestResultWebApp_'s database for presenting an overview about
57
+ the whole test execution and detail of each test result.
58
+
59
+ **PyTestLog2DB** tool is operating system independent and only works with
60
+ Python 3.
61
+
62
+ How to install
63
+ ~~~~~~~~~~~~~~
64
+
65
+ **PyTestLog2DB** can be installed in two different ways.
66
+
67
+ The **PyTestLog2DB** can be installed in two different ways.
68
+
69
+ 1. Installation via PyPi (recommended for users)
70
+
71
+ .. code::
72
+
73
+ pip install PyTestLog2DB
74
+
75
+ `PyTestLog2DB in PyPi <https://pypi.org/project/PyTestLog2DB/>`_
76
+
77
+ 2. Installation via GitHub (recommended for developers)
78
+
79
+ * Clone the **python-pytestlog2db** repository to your machine.
80
+
81
+ .. code::
82
+
83
+ git clone https://github.com/test-fullautomation/python-pytestlog2db.git
84
+
85
+ `PyTestLog2DB in GitHub <https://github.com/test-fullautomation/python-PyTestLog2DB>`_
86
+
87
+ * Use the following command to install **PyTestLog2DB** (executed in repository main folder):
88
+
89
+ .. code::
90
+
91
+ python -m pip install .
92
+
93
+ Or:
94
+
95
+ .. code::
96
+
97
+ python -m pip install --proxy <proxy> .
98
+
99
+ This command will also download and install all dependencies that are required to work with the source files in the current repository.
100
+ After the initial installation of **PyTestLog2DB** is done, you have the following two possibilities:
101
+
102
+ 1. *Clean the previous installation*:
103
+
104
+ .. code::
105
+
106
+ python "./cleanup_installation.py"
107
+
108
+ ``cleanup_installation.py`` explicitly deletes all files and folders within the component installation folder under
109
+ ``site-packages`` and also deletes local build artefacts.
110
+
111
+ 2. *Render the component documentation*:
112
+
113
+ .. code::
114
+
115
+ python "./genpackagedoc.py"
116
+
117
+ This would e.g. be required in case of changes in the interface of **PyTestLog2DB**.
118
+
119
+ The documentation is rendered by a separate application called **GenPackageDoc**, that is part
120
+ of the build dependencies and runtime dependencies of **PyTestLog2DB**.
121
+
122
+ **GenPackageDoc** needs to be configured. Details about how to do this, can be found in the
123
+ `README.rst <https://github.com/test-fullautomation/python-genpackagedoc/blob/develop/README.rst>`_
124
+ (sections *Install dependencies* and *Configure dependencies*).
125
+
126
+ * Use the following command to build **PyTestLog2DB** (executed in repository main folder):
127
+
128
+ .. code::
129
+
130
+ python -m build .
131
+
132
+ Or:
133
+
134
+ .. code::
135
+
136
+ python -m pip config set global.proxy <proxy>
137
+ python -m build .
138
+
139
+ After succesful installation, the executable file **PyTestLog2DB** will be
140
+ available (under *Scripts* folder of Python on Windows and *~/.local/bin/*
141
+ folder on Linux).
142
+
143
+ In case above location is added to **PATH** environment variable then you can
144
+ run it directly as operation system's command.
145
+
146
+ Usage
147
+ -----
148
+
149
+ **PyTestLog2DB** requires the pytest_ result file(s) which contains the test
150
+ result in *JUnit XML* format and TestResultWebApp_'s database information for
151
+ importing.
152
+
153
+ Use below command to get tools's usage
154
+
155
+ ::
156
+
157
+ PyTestLog2DB -h
158
+
159
+
160
+ The usage should be showed as below:
161
+
162
+ ::
163
+
164
+ usage: PyTestLog2DB (PyTestXMLReport to TestResultWebApp importer) [-h] [-v] [--recursive] [--dryrun] [--append] [--UUID UUID] [--variant VARIANT] [--versions VERSIONS] [--config CONFIG]
165
+ resultxmlfile server user password database
166
+
167
+ PyTestLog2DB imports pytest JUnit XML report file(s)generated by pytest into a WebApp database.
168
+
169
+ positional arguments:
170
+ resultxmlfile absolute or relative path to the pytest JUnit XML report file or directory of report files to be imported.
171
+ server server which hosts the database (IP or URL).
172
+ user user for database login.
173
+ password password for database login.
174
+ database database schema for database login.
175
+
176
+ optional arguments:
177
+ -h, --help show this help message and exit
178
+ -v, --version version of the PyTestLog2DB importer.
179
+ --recursive if set, then the path is searched recursively for output files to be imported.
180
+ --dryrun if set, then verify all input arguments (includes DB connection) and show what would be done.
181
+ --append is used in combination with --UUID <UUID>. If set, allow to append new result(s) to existing execution result UUID in --UUID argument.
182
+ --UUID UUID UUID used to identify the import and version ID on webapp. If not provided PyTestLog2DB will generate an UUID for the whole import.
183
+ --variant VARIANT variant name to be set for this import.
184
+ --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
185
+ --config CONFIG configuration json file for component mapping information.
186
+ --interface {db,rest}
187
+ database access interface.
188
+ --testrunurl TESTRUNURL
189
+ link to test execution job: Jenkins job, Gitlab CI/CD pipeline, ...
190
+
191
+ The below command is simple usage with all required arguments to import
192
+ pytest_ results into TestResultWebApp's database:
193
+
194
+ ::
195
+
196
+ PyTestLog2DB <resultxmlfile> <server> <user> <password> <database>
197
+
198
+ Besides the executable file, you can also run tool as a Python module
199
+
200
+ ::
201
+
202
+ python -m PyTestLog2DB <resultxmlfile> <server> <user> <password> <database>
203
+
204
+ Example
205
+ -------
206
+
207
+ In order the import the robot result(s) to TestResultWebApp's database,
208
+ we need the pytest_ result file in *JUnit XML* format.
209
+
210
+ So, firstly execute the pytest_ testcase(s) to get the result file(s). But the
211
+ ***.xml** result file is not generated by default.
212
+
213
+ We need to specify the argument *--junit-xml=<path>* when executing pytest_
214
+ to get the generated *JUnit XML* report file at given path.
215
+
216
+ E.g:
217
+ ::
218
+
219
+ pytest --junit-xml=path/to/result.xml pytest/folder
220
+
221
+ After that, the ***.xml** result file will be available at **path/to/result.xml**
222
+ and can be used for importing to TestResultWebApp_ with command:
223
+
224
+ ::
225
+
226
+ PyTestLog2DB path/to/result.xml localhost test_user test_pw test_db
227
+
228
+ Then, open TestResultWebApp with your favourite browser and you will see how
229
+ wonderful the execution result is displayed as below figures:
230
+
231
+ Dashboard view:
232
+
233
+ .. image:: https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/packagedoc/additional_docs/pictures/Dashboard.png?raw=true
234
+ :alt: Dashboard view
235
+
236
+ Datatable view:
237
+
238
+ .. image:: https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/packagedoc/additional_docs/pictures/Datatable.png?raw=true
239
+ :alt: Datatable view
240
+
241
+ Notes:
242
+ ~~~~~~
243
+
244
+ The ***.xml** report file generated by pytest contains only the testcase
245
+ result(s) and less metadata information about the test execution such as
246
+ *project/variant*, *software version*, *tester* , *component*, ...
247
+ which are required by TestResultWebApp_.
248
+
249
+ So that, **PyTestLog2DB** will handle those information with the default values.
250
+
251
+ But you can use the optional argument *--config CONFIG* to specify those
252
+ information when importing to TestResultWebApp_'s database.
253
+
254
+ Sample configuration file:
255
+
256
+ ::
257
+
258
+ {
259
+ "variant" : "MyProject",
260
+ "version_sw": "0.1.1",
261
+ "components": {
262
+ "Testsuite1" : "test-data.test_tsclass.TestSuite1",
263
+ "Testsuite2" : "test-data.test_tsclass.TestSuite2",
264
+ "Others" : [
265
+ "test-data.test_ts1",
266
+ "test-data.test_ts2"
267
+ ]
268
+ },
269
+ "tester" : "Tran Duy Ngoan"
270
+ }
271
+
272
+ Please refer `PyTestLog2DB tool’s Documentation`_ for more detail about default
273
+ values and the configuration json file.
274
+
275
+ Contribution
276
+ ------------
277
+ We are always searching support and you are cordially invited to help to improve
278
+ **PyTestLog2DB** tool.
279
+
280
+ Sourcecode Documentation
281
+ ------------------------
282
+ To understand more detail about the tool's features, parameters and how pytest
283
+ result(s) will be displayed on TestResultWebApp, please refer to
284
+ `PyTestLog2DB tool’s Documentation`_.
285
+
286
+ Feedback
287
+ --------
288
+ Please feel free to give any feedback to us via
289
+
290
+ Email to: `Thomas Pollerspöck`_
291
+
292
+ Issue tracking: `PyTestLog2DB Issues`_
293
+
294
+ About
295
+ -----
296
+
297
+ Maintainers
298
+ ~~~~~~~~~~~
299
+ `Thomas Pollerspöck`_
300
+
301
+ `Holger Queckenstedt`_
302
+
303
+ `Tran Duy Ngoan`_
304
+
305
+ Contributors
306
+ ~~~~~~~~~~~~
307
+
308
+ `Nguyen Huynh Tri Cuong`_
309
+
310
+ `Mai Dinh Nam Son`_
311
+
312
+ `Tran Hoang Nguyen`_
313
+
314
+ License
315
+ ~~~~~~~
316
+
317
+ Copyright 2020-2023 Robert Bosch GmbH
318
+
319
+ Licensed under the Apache License, Version 2.0 (the "License");
320
+ you may not use this file except in compliance with the License.
321
+ You may obtain a copy of the License at
322
+
323
+ |License: Apache v2|
324
+
325
+ Unless required by applicable law or agreed to in writing, software
326
+ distributed under the License is distributed on an "AS IS" BASIS,
327
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
328
+ See the License for the specific language governing permissions and
329
+ limitations under the License.
330
+
331
+
332
+ .. |License: Apache v2| image:: https://img.shields.io/pypi/l/robotframework.svg
333
+ :target: http://www.apache.org/licenses/LICENSE-2.0.html
334
+ .. _pytest: https://docs.pytest.org
335
+ .. _JUnit XML: https://llg.cubic.org/docs/junit
336
+ .. _PyTestLog2DB: https://github.com/test-fullautomation/python-pytestlog2db
337
+ .. _TestResultWebApp: https://github.com/test-fullautomation/TestResultWebApp
338
+ .. _PyPI: https://pypi.org/
339
+ .. _Thomas Pollerspöck: mailto:Thomas.Pollerspoeck@de.bosch.com
340
+ .. _Tran Duy Ngoan: mailto:Ngoan.TranDuy@vn.bosch.com
341
+ .. _Nguyen Huynh Tri Cuong: mailto:Cuong.NguyenHuynhTri@vn.bosch.com
342
+ .. _Mai Dinh Nam Son: mailto:Son.MaiDinhNam@vn.bosch.com
343
+ .. _Tran Hoang Nguyen: mailto:Nguyen.TranHoang@vn.bosch.com
344
+ .. _Holger Queckenstedt: mailto:Holger.Queckenstedt@de.bosch.com
345
+ .. _PyTestLog2DB tool’s Documentation: https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/PyTestLog2DB/PyTestLog2DB.pdf
346
+ .. _PyTestLog2DB Issues: https://github.com/test-fullautomation/python-pytestlog2db/issues
@@ -0,0 +1,12 @@
1
+ PyTestLog2DB/PyTestLog2DB.pdf,sha256=xNHY2lBGVklJkxaHwe1mIHUtNH8nkUGtKXBSpkS2XZs,517552
2
+ PyTestLog2DB/__init__.py,sha256=QGox2k2vxlv4xBA8Q82Elqn9X8gf47khen7co4L3fVI,596
3
+ PyTestLog2DB/__main__.py,sha256=r7Rk90uYaxB5ML9NTpYXdXcxL-3Sw7g2m4lCU8xRS08,693
4
+ PyTestLog2DB/pytestlog2db.py,sha256=vZb6IzbywP839B0cCFSsO8w1D2R9KQglJB0-NjNLDMY,43947
5
+ PyTestLog2DB/version.py,sha256=tiaaaicbE4AgDXG4lN0vWS-JNHFapl3ciGZYNbCUG2U,916
6
+ PyTestLog2DB/xsd/junit.xsd,sha256=16vVXGy8p1afl2YbgX61g528x4x8Vy3Lf0qqKY9IAZs,6847
7
+ pytestlog2db-0.4.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
+ pytestlog2db-0.4.0.dist-info/METADATA,sha256=KfGqdTBp4BlnetRY-EEC6DGYLuJHeVWbMAcz3CuC008,11863
9
+ pytestlog2db-0.4.0.dist-info/WHEEL,sha256=kIt4MnNJDJ26dPfzNiSjgFHPBc-JaVd9TwMdICBRasQ,90
10
+ pytestlog2db-0.4.0.dist-info/entry_points.txt,sha256=loulU5_oxKt-J6om9TPOGuk_riltUcIvUNG0XKpHtis,72
11
+ pytestlog2db-0.4.0.dist-info/top_level.txt,sha256=WN8NnXKE7lkjhVq7yi3WQwIh54rVKUQdecci-Yy4pog,13
12
+ pytestlog2db-0.4.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.44.0)
2
+ Generator: setuptools (0.4.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ PyTestLog2DB = PyTestLog2DB.pytestlog2db:PyTestLog2DB
@@ -1,310 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: PyTestLog2DB
3
- Version: 0.3.4
4
- Summary: Imports pytest result(s) to TestResultWebApp database
5
- Home-page: https://github.com/test-fullautomation/python-pytestlog2db
6
- Author: Tran Duy Ngoan
7
- Author-email: Ngoan.TranDuy@vn.bosch.com
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: License :: OSI Approved :: Apache Software License
12
- Classifier: Operating System :: OS Independent
13
- Classifier: Development Status :: 4 - Beta
14
- Classifier: Intended Audience :: Developers
15
- Classifier: Topic :: Software Development
16
- Requires-Python: >=3.0
17
- Description-Content-Type: text/markdown
18
- License-File: LICENSE
19
- Requires-Dist: colorama
20
- Requires-Dist: TestResultDBAccess
21
- Requires-Dist: lxml
22
-
23
- PyTestLog2DB
24
- ============
25
-
26
- Table of Contents
27
- -----------------
28
-
29
- - [Getting Started](#getting-started)
30
- - [How to install](#how-to-install)
31
- - [Usage](#usage)
32
- - [Example](#example)
33
- - [Contribution](#contribution)
34
- - [Sourcecode Documentation](#sourcecode-documentation)
35
- - [Feedback](#feedback)
36
- - [About](#about)
37
- - [Maintainers](#maintainers)
38
- - [Contributors](#contributors)
39
- - [License](#license)
40
-
41
- Getting Started
42
- ---------------
43
-
44
- **PyTestLog2DB** is a command-line tool that enables you to import
45
- [pytest](https://docs.pytest.org) XML result files into
46
- [TestResultWebApp](https://github.com/test-fullautomation/TestResultWebApp)\'s
47
- database for presenting an overview about the whole test execution and
48
- detail of each test result.
49
-
50
- **PyTestLog2DB** tool is operating system independent and only works
51
- with Python 3.
52
-
53
- ### How to install
54
-
55
- **PyTestLog2DB** can be installed in two different ways.
56
-
57
- 1. Installation via PyPi (recommended for users)
58
-
59
- ``` {.}
60
- pip install PyTestLog2DB
61
- ```
62
-
63
- [PyTestLog2DB in PyPi](https://pypi.org/project/PyTestLog2DB/)
64
-
65
- 2. Installation via GitHub (recommended for developers)
66
-
67
- - Clone the **python-pytestlog2db** repository to your machine.
68
-
69
- ``` {.}
70
- git clone https://github.com/test-fullautomation/python-pytestlog2db.git
71
- ```
72
-
73
- [PyTestLog2DB in
74
- GitHub](https://github.com/test-fullautomation/python-pytestlog2db)
75
-
76
- - Install dependencies
77
-
78
- **PyTestLog2DB** requires some additional Python libraries.
79
- Before you install the cloned repository sources you have to
80
- install the dependencies manually. The names of all related
81
- packages you can find in the file `requirements.txt` in the
82
- repository root folder. Use pip to install them:
83
-
84
- ``` {.}
85
- pip install -r ./requirements.txt
86
- ```
87
-
88
- Additionally install **LaTeX** (recommended: TeX Live). This is
89
- used to render the documentation.
90
-
91
- - Configure dependencies
92
-
93
- The installation of **PyTestLog2DB** includes to generate the
94
- documentation in PDF format. This is done by an application
95
- called **GenPackageDoc**, that is part of the installation
96
- dependencies (see `requirements.txt`).
97
-
98
- **GenPackageDoc** uses **LaTeX** to generate the documentation
99
- in PDF format. Therefore **GenPackageDoc** needs to know where
100
- to find **LaTeX**. This is defined in the **GenPackageDoc**
101
- configuration file
102
-
103
- ``` {.}
104
- packagedoc\packagedoc_config.json
105
- ```
106
-
107
- Before you start the installation you have to introduce the
108
- following environment variable, that is used in
109
- `packagedoc_config.json`:
110
-
111
- - `GENDOC_LATEXPATH` : path to `pdflatex` executable
112
-
113
- - Use the following command to install **PyTestLog2DB**:
114
-
115
- ``` {.}
116
- python setup.py install
117
- ```
118
-
119
- After succesful installation, the executable file **PyTestLog2DB** will
120
- be available (under *Scripts* folder of Python on Windows and
121
- *\~/.local/bin/* folder on Linux).
122
-
123
- In case above location is added to **PATH** environment variable then
124
- you can run it directly as operation system\'s command.
125
-
126
- Usage
127
- -----
128
-
129
- **PyTestLog2DB** requires the [pytest](https://docs.pytest.org) result
130
- file(s) which contains the test result in *JUnit XML* format and
131
- [TestResultWebApp](https://github.com/test-fullautomation/TestResultWebApp)\'s
132
- database information for importing.
133
-
134
- Use below command to get tools\'s usage
135
-
136
- PyTestLog2DB -h
137
-
138
- The usage should be showed as below:
139
-
140
- usage: PyTestLog2DB (PyTestXMLReport to TestResultWebApp importer) [-h] [-v] [--recursive] [--dryrun] [--append] [--UUID UUID] [--variant VARIANT] [--versions VERSIONS] [--config CONFIG]
141
- resultxmlfile server user password database
142
-
143
- PyTestLog2DB imports pytest JUnit XML report file(s)generated by pytest into a WebApp database.
144
-
145
- positional arguments:
146
- resultxmlfile absolute or relative path to the pytest JUnit XML report file or directory of report files to be imported.
147
- server server which hosts the database (IP or URL).
148
- user user for database login.
149
- password password for database login.
150
- database database schema for database login.
151
-
152
- optional arguments:
153
- -h, --help show this help message and exit
154
- -v, --version version of the PyTestLog2DB importer.
155
- --recursive if set, then the path is searched recursively for output files to be imported.
156
- --dryrun if set, then verify all input arguments (includes DB connection) and show what would be done.
157
- --append is used in combination with --UUID <UUID>. If set, allow to append new result(s) to existing execution result UUID in --UUID argument.
158
- --UUID UUID UUID used to identify the import and version ID on webapp. If not provided PyTestLog2DB will generate an UUID for the whole import.
159
- --variant VARIANT variant name to be set for this import.
160
- --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
161
- --config CONFIG configuration json file for component mapping information.
162
- --interface {db,rest}
163
- database access interface.
164
- --testrunurl TESTRUNURL
165
- link to test execution job: Jenkins job, Gitlab CI/CD pipeline, ...
166
-
167
- The below command is simple usage with all required arguments to import
168
- [pytest](https://docs.pytest.org) results into TestResultWebApp\'s
169
- database:
170
-
171
- PyTestLog2DB <resultxmlfile> <server> <user> <password> <database>
172
-
173
- Besides the executable file, you can also run tool as a Python module
174
-
175
- python -m PyTestLog2DB <resultxmlfile> <server> <user> <password> <database>
176
-
177
- Example
178
- -------
179
-
180
- In order the import the robot result(s) to TestResultWebApp\'s database,
181
- we need the [pytest](https://docs.pytest.org) result file in *JUnit XML*
182
- format.
183
-
184
- So, firstly execute the [pytest](https://docs.pytest.org) testcase(s) to
185
- get the result file(s). But the **\*.xml** result file is not generated
186
- by default.
187
-
188
- We need to specify the argument *\--junit-xml=\<path\>* when executing
189
- [pytest](https://docs.pytest.org) to get the generated *JUnit XML*
190
- report file at given path.
191
-
192
- E.g: :
193
-
194
- pytest --junit-xml=path/to/result.xml pytest/folder
195
-
196
- After that, the **\*.xml** result file will be available at
197
- **path/to/result.xml** and can be used for importing to
198
- [TestResultWebApp](https://github.com/test-fullautomation/TestResultWebApp)
199
- with command:
200
-
201
- PyTestLog2DB path/to/result.xml localhost test_user test_pw test_db
202
-
203
- Then, open TestResultWebApp with your favourite browser and you will see
204
- how wonderful the execution result is displayed as below figures:
205
-
206
- Dashboard view:
207
-
208
- ![Dashboard view](https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/packagedoc/additional_docs/pictures/Dashboard.png?raw=true)
209
-
210
- Datatable view:
211
-
212
- ![Datatable view](https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/packagedoc/additional_docs/pictures/Datatable.png?raw=true)
213
-
214
- ### Notes:
215
-
216
- > The **\*.xml** report file generated by pytest contains only the
217
- > testcase result(s) and less metadata information about the test
218
- > execution such as *project/variant*, *software version*, *tester* ,
219
- > *component*, \... which are required by
220
- > [TestResultWebApp](https://github.com/test-fullautomation/TestResultWebApp).
221
- >
222
- > So that, **PyTestLog2DB** will handle those information with the
223
- > default values.
224
- >
225
- > But you can use the optional argument *\--config CONFIG* to specify
226
- > those information when importing to
227
- > [TestResultWebApp](https://github.com/test-fullautomation/TestResultWebApp)\'s
228
- > database.
229
- >
230
- > Sample configuration file:
231
- >
232
- > {
233
- > "variant" : "MyProject",
234
- > "version_sw": "0.1.1",
235
- > "components": {
236
- > "Testsuite1" : "test-data.test_tsclass.TestSuite1",
237
- > "Testsuite2" : "test-data.test_tsclass.TestSuite2",
238
- > "Others" : [
239
- > "test-data.test_ts1",
240
- > "test-data.test_ts2"
241
- > ]
242
- > },
243
- > "tester" : "Tran Duy Ngoan"
244
- > }
245
- >
246
- > Please refer [PyTestLog2DB tool's
247
- > Documentation](https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/PyTestLog2DB/PyTestLog2DB.pdf)
248
- > for more detail about default values and the configuration json file.
249
-
250
- Contribution
251
- ------------
252
-
253
- We are always searching support and you are cordially invited to help to
254
- improve **PyTestLog2DB** tool.
255
-
256
- Sourcecode Documentation
257
- ------------------------
258
-
259
- To understand more detail about the tool\'s features, parameters and how
260
- pytest result(s) will be displayed on TestResultWebApp, please refer to
261
- [PyTestLog2DB tool's
262
- Documentation](https://github.com/test-fullautomation/python-pytestlog2db/blob/develop/PyTestLog2DB/PyTestLog2DB.pdf).
263
-
264
- Feedback
265
- --------
266
-
267
- Please feel free to give any feedback to us via
268
-
269
- Email to: [Thomas Pollerspöck](mailto:Thomas.Pollerspoeck@de.bosch.com)
270
-
271
- Issue tracking: [PyTestLog2DB
272
- Issues](https://github.com/test-fullautomation/python-pytestlog2db/issues)
273
-
274
- About
275
- -----
276
-
277
- ### Maintainers
278
-
279
- [Thomas Pollerspöck](mailto:Thomas.Pollerspoeck@de.bosch.com)
280
-
281
- [Holger Queckenstedt](mailto:Holger.Queckenstedt@de.bosch.com)
282
-
283
- [Tran Duy Ngoan](mailto:Ngoan.TranDuy@vn.bosch.com)
284
-
285
- ### Contributors
286
-
287
- [Nguyen Huynh Tri Cuong](mailto:Cuong.NguyenHuynhTri@vn.bosch.com)
288
-
289
- [Mai Dinh Nam Son](mailto:Son.MaiDinhNam@vn.bosch.com)
290
-
291
- [Tran Hoang Nguyen](mailto:Nguyen.TranHoang@vn.bosch.com)
292
-
293
- ### License
294
-
295
- Copyright 2020-2023 Robert Bosch GmbH
296
-
297
- Licensed under the Apache License, Version 2.0 (the \"License\"); you
298
- may not use this file except in compliance with the License. You may
299
- obtain a copy of the License at
300
-
301
- > [![License: Apache
302
- > v2](https://img.shields.io/pypi/l/robotframework.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)
303
-
304
- Unless required by applicable law or agreed to in writing, software
305
- distributed under the License is distributed on an \"AS IS\" BASIS,
306
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
307
- See the License for the specific language governing permissions and
308
- limitations under the License.
309
-
310
-
@@ -1,11 +0,0 @@
1
- PyTestLog2DB/PyTestLog2DB.pdf,sha256=zxEL67Uk-jG0-ytTd-V2MjVvwfR0WrDQf6Hjf_1xewA,522565
2
- PyTestLog2DB/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
3
- PyTestLog2DB/__main__.py,sha256=YCrS2paaKQlHRlq2d_HKHnsQHs9uVudKN51L84mKd74,693
4
- PyTestLog2DB/pytestlog2db.py,sha256=IGIslw6td-TKsxQGbHJlNmAMZQZhEAv3Bh9K2o5GDTE,43947
5
- PyTestLog2DB/version.py,sha256=l1MnmQswsjfjXT_LmUY84W7K5AyVMx5XaQpwSevzMeg,916
6
- PyTestLog2DB/xsd/junit.xsd,sha256=16vVXGy8p1afl2YbgX61g528x4x8Vy3Lf0qqKY9IAZs,6847
7
- PyTestLog2DB-0.3.4.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
- PyTestLog2DB-0.3.4.dist-info/METADATA,sha256=AMKe0ETbmmztnOG1w9_yUhQPkOjSfeSaQ2GTL0q06-g,11077
9
- PyTestLog2DB-0.3.4.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
10
- PyTestLog2DB-0.3.4.dist-info/top_level.txt,sha256=WN8NnXKE7lkjhVq7yi3WQwIh54rVKUQdecci-Yy4pog,13
11
- PyTestLog2DB-0.3.4.dist-info/RECORD,,