testbench2robotframework 0.6.1__tar.gz → 0.7.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.
- testbench2robotframework-0.7.0/DEVELOPMENT.md +25 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/PKG-INFO +8 -15
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/README.md +6 -13
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/requirements.txt +8 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/__init__.py +1 -1
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/result_writer.py +8 -5
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/testbench2rf.py +14 -8
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/PKG-INFO +8 -15
- testbench2robotframework-0.6.1/DEVELOPMENT.md +0 -103
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/CreatePiPWheel.bat +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/CreatePiPWheel.sh +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/LICENSE +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/MANIFEST.in +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/config.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/LibrarySubdivision.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/Unbenannt.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/generated.png +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/libraries.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/resources.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/rfLibraryRootsTestBench.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/testbench_rfLibraryRegex.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/testbench_rfResourceRegex.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/testthemen.PNG +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/pyproject.toml +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/setup.cfg +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/setup.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/__main__.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/config.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/json_reader.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/json_writer.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/log.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/model.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/robotframework2testbench.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/testbench2robotframework.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/testsuite_write.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/utils.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/SOURCES.txt +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/dependency_links.txt +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/entry_points.txt +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/not-zip-safe +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/requires.txt +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework.egg-info/top_level.txt +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_data/configurations/invalid_config.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_data/configurations/valid_config.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_missing_files.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_robot_files_should_not_contain_invalid_characters.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/config.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/TestThemeTree.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2184-PC-21637.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2184.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2185-PC-21639.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2185.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2231-PC-21643.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2231.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2232-PC-21645.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2232.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2233-PC-21647.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2233-PC-21649.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2233.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2241-PC-21667.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2241-PC-21668.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2241.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2242-PC-21671.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2242.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2243-PC-21673.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2243.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2244-PC-21675.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2244.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2261-PC-21683.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_data/json-report/itba-TC-2261.json +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_setup/test_setup_name.py +0 -0
- {testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_zip_file_generation.py +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
## Setting up project for the first time
|
|
3
|
+
1. Write all dependencies into setup.cfg (install_requires and extras_require).
|
|
4
|
+
2. Create venv (python -m venv .venv) and activate it (".venv\scripts\activate" or "source .venv/bin/activate")
|
|
5
|
+
3. Update pip (python -m pip install -U pip)
|
|
6
|
+
3. Install pip-tools (pip install pip-tools)
|
|
7
|
+
4. Update/Create `requirements.txt` (when dependencies have been updated in setup.cfg)
|
|
8
|
+
- with Development dependencies
|
|
9
|
+
> pip-compile --extra dev setup.cfg
|
|
10
|
+
- or only with Runtime dependencies
|
|
11
|
+
> pip-compile setup.cfg
|
|
12
|
+
5. Install dependencies (pip install -U -r requirements.txt)
|
|
13
|
+
6. Install project into local venv (pip install -e .[extra])
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## Generate documentation in Word format
|
|
17
|
+
[Install Pandoc](https://pandoc.org/installing.html)
|
|
18
|
+
|
|
19
|
+
```shell
|
|
20
|
+
pandoc -s README.md -M title="imbus TestBench - Robot Code Generator" -M subtitle=Benutzerhandbuch -M toc-title=Inhaltsverzeichnis --toc -o Benutzerhandbuch.docx
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: testbench2robotframework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Robot Framework Code Generator from Keyword-Driven Tests in imbus TestBench 3.0 and newer
|
|
5
5
|
Home-page: https://github.com/imbus/testbench2robotframework
|
|
6
6
|
Author: imbus AG
|
|
@@ -14,14 +14,7 @@ Description: # Installation des Robot Code Generators
|
|
|
14
14
|
python --version
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Die Installation des Code Generators erfolgt
|
|
18
|
-
Dieses kann durch Ausführung des folgenden Kommandozeilenbefehls installiert werden, wobei ``testbench2robotframework-0.4.1-py3-none-any.whl`` für den Pfad zu der heruntergeladenen whl-Datei steht:
|
|
19
|
-
|
|
20
|
-
```powershell
|
|
21
|
-
python -m pip install testbench2robotframework-0.4.1-py3-none-any.whl
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Alternativ kann die Installation direkt online aus dem Python Package Index installiert werden.
|
|
17
|
+
Die Installation des Code Generators erfolgt aus dem Python Package Index.
|
|
25
18
|
```powershell
|
|
26
19
|
pip install testbench2robotframework
|
|
27
20
|
```
|
|
@@ -40,9 +33,9 @@ Description: # Installation des Robot Code Generators
|
|
|
40
33
|
|
|
41
34
|
Zum Generieren von Robot Framework Testsuites wird der Subcommand ``write`` mit zwei Parametern aufgerufen:
|
|
42
35
|
|
|
43
|
-
|
|
36
|
+
- Dem Pfad zu einer JSON Datei, die als Konfigurationsdatei für die Ausgabe des Generators dient. Wird diese beim Aufruf des Code Generators nicht übergeben, so wird automatisch eine Konfigurationsdatei mit dem Namen ``config.json`` generiert.
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
- Dem Pfad zu den TestBech JSON Report Dateien. Diese können in einem Verzeichnis oder in einer ZIP Datei liegen.
|
|
46
39
|
|
|
47
40
|
Der folgende Aufruf demonstriert die Verwendung anhand eines Beispiels:
|
|
48
41
|
```powershell
|
|
@@ -58,11 +51,11 @@ Description: # Installation des Robot Code Generators
|
|
|
58
51
|
Nach Ausführung der Robotframework Test Suites können die Ergebnisse zurück in den Json Report der Tesbench geschrieben werden.
|
|
59
52
|
Zu diesem Zweck wird der Subcommand ``read`` verwendet, der eine XML-Ergebnisdatei liest und die Ergebnisse in die JSON-Dateien schreibt.
|
|
60
53
|
|
|
61
|
-
|
|
54
|
+
- Den Pfad zu einer Robot Framework XML-Ergebnisdatei, aus der die Ergebnisse der Testdurchführung gelesen werden.
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
- Den Pfad zu einem Verzeichnis oder einer ZIP Datei in der die Ergebnisse gespeichert werden sollen. Dies ist ein optionaler Parameter. Wird der Parameter nicht übergeben, so wird der übergebene JSON Report überschrieben.
|
|
64
57
|
|
|
65
|
-
|
|
58
|
+
- Den Pfad zu den TestBech JSON Report Dateien (ohne Ergebnisse). Diese können in einem Verzeichnis oder in einer ZIP Datei liegen.
|
|
66
59
|
|
|
67
60
|
Der folgende Aufruf demonstriert das Lesen der Ergebnisse anhand eines Beispiels:
|
|
68
61
|
```powershell
|
|
@@ -297,6 +290,6 @@ Description: # Installation des Robot Code Generators
|
|
|
297
290
|
|
|
298
291
|
|
|
299
292
|
Platform: any
|
|
300
|
-
Requires-Python: >=
|
|
293
|
+
Requires-Python: >=3.8
|
|
301
294
|
Description-Content-Type: text/markdown
|
|
302
295
|
Provides-Extra: dev
|
|
@@ -6,14 +6,7 @@ Voraussetzung für die Installation der Software ist eine vorhandene Python Inst
|
|
|
6
6
|
python --version
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
Die Installation des Code Generators erfolgt
|
|
10
|
-
Dieses kann durch Ausführung des folgenden Kommandozeilenbefehls installiert werden, wobei ``testbench2robotframework-0.4.1-py3-none-any.whl`` für den Pfad zu der heruntergeladenen whl-Datei steht:
|
|
11
|
-
|
|
12
|
-
```powershell
|
|
13
|
-
python -m pip install testbench2robotframework-0.4.1-py3-none-any.whl
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Alternativ kann die Installation direkt online aus dem Python Package Index installiert werden.
|
|
9
|
+
Die Installation des Code Generators erfolgt aus dem Python Package Index.
|
|
17
10
|
```powershell
|
|
18
11
|
pip install testbench2robotframework
|
|
19
12
|
```
|
|
@@ -32,9 +25,9 @@ Der Befehl ``tb2robot --help
|
|
|
32
25
|
|
|
33
26
|
Zum Generieren von Robot Framework Testsuites wird der Subcommand ``write`` mit zwei Parametern aufgerufen:
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
- Dem Pfad zu einer JSON Datei, die als Konfigurationsdatei für die Ausgabe des Generators dient. Wird diese beim Aufruf des Code Generators nicht übergeben, so wird automatisch eine Konfigurationsdatei mit dem Namen ``config.json`` generiert.
|
|
36
29
|
|
|
37
|
-
|
|
30
|
+
- Dem Pfad zu den TestBech JSON Report Dateien. Diese können in einem Verzeichnis oder in einer ZIP Datei liegen.
|
|
38
31
|
|
|
39
32
|
Der folgende Aufruf demonstriert die Verwendung anhand eines Beispiels:
|
|
40
33
|
```powershell
|
|
@@ -50,11 +43,11 @@ Beispiel für die Generierung von Robot Framework Testsuites aus dem Testthemenb
|
|
|
50
43
|
Nach Ausführung der Robotframework Test Suites können die Ergebnisse zurück in den Json Report der Tesbench geschrieben werden.
|
|
51
44
|
Zu diesem Zweck wird der Subcommand ``read`` verwendet, der eine XML-Ergebnisdatei liest und die Ergebnisse in die JSON-Dateien schreibt.
|
|
52
45
|
|
|
53
|
-
|
|
46
|
+
- Den Pfad zu einer Robot Framework XML-Ergebnisdatei, aus der die Ergebnisse der Testdurchführung gelesen werden.
|
|
54
47
|
|
|
55
|
-
|
|
48
|
+
- Den Pfad zu einem Verzeichnis oder einer ZIP Datei in der die Ergebnisse gespeichert werden sollen. Dies ist ein optionaler Parameter. Wird der Parameter nicht übergeben, so wird der übergebene JSON Report überschrieben.
|
|
56
49
|
|
|
57
|
-
|
|
50
|
+
- Den Pfad zu den TestBech JSON Report Dateien (ohne Ergebnisse). Diese können in einem Verzeichnis oder in einer ZIP Datei liegen.
|
|
58
51
|
|
|
59
52
|
Der folgende Aufruf demonstriert das Lesen der Ergebnisse anhand eines Beispiels:
|
|
60
53
|
```powershell
|
|
@@ -24,6 +24,12 @@ click==8.1.4
|
|
|
24
24
|
# via
|
|
25
25
|
# black
|
|
26
26
|
# pip-tools
|
|
27
|
+
colorama==0.4.6
|
|
28
|
+
# via
|
|
29
|
+
# build
|
|
30
|
+
# click
|
|
31
|
+
# pylint
|
|
32
|
+
# pytest
|
|
27
33
|
coverage[toml]==7.2.7
|
|
28
34
|
# via pytest-cov
|
|
29
35
|
dill==0.3.6
|
|
@@ -105,6 +111,8 @@ pytest-cov==4.1.0
|
|
|
105
111
|
# via testbench2robotframework (setup.cfg)
|
|
106
112
|
pytest-spec==3.2.0
|
|
107
113
|
# via testbench2robotframework (setup.cfg)
|
|
114
|
+
pywin32-ctypes==0.2.2
|
|
115
|
+
# via keyring
|
|
108
116
|
readme-renderer==40.0
|
|
109
117
|
# via twine
|
|
110
118
|
requests==2.31.0
|
|
@@ -444,11 +444,14 @@ class ResultWriter(ResultVisitor):
|
|
|
444
444
|
|
|
445
445
|
@staticmethod
|
|
446
446
|
def get_isotime_from_robot_timestamp(timestamp, time_format="%Y-%m-%d %H:%M:%S.%f"):
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
447
|
+
try:
|
|
448
|
+
return timestamp.astimezone().strftime(time_format)[:-3]
|
|
449
|
+
except AttributeError:
|
|
450
|
+
return (
|
|
451
|
+
datetime.strptime(timestamp, "%Y%m%d %H:%M:%S.%f")
|
|
452
|
+
.astimezone()
|
|
453
|
+
.strftime(time_format)[:-3]
|
|
454
|
+
)
|
|
452
455
|
|
|
453
456
|
def _set_compound_interaction_execution_result(self, compound_interaction: InteractionDetails):
|
|
454
457
|
atomic_interactions = list(
|
|
@@ -19,7 +19,6 @@ from robot.parsing.model.blocks import (
|
|
|
19
19
|
from robot.parsing.model.statements import (
|
|
20
20
|
Comment,
|
|
21
21
|
EmptyLine,
|
|
22
|
-
ForceTags,
|
|
23
22
|
KeywordCall,
|
|
24
23
|
LibraryImport,
|
|
25
24
|
Metadata,
|
|
@@ -33,6 +32,11 @@ from robot.parsing.model.statements import (
|
|
|
33
32
|
VariablesImport,
|
|
34
33
|
)
|
|
35
34
|
|
|
35
|
+
try:
|
|
36
|
+
from robot.parsing.model.statements import TestTags
|
|
37
|
+
except ImportError:
|
|
38
|
+
from robot.parsing.model.statements import ForceTags as TestTags
|
|
39
|
+
|
|
36
40
|
from .config import Configuration
|
|
37
41
|
from .json_reader import TestCaseSet
|
|
38
42
|
from .log import logger
|
|
@@ -356,7 +360,7 @@ class RfTestCase:
|
|
|
356
360
|
pure_name = re.sub(r'(^-\ ?|=$)', "", name)
|
|
357
361
|
parameters.append(f"{pure_name}={escaped_value}")
|
|
358
362
|
previous_arg_forces_named = True
|
|
359
|
-
elif value.find("=") != -1 and value[:value.find("=")] in interaction.cbv_parameters
|
|
363
|
+
elif value.find("=") != -1 and value[: value.find("=")] in interaction.cbv_parameters:
|
|
360
364
|
escaped_value = RfTestCase.escape_argument_value(value)
|
|
361
365
|
parameters.append(escaped_value)
|
|
362
366
|
else:
|
|
@@ -374,7 +378,9 @@ class RfTestCase:
|
|
|
374
378
|
|
|
375
379
|
@staticmethod
|
|
376
380
|
def _create_cbr_parameters(interaction: AtomicInteractionCall) -> list[str]:
|
|
377
|
-
cbr_parameters = list(
|
|
381
|
+
cbr_parameters = list(
|
|
382
|
+
filter(lambda parameter: parameter != "", interaction.cbr_parameters.values())
|
|
383
|
+
)
|
|
378
384
|
for index, parameter in enumerate(cbr_parameters):
|
|
379
385
|
if not parameter.startswith('${'):
|
|
380
386
|
cbr_parameters[index] = f"${{{parameter}}}"
|
|
@@ -645,12 +651,12 @@ class RobotSuiteFileBuilder:
|
|
|
645
651
|
}
|
|
646
652
|
return [LibraryImport.from_params(lib) for lib in sorted(lib_imports)]
|
|
647
653
|
|
|
648
|
-
def
|
|
654
|
+
def _create_rf_test_tags(self) -> Union[TestTags, None]:
|
|
649
655
|
tb_keyword_names = [keyword.name for keyword in self.test_case_set.details.spec.keywords]
|
|
650
656
|
udfs = [udf.robot_tag for udf in self.test_case_set.details.spec.udfs if udf.robot_tag]
|
|
651
|
-
|
|
652
|
-
if
|
|
653
|
-
return
|
|
657
|
+
test_tags = tb_keyword_names + udfs
|
|
658
|
+
if test_tags:
|
|
659
|
+
return TestTags.from_params(test_tags)
|
|
654
660
|
return None
|
|
655
661
|
|
|
656
662
|
def _create_rf_unknown_imports(self, import_dict: dict[str, set[str]]) -> list[Comment]:
|
|
@@ -691,6 +697,6 @@ class RobotSuiteFileBuilder:
|
|
|
691
697
|
for metadata_name, metadata_value in setting_section_meta_data.items()
|
|
692
698
|
]
|
|
693
699
|
)
|
|
694
|
-
setting_section.body.append(self.
|
|
700
|
+
setting_section.body.append(self._create_rf_test_tags())
|
|
695
701
|
setting_section.body.extend(SECTION_SEPARATOR)
|
|
696
702
|
return setting_section
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: testbench2robotframework
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Robot Framework Code Generator from Keyword-Driven Tests in imbus TestBench 3.0 and newer
|
|
5
5
|
Home-page: https://github.com/imbus/testbench2robotframework
|
|
6
6
|
Author: imbus AG
|
|
@@ -14,14 +14,7 @@ Description: # Installation des Robot Code Generators
|
|
|
14
14
|
python --version
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
Die Installation des Code Generators erfolgt
|
|
18
|
-
Dieses kann durch Ausführung des folgenden Kommandozeilenbefehls installiert werden, wobei ``testbench2robotframework-0.4.1-py3-none-any.whl`` für den Pfad zu der heruntergeladenen whl-Datei steht:
|
|
19
|
-
|
|
20
|
-
```powershell
|
|
21
|
-
python -m pip install testbench2robotframework-0.4.1-py3-none-any.whl
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Alternativ kann die Installation direkt online aus dem Python Package Index installiert werden.
|
|
17
|
+
Die Installation des Code Generators erfolgt aus dem Python Package Index.
|
|
25
18
|
```powershell
|
|
26
19
|
pip install testbench2robotframework
|
|
27
20
|
```
|
|
@@ -40,9 +33,9 @@ Description: # Installation des Robot Code Generators
|
|
|
40
33
|
|
|
41
34
|
Zum Generieren von Robot Framework Testsuites wird der Subcommand ``write`` mit zwei Parametern aufgerufen:
|
|
42
35
|
|
|
43
|
-
|
|
36
|
+
- Dem Pfad zu einer JSON Datei, die als Konfigurationsdatei für die Ausgabe des Generators dient. Wird diese beim Aufruf des Code Generators nicht übergeben, so wird automatisch eine Konfigurationsdatei mit dem Namen ``config.json`` generiert.
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
- Dem Pfad zu den TestBech JSON Report Dateien. Diese können in einem Verzeichnis oder in einer ZIP Datei liegen.
|
|
46
39
|
|
|
47
40
|
Der folgende Aufruf demonstriert die Verwendung anhand eines Beispiels:
|
|
48
41
|
```powershell
|
|
@@ -58,11 +51,11 @@ Description: # Installation des Robot Code Generators
|
|
|
58
51
|
Nach Ausführung der Robotframework Test Suites können die Ergebnisse zurück in den Json Report der Tesbench geschrieben werden.
|
|
59
52
|
Zu diesem Zweck wird der Subcommand ``read`` verwendet, der eine XML-Ergebnisdatei liest und die Ergebnisse in die JSON-Dateien schreibt.
|
|
60
53
|
|
|
61
|
-
|
|
54
|
+
- Den Pfad zu einer Robot Framework XML-Ergebnisdatei, aus der die Ergebnisse der Testdurchführung gelesen werden.
|
|
62
55
|
|
|
63
|
-
|
|
56
|
+
- Den Pfad zu einem Verzeichnis oder einer ZIP Datei in der die Ergebnisse gespeichert werden sollen. Dies ist ein optionaler Parameter. Wird der Parameter nicht übergeben, so wird der übergebene JSON Report überschrieben.
|
|
64
57
|
|
|
65
|
-
|
|
58
|
+
- Den Pfad zu den TestBech JSON Report Dateien (ohne Ergebnisse). Diese können in einem Verzeichnis oder in einer ZIP Datei liegen.
|
|
66
59
|
|
|
67
60
|
Der folgende Aufruf demonstriert das Lesen der Ergebnisse anhand eines Beispiels:
|
|
68
61
|
```powershell
|
|
@@ -297,6 +290,6 @@ Description: # Installation des Robot Code Generators
|
|
|
297
290
|
|
|
298
291
|
|
|
299
292
|
Platform: any
|
|
300
|
-
Requires-Python: >=
|
|
293
|
+
Requires-Python: >=3.8
|
|
301
294
|
Description-Content-Type: text/markdown
|
|
302
295
|
Provides-Extra: dev
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
## Development Environment Setup
|
|
4
|
-
|
|
5
|
-
1. Install Python 3.8 and VS Code
|
|
6
|
-
|
|
7
|
-
2. Open a terminal in this repository
|
|
8
|
-
|
|
9
|
-
3. Create the virtual environment .venv
|
|
10
|
-
|
|
11
|
-
> /path/to/python38/python -m venv .venv
|
|
12
|
-
|
|
13
|
-
4. Activate the virtual environment
|
|
14
|
-
|
|
15
|
-
> .venv/scripts/activate
|
|
16
|
-
|
|
17
|
-
4. Install the dependencies
|
|
18
|
-
|
|
19
|
-
> pip install -r requirements.txt
|
|
20
|
-
|
|
21
|
-
5. [Install Pandoc](https://pandoc.org/installing.html)
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
## Generate documentation in Word format
|
|
25
|
-
|
|
26
|
-
```shell
|
|
27
|
-
pandoc -s README.md -M title="imbus TestBench - Robot Code Generator" -M subtitle=Benutzerhandbuch -M toc-title=Inhaltsverzeichnis --toc -o Benutzerhandbuch.docx
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
## Build, Install and Run
|
|
32
|
-
|
|
33
|
-
The package is built using setuptools. The build configuration is defined in `setup.cfg`.
|
|
34
|
-
|
|
35
|
-
- Build and install the package
|
|
36
|
-
> pip install -e .
|
|
37
|
-
|
|
38
|
-
- Run the application
|
|
39
|
-
> tb2robot
|
|
40
|
-
|
|
41
|
-
- Build a pure-Python wheel
|
|
42
|
-
> pip install wheel
|
|
43
|
-
> python setup.py bdist_wheel
|
|
44
|
-
|
|
45
|
-
- Build a pure-Python wheel and publish new version to pypi
|
|
46
|
-
> pip install wheel
|
|
47
|
-
> pip install twine
|
|
48
|
-
> CreatePipWheel.bat oder CreatePipWheel.sh
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Adding New Dependencies
|
|
52
|
-
1. Install pip-tools (to pin dependencies)
|
|
53
|
-
|
|
54
|
-
> python -m pip install pip-tools
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
2. In `setup.cfg` add a package to the corresponding section
|
|
58
|
-
|
|
59
|
-
- Development dependencies: `dev` extra under `options.extras_require`
|
|
60
|
-
|
|
61
|
-
- Runtime dependencies: `install-requires`
|
|
62
|
-
|
|
63
|
-
3. Update `requirements.txt`
|
|
64
|
-
- Development dependencies
|
|
65
|
-
> pip-compile --extra dev setup.cfg
|
|
66
|
-
|
|
67
|
-
- Runtime dependencies
|
|
68
|
-
> pip-compile setup.cfg
|
|
69
|
-
|
|
70
|
-
4. Create a commit with `setup.cfg`, `requirements.txt`, `pyproject.toml` explaining why the dependency was added.
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
## Static Analysis and Code Formatting
|
|
74
|
-
|
|
75
|
-
Static analysis and code formatting tools are configured in `pyproject.toml`.
|
|
76
|
-
|
|
77
|
-
### Static Analysis
|
|
78
|
-
|
|
79
|
-
- `mypy`: static type checker
|
|
80
|
-
* [The mypy configuration file](https://mypy.readthedocs.io/en/stable/config_file.html)
|
|
81
|
-
|
|
82
|
-
- `pylint`: syntax and code quality checks
|
|
83
|
-
|
|
84
|
-
* [Pylint Global options and switches](https://pylint.pycqa.org/en/latest/technical_reference/features.html)
|
|
85
|
-
|
|
86
|
-
* [Overview of all Pylint messages](https://pylint.pycqa.org/en/latest/messages/messages_list.html)
|
|
87
|
-
|
|
88
|
-
* [Naming Styles](https://pylint.pycqa.org/en/latest/user_guide/options.html)
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
### Code Formatting
|
|
92
|
-
|
|
93
|
-
- `black`: Format the code according to a subset of PEP 8
|
|
94
|
-
> black .
|
|
95
|
-
|
|
96
|
-
- `isort`: Sort the package imports following PEP 8
|
|
97
|
-
> isort .
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
## Testing
|
|
101
|
-
|
|
102
|
-
- `pytest` is configured in `pyproject.toml`
|
|
103
|
-
> python -m pytest
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/LibrarySubdivision.PNG
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/images/rfLibraryRootsTestBench.PNG
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/log.py
RENAMED
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/testbench2robotframework/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_missing_files.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{testbench2robotframework-0.6.1 → testbench2robotframework-0.7.0}/tests/test_zip_file_generation.py
RENAMED
|
File without changes
|