testit-cli 1.3.0__tar.gz → 1.4.0__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.
Files changed (31) hide show
  1. {testit-cli-1.3.0 → testit-cli-1.4.0}/PKG-INFO +8 -1
  2. {testit-cli-1.3.0 → testit-cli-1.4.0}/README.md +4 -0
  3. {testit-cli-1.3.0 → testit-cli-1.4.0}/setup.py +4 -1
  4. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/click_commands.py +2 -2
  5. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/models/testcase.py +1 -0
  6. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/parser.py +30 -7
  7. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli.egg-info/PKG-INFO +8 -1
  8. {testit-cli-1.3.0 → testit-cli-1.4.0}/LICENSE +0 -0
  9. {testit-cli-1.3.0 → testit-cli-1.4.0}/setup.cfg +0 -0
  10. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/__init__.py +0 -0
  11. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/__main__.py +0 -0
  12. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/apiclient.py +0 -0
  13. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/converter.py +0 -0
  14. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/dir_worker.py +0 -0
  15. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/file_worker.py +0 -0
  16. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/importer.py +0 -0
  17. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/logger.py +0 -0
  18. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/models/__init__.py +0 -0
  19. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/models/config.py +0 -0
  20. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/models/mode.py +0 -0
  21. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/models/status.py +0 -0
  22. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/models/testrun.py +0 -0
  23. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/service.py +0 -0
  24. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/service_factory.py +0 -0
  25. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli/validation.py +0 -0
  26. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli.egg-info/SOURCES.txt +0 -0
  27. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli.egg-info/dependency_links.txt +0 -0
  28. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli.egg-info/entry_points.txt +0 -0
  29. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli.egg-info/requires.txt +0 -0
  30. {testit-cli-1.3.0 → testit-cli-1.4.0}/src/testit_cli.egg-info/top_level.txt +0 -0
  31. {testit-cli-1.3.0 → testit-cli-1.4.0}/tests/test_click.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testit-cli
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
5
5
  Home-page: https://pypi.org/project/testit-cli/
6
6
  Author: Integration team
@@ -11,6 +11,9 @@ Classifier: Programming Language :: Python :: 3.6
11
11
  Classifier: Programming Language :: Python :: 3.7
12
12
  Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
14
17
  Description-Content-Type: text/markdown
15
18
  License-File: LICENSE
16
19
  Requires-Dist: testit-api-client==3.4.0
@@ -20,6 +23,10 @@ Requires-Dist: click~=8.0.4
20
23
 
21
24
  # Test IT CLI
22
25
 
26
+ [![Release
27
+ Status](https://img.shields.io/pypi/v/testit-cli?style=plastic)](https://pypi.python.org/pypi/testit-cli)
28
+ [![Downloads](https://img.shields.io/pypi/dm/testit-cli?style=plastic)](https://pypi.python.org/pypi/testit-cli)
29
+
23
30
  This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT.
24
31
  You can see more information in [official documentation](https://docs.testit.software/user-guide/integrations/cli.html)
25
32
 
@@ -1,5 +1,9 @@
1
1
  # Test IT CLI
2
2
 
3
+ [![Release
4
+ Status](https://img.shields.io/pypi/v/testit-cli?style=plastic)](https://pypi.python.org/pypi/testit-cli)
5
+ [![Downloads](https://img.shields.io/pypi/dm/testit-cli?style=plastic)](https://pypi.python.org/pypi/testit-cli)
6
+
3
7
  This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT.
4
8
  You can see more information in [official documentation](https://docs.testit.software/user-guide/integrations/cli.html)
5
9
 
@@ -2,7 +2,7 @@ from setuptools import find_packages, setup
2
2
 
3
3
  setup(
4
4
  name='testit-cli',
5
- version='1.3.0',
5
+ version='1.4.0',
6
6
  description='This tool is the command line wrapper of Test IT allowing you to upload the test results in real time '
7
7
  'to Test IT',
8
8
  long_description=open('README.md', "r").read(),
@@ -17,6 +17,9 @@ setup(
17
17
  'Programming Language :: Python :: 3.7',
18
18
  'Programming Language :: Python :: 3.8',
19
19
  'Programming Language :: Python :: 3.9',
20
+ 'Programming Language :: Python :: 3.10',
21
+ 'Programming Language :: Python :: 3.11',
22
+ 'Programming Language :: Python :: 3.12',
20
23
  ],
21
24
  py_modules=['testit_cli'],
22
25
  packages=find_packages(where='src'),
@@ -69,7 +69,7 @@ class ExtraArgsForOption(click.Option):
69
69
  @click.option("-s", "--separator", type=str, help="Separate the classname value in the results into namespace and classname (.)", default=None)
70
70
  @click.option("-ns", "--namespace", type=str, help="Set namespace (NameSpace01)", default=None)
71
71
  @click.option("-cn", "--classname", type=str, help="Set classname (ClassName01)", default=None)
72
- @click.option("-r", "--results", type=list, required=True, help="Set directory with results file (DIR)", cls=ExtraArgsForOption)
72
+ @click.option("-r", "--results", multiple=True, type=list, required=True, help="Set directory with results file (DIR)", cls=ExtraArgsForOption)
73
73
  @click.option("-a", "--attachments", multiple=True, type=list, help="Path to attachments for test run (multiple)", default=[], cls=ExtraArgsForOption)
74
74
  @click.option("-d", "--debug", is_flag=True, help="Set debug logs")
75
75
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
@@ -91,7 +91,7 @@ def upload_results(url, token, configuration_id, testrun_id, separator, namespac
91
91
  @click.option("-s", "--separator", type=str, help="Separate the classname value in the results into namespace and classname (.)", default=None)
92
92
  @click.option("-ns", "--namespace", type=str, help="Set namespace (NameSpace01)", default=None)
93
93
  @click.option("-cn", "--classname", type=str, help="Set classname (ClassName01)", default=None)
94
- @click.option("-r", "--results", type=list, required=True, help="Set directory with results file (DIR)", cls=ExtraArgsForOption)
94
+ @click.option("-r", "--results", multiple=True, type=list, required=True, help="Set directory with results file (DIR)", cls=ExtraArgsForOption)
95
95
  @click.option("-a", "--attachments", multiple=True, type=list, help="Path to attachments for test run (multiple)", default=[], cls=ExtraArgsForOption)
96
96
  @click.option("-d", "--debug", is_flag=True, help="Set debug logs")
97
97
  @click.option("-dcv", "--disable-cert-validation", is_flag=True, help="Disables certificate validation")
@@ -21,6 +21,7 @@ class TestCase:
21
21
  self.__class_name = class_name
22
22
  self.__duration = timedelta(seconds=float(duration))
23
23
  self.__status = Status.PASSED
24
+ self.__trace = ""
24
25
 
25
26
  def get_name(self):
26
27
  return self.__name
@@ -8,6 +8,17 @@ from .file_worker import FileWorker
8
8
 
9
9
 
10
10
  class Parser:
11
+ __FAILURE_NODE_NAMES = [
12
+ "error",
13
+ "failure",
14
+ "rerunFailure",
15
+ "rerunError",
16
+ "flakyFailure",
17
+ "flakyError",
18
+ "system-out",
19
+ "system-err"]
20
+ __MESSAGE_ATTRIBUTE_NAME = "message"
21
+
11
22
  def __init__(self, config: Config):
12
23
  self.__paths_to_results = config.results
13
24
  self.__separator = config.separator
@@ -48,15 +59,15 @@ class Parser:
48
59
 
49
60
  if elem.childNodes is not None:
50
61
  for child in elem.childNodes:
51
- if child.nodeName == "error" or child.nodeName == "failure":
52
- if "message" in child.attributes:
53
- testcase.set_message(child.attributes["message"].value)
54
- if child.firstChild is not None:
55
- testcase.set_trace(child.firstChild.wholeText)
62
+ if child.nodeName in self.__FAILURE_NODE_NAMES:
63
+ if self.__MESSAGE_ATTRIBUTE_NAME in child.attributes:
64
+ testcase.set_message(child.attributes[self.__MESSAGE_ATTRIBUTE_NAME].value)
65
+ testcase.set_trace(
66
+ testcase.get_trace() + self.__form_trace(child.childNodes))
56
67
  testcase.set_status(Status.FAILED)
57
68
  elif child.nodeName == "skipped":
58
- if "message" in child.attributes:
59
- testcase.set_message(child.attributes["message"].value)
69
+ if self.__MESSAGE_ATTRIBUTE_NAME in child.attributes:
70
+ testcase.set_message(child.attributes[self.__MESSAGE_ATTRIBUTE_NAME].value)
60
71
  testcase.set_status(Status.SKIPPED)
61
72
 
62
73
  results.append(testcase)
@@ -66,3 +77,15 @@ class Parser:
66
77
  )
67
78
 
68
79
  return results
80
+
81
+ @classmethod
82
+ def __form_trace(cls, child_nodes: list) -> str:
83
+ trace = ""
84
+
85
+ for child in child_nodes:
86
+ if "data" in dir(child) and child.data.replace("\t", "").replace("\n", "") != "":
87
+ trace += child.data + "\n"
88
+ if any(child.childNodes):
89
+ trace += cls.__form_trace(child.childNodes)
90
+
91
+ return trace
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: testit-cli
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Summary: This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT
5
5
  Home-page: https://pypi.org/project/testit-cli/
6
6
  Author: Integration team
@@ -11,6 +11,9 @@ Classifier: Programming Language :: Python :: 3.6
11
11
  Classifier: Programming Language :: Python :: 3.7
12
12
  Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
14
17
  Description-Content-Type: text/markdown
15
18
  License-File: LICENSE
16
19
  Requires-Dist: testit-api-client==3.4.0
@@ -20,6 +23,10 @@ Requires-Dist: click~=8.0.4
20
23
 
21
24
  # Test IT CLI
22
25
 
26
+ [![Release
27
+ Status](https://img.shields.io/pypi/v/testit-cli?style=plastic)](https://pypi.python.org/pypi/testit-cli)
28
+ [![Downloads](https://img.shields.io/pypi/dm/testit-cli?style=plastic)](https://pypi.python.org/pypi/testit-cli)
29
+
23
30
  This tool is the command line wrapper of Test IT allowing you to upload the test results in real time to Test IT.
24
31
  You can see more information in [official documentation](https://docs.testit.software/user-guide/integrations/cli.html)
25
32
 
File without changes
File without changes