PyTestLog2DB 0.2.8__py3-none-any.whl → 0.3.1__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
@@ -40,7 +40,7 @@ from datetime import datetime, timedelta
40
40
  import platform
41
41
  from pkg_resources import get_distribution
42
42
 
43
- from PyTestLog2DB.CDataBase import CDataBase
43
+ from TestResultDBAccess import DBAccessFactory
44
44
  from PyTestLog2DB.version import VERSION, VERSION_DATE
45
45
 
46
46
  PYTEST_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%f"
@@ -304,6 +304,7 @@ Avalable arguments in command line:
304
304
  - `--variant` : variant name to be set for this import.
305
305
  - `--versions` : metadata: Versions (Software;Hardware;Test) to be set for this import.
306
306
  - `--config` : configuration json file for component mapping information.
307
+ - `--interface` : database access interface.
307
308
 
308
309
  **Arguments:**
309
310
 
@@ -335,6 +336,7 @@ Avalable arguments in command line:
335
336
  cmdlineparser.add_argument('--variant', type=str, help='variant name to be set for this import.')
336
337
  cmdlineparser.add_argument('--versions', type=str, help='metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).')
337
338
  cmdlineparser.add_argument('--config', type=str, help='configuration json file for component mapping information.')
339
+ cmdlineparser.add_argument('--interface', choices=['db', 'rest'], default='db', help='database access interface.')
338
340
 
339
341
  return cmdlineparser.parse_args()
340
342
 
@@ -676,7 +678,7 @@ Get test result from provided Testcase object.
676
678
  traceback_log = f"This test is skipped."
677
679
  return_code = 20
678
680
 
679
- return (main_result, base64.b64encode(traceback_log.encode()), return_code)
681
+ return (main_result, str(base64.b64encode(traceback_log.encode()), encoding='utf-8'), return_code)
680
682
 
681
683
  def process_component_info(dConfig, sTestClassname):
682
684
  """
@@ -1119,7 +1121,7 @@ Flow to import PyTest results to database:
1119
1121
 
1120
1122
 
1121
1123
  # 3. Connect to database
1122
- db=CDataBase()
1124
+ db = DBAccessFactory().create(args.interface)
1123
1125
  try:
1124
1126
  db.connect(args.server,
1125
1127
  args.user,
PyTestLog2DB/version.py CHANGED
@@ -18,6 +18,6 @@
18
18
  #
19
19
  # Version and date of PyTestLog2DB
20
20
  #
21
- VERSION = "0.2.8"
22
- VERSION_DATE = "14.12.2023"
21
+ VERSION = "0.3.1"
22
+ VERSION_DATE = "20.05.2024"
23
23
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyTestLog2DB
3
- Version: 0.2.8
3
+ Version: 0.3.1
4
4
  Summary: Imports pytest result(s) to TestResultWebApp database
5
5
  Home-page: https://github.com/test-fullautomation/python-pytestlog2db
6
6
  Author: Tran Duy Ngoan
@@ -17,7 +17,7 @@ Requires-Python: >=3.0
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
19
  Requires-Dist: colorama
20
- Requires-Dist: mysqlclient
20
+ Requires-Dist: TestResultDBAccess
21
21
  Requires-Dist: lxml
22
22
 
23
23
  PyTestLog2DB
@@ -159,6 +159,8 @@ The usage should be showed as below:
159
159
  --variant VARIANT variant name to be set for this import.
160
160
  --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
161
161
  --config CONFIG configuration json file for component mapping information.
162
+ --interface {db,rest}
163
+ database access interface.
162
164
 
163
165
  The below command is simple usage with all required arguments to import
164
166
  [pytest](https://docs.pytest.org) results into TestResultWebApp\'s
@@ -0,0 +1,11 @@
1
+ PyTestLog2DB/PyTestLog2DB.pdf,sha256=_SWxi7NpwGw5B5ST_PYTRlG3ThL9ZgDnogMXqeS1caw,520598
2
+ PyTestLog2DB/__init__.py,sha256=YKDTJjDsnQkr5X-gjjO8opwKUVKm6kc8sIUpURYMk48,596
3
+ PyTestLog2DB/__main__.py,sha256=YCrS2paaKQlHRlq2d_HKHnsQHs9uVudKN51L84mKd74,693
4
+ PyTestLog2DB/pytestlog2db.py,sha256=uy8brtKt54b2SeDylFrcPL5HvbOKZ0Ip0GVUsZcBe80,43712
5
+ PyTestLog2DB/version.py,sha256=CTc-wU56FDKToufjb5eraZi_hMlI64EDwByvf6UVPZE,917
6
+ PyTestLog2DB/xsd/junit.xsd,sha256=16vVXGy8p1afl2YbgX61g528x4x8Vy3Lf0qqKY9IAZs,6847
7
+ PyTestLog2DB-0.3.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
8
+ PyTestLog2DB-0.3.1.dist-info/METADATA,sha256=23IYCfYo0G4XywE-RkoF33A4lcTr35Ev9YO_Hgy8r5s,10956
9
+ PyTestLog2DB-0.3.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
10
+ PyTestLog2DB-0.3.1.dist-info/top_level.txt,sha256=WN8NnXKE7lkjhVq7yi3WQwIh54rVKUQdecci-Yy4pog,13
11
+ PyTestLog2DB-0.3.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.43.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5