PyTestLog2DB 0.2.8__tar.gz → 0.3.1__tar.gz

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.
@@ -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
@@ -156,6 +156,8 @@ The usage should be showed as below:
156
156
  --variant VARIANT variant name to be set for this import.
157
157
  --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
158
158
  --config CONFIG configuration json file for component mapping information.
159
+ --interface {db,rest}
160
+ database access interface.
159
161
 
160
162
  The below command is simple usage with all required arguments to import
161
163
  [pytest](https://docs.pytest.org) results into TestResultWebApp\'s
@@ -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,
@@ -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
@@ -156,6 +156,8 @@ The usage should be showed as below:
156
156
  --variant VARIANT variant name to be set for this import.
157
157
  --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
158
158
  --config CONFIG configuration json file for component mapping information.
159
+ --interface {db,rest}
160
+ database access interface.
159
161
 
160
162
  The below command is simple usage with all required arguments to import
161
163
  [pytest](https://docs.pytest.org) results into TestResultWebApp\'s
@@ -1,7 +1,6 @@
1
1
  LICENSE
2
2
  README.rst
3
3
  setup.py
4
- PyTestLog2DB/CDataBase.py
5
4
  PyTestLog2DB/PyTestLog2DB.pdf
6
5
  PyTestLog2DB/__init__.py
7
6
  PyTestLog2DB/__main__.py
@@ -0,0 +1,3 @@
1
+ colorama
2
+ TestResultDBAccess
3
+ lxml
@@ -132,6 +132,8 @@ The usage should be showed as below:
132
132
  --variant VARIANT variant name to be set for this import.
133
133
  --versions VERSIONS metadata: Versions (Software;Hardware;Test) to be set for this import (semicolon separated).
134
134
  --config CONFIG configuration json file for component mapping information.
135
+ --interface {db,rest}
136
+ database access interface.
135
137
 
136
138
 
137
139
  The below command is simple usage with all required arguments to import