Skip to content

Commit 660a50c

Browse files
committed
Release 3.0.0
Signed-off-by: René <snooz@posteo.de>
1 parent 88b7e02 commit 660a50c

File tree

2 files changed

+9
-272
lines changed

2 files changed

+9
-272
lines changed

README.md

Lines changed: 8 additions & 271 deletions
Original file line numberDiff line numberDiff line change
@@ -3,279 +3,16 @@ testbench-cli-reporter is a cli tool to export XML reports from an TestBench ins
33

44
This can be used for automated test execution with e.g. RobotFramework, triggered by a CI/CD pipeline.
55

6-
## Supported Actions
7-
- __Export XML Report__ from TestBench project
8-
- __Import test execution results__ into TestBench project
9-
- __Export actions__: Create a JSON file which can be used in automatic mode to repeat your previous actions automatically
10-
- __Change connection__: Change TestBench server and/or user
6+
## [Documentation](https://imbus.github.io/testbench-ecosystem-documentation/testbench-cli-reporter/intro)
117

12-
## Installation
8+
The documentation is available online at [imbus.github.io](https://imbus.github.io/testbench-ecosystem-documentation/testbench-cli-reporter/intro).
139

14-
Python 3.6 is required!
10+
Alternatively, the documentation is also available in the `docs` folder of this repository.
1511

16-
`pip install testbench-cli-reporter`
12+
## Releases
1713

18-
## Manual mode
19-
Just execute in command line
20-
`testbench-cli-reporter` or `TestBenchCliReporter`
14+
Releases are published on GitHub and available via PyPI.
2115

22-
### **Connect to TestBench instance**
23-
24-
1. Enter TestBench Server
25-
```
26-
PS C:\Users\falka> testbench-cli-reporter
27-
No config file given
28-
Starting manual mode
29-
? Enter the TestBench server address and port <host:port>:
30-
```
31-
32-
In here enter the testbench server you want to interact with.
33-
If you don't enter a port, the default TestBench 3.x port 9443 is used.
34-
35-
If you don't know the server adress of your testbench instance you can find it inside your iTBClient intallation folder: bin/application.conf
36-
37-
2. Enter Credential
38-
39-
Next Step is providing login data the testbench-cli-reporter should use to connect with the TestBench.
40-
41-
Make sure the user has rights to access the test project you want to work with.
42-
43-
```
44-
? Enter your login name: testbench-user
45-
? Enter your password: ****************
46-
```
47-
48-
### **Select Action**
49-
50-
```
51-
? What do you want to do? (Use arrow keys)
52-
» Export XML Report
53-
Import execution results
54-
Write history to config file
55-
Change connection
56-
Quit
57-
```
58-
59-
You can select the action you want to do using the arrow keys.
60-
61-
### **Export XML Report**
62-
Export an XML Report for test execution from the TestBench.
63-
64-
1. Select a test project, test object version and test cycle you want.
65-
66-
```
67-
? What do you want to do? Export XML Report
68-
? Select a project. TestBench Demo Agil
69-
? Select a test object version. Version 3.0
70-
? Select a test cycle. 3.0.1
71-
Selection:
72-
TestBench Demo Agil projectKey: 7917307
73-
Version 3.0 tovKey: 8678256
74-
3.0.1 cycleKey: 8684351
75-
```
76-
77-
**hint:** You can later use projectKey, tovKey and cycleKey in the config.json file to access the data without needing to know the name of the respective element. Elements names can change inside TestBench, Keys will remain the same. This approach can reduce maintenance effort and will increase robustness.
78-
79-
2. select test theme to be used as root of report
80-
..you can also go back if you accidently selected a wrong test theme
81-
```
82-
? Please select an element to be used as the root of the report. TT: 1 TestBench
83-
? Please select an element to be used as the root of the report. (Use arrow keys)
84-
» <SELECT> 1 TestBench [iTB-TT-299]
85-
TT: 1.1 Beispiele
86-
TT: 1.2 Regression
87-
TT: 1.3 Sprints V1.0
88-
TT: 1.4 Sprints V2.0
89-
<BACK>
90-
```
91-
3. activate filters
92-
```
93-
? Activate Filters: (Use arrow keys)
94-
No
95-
» Yes
96-
97-
? Provide a set of filters. (Use arrow keys to move, <space> to select, <a> to toggle, <i> to invert)
98-
» ○ automatisiert bdf
99-
○ automatisiert keyword
100-
○ Mir zugewiesen
101-
```
102-
103-
4. Select report configuration
104-
```
105-
? Select Report Configuration: (Use arrow keys)
106-
» Itep Export
107-
iTorx Export (execution)
108-
iTorx Export (continue|view)
109-
<CUSTOM>
110-
```
111-
Itep Export, iTorx Export (execution) and iTorx Export(continue|view) are pre-configured exports.
112-
With Custom you can configure the report by yourself.
113-
114-
In each case you must provide the path the export should be saved in.
115-
116-
TODO: add explanations of each option
117-
118-
Custom configuration possibilities
119-
120-
- exportAttachments (True | False)
121-
: definition
122-
123-
- exportDesignData (True | False)
124-
: definition
125-
126-
- characterEncoding (UTF-16 | UTF-8)
127-
: definition
128-
129-
- suppressFilteredData (True | False)
130-
: definition
131-
132-
- exportExpandedData (True | False)
133-
: definition
134-
135-
- exportDescriptionFields (True | False)
136-
: definition
137-
138-
- exportExecutionProtocols (True | False)
139-
: definition
140-
141-
142-
143-
### **Import execution results**
144-
Import test results into the TestBench.
145-
146-
```
147-
? Provide the input path [report.zip]:
148-
```
149-
150-
### **Write history to config file**
151-
Writes a config.json file containing the inputs given in the current session using the testbench-cli-reporter.
152-
153-
This config file can later be used to execute the testbench-cli-reporter in automatic mode.
154-
155-
If you didn't export nor import anything in the current session yet, at least the connection properties are written.
156-
157-
```json
158-
{
159-
"configuration": [
160-
{
161-
"server_url": "https://localhost:443/api/",
162-
"verify": false,
163-
"basicAuth": "XXXXXXXXXXXX=",
164-
"actions": []
165-
},
166-
]
167-
}
168-
```
169-
170-
### Change connection
171-
Connect to a different TestBench instance so you do not have to exit the testbench-cli-reporter completely.
172-
173-
```
174-
? What do you want to do? Change connection
175-
? Enter the TestBench server address and port <host:port>:
176-
? Enter your login name: testbench-user
177-
? Enter your password: ****************
178-
```
179-
180-
### Quit
181-
Exits the testbench-cli-reporter
182-
183-
----------
184-
## Automatic mode
185-
Run in automatic mode:
186-
`
187-
testbench-cli-reporter --config /path/to/config/file.json
188-
`
189-
190-
## Config file structure
191-
The attribute `projectPath` is not mandatory though. Only using projectKey, tovKey, cycleKey is also more error prone, as they will not change within TestBench.
192-
```json
193-
{
194-
"configuration": [
195-
{
196-
"server_url": "https://localhost:443/api/",
197-
"verify": false,
198-
"basicAuth": "XXXXXXXXXXXXX=",
199-
"actions": [
200-
{
201-
"type": "ExportXMLReport",
202-
"parameters": {
203-
"tovKey": "8689447",
204-
"projectPath": [
205-
"TestBench Demo Agil",
206-
"Version 3.0",
207-
"3.0.1"
208-
],
209-
"cycleKey": "8689450",
210-
"reportRootUID": "itb-TT-8161",
211-
"filters": [],
212-
"report_config": {
213-
"exportAttachments": true,
214-
"exportDesignData": true,
215-
"characterEncoding": "utf-16",
216-
"suppressFilteredData": true,
217-
"exportExpandedData": true,
218-
"exportDescriptionFields": true,
219-
"outputFormattedText": false,
220-
"exportExecutionProtocols": false,
221-
"reportRootUID": "itb-TT-8161"
222-
},
223-
"outputPath": "report.zip"
224-
}
225-
},
226-
{
227-
"type": "ImportXMLExecutionResults",
228-
"parameters": {
229-
"inputPath": "report.zip",
230-
"cycleKey": "8689450",
231-
"reportRootUID": "ROOT",
232-
"defaultTester": false,
233-
"filters": [],
234-
"importConfig": {
235-
"ignoreNonExecutedTestCases": true,
236-
"checkPaths": true,
237-
"discardTesterInformation": true,
238-
"useExistingDefect": true,
239-
"filters": []
240-
}
241-
}
242-
}
243-
]
244-
}
245-
]
246-
}
247-
```
248-
----------
249-
250-
## Optional arguments
251-
TODO
252-
253-
254-
You can access a list of optional arguments using `testbench-cli-reporter --help`
255-
256-
```
257-
usage: testbench-cli-reporter [-h] [-c CONFIG] [-s SERVER] [--login LOGIN] [--password PASSWORD] [-p PROJECT]
258-
[-v VERSION] [-y CYCLE] [-u UID] [-t {e,i}]
259-
[path]
260-
261-
positional arguments:
262-
path Input- and Output-Path for xml reports <OPTIONAL, Default = report.zip>.
263-
264-
optional arguments:
265-
-h, --help show this help message and exit
266-
-c CONFIG, --config CONFIG
267-
Path to a config json file to execute pre-set actions based on the given configuration.
268-
-s SERVER, --server SERVER
269-
TestBench Server address (hostname:port).
270-
--login LOGIN Users Login.
271-
--password PASSWORD Users Password.
272-
-p PROJECT, --project PROJECT
273-
Project name to be exported <OPTIONAL if --type is 'i'>.
274-
-v VERSION, --version VERSION
275-
Test Object Version name to be exported <OPTIONAL if --type is 'i'>.
276-
-y CYCLE, --cycle CYCLE
277-
Test Cycle name to be exported <OPTIONAL>
278-
-u UID, --uid UID Root UID to be exported <OPTIONAL, Default = ROOT>
279-
-t {e,i}, --type {e,i}
280-
'e' for Export <default>, 'i' for Import
281-
```
16+
Binary releases include a bundled Python runtime, so you can run the CLI without installing Python separately.
17+
They are available here:
18+
https://github.com/imbus/testbench-cli-reporter/releases

src/testbench_cli_reporter/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
__version__ = "3.0.0rc4"
15+
__version__ = "3.0.0"
1616

1717
from .config_model import (
1818
BaseAction,

0 commit comments

Comments
 (0)