{"id":22358888,"url":"https://github.com/imbus/testbench-cli-reporter","last_synced_at":"2025-07-30T12:32:12.595Z","repository":{"id":47160637,"uuid":"377836913","full_name":"imbus/testbench-cli-reporter","owner":"imbus","description":"A cli tool to export XML reports from a TestBench instance and import test results back into it.","archived":false,"fork":false,"pushed_at":"2024-10-17T20:42:37.000Z","size":191,"stargazers_count":3,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-11-19T00:48:48.394Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imbus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-17T13:17:39.000Z","updated_at":"2023-02-16T06:40:35.000Z","dependencies_parsed_at":"2024-10-20T02:50:06.581Z","dependency_job_id":null,"html_url":"https://github.com/imbus/testbench-cli-reporter","commit_stats":{"total_commits":54,"total_committers":7,"mean_commits":7.714285714285714,"dds":0.4444444444444444,"last_synced_commit":"9eb14e6feb311498aa886c469be7a5bcaf4ffcf4"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbus%2Ftestbench-cli-reporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbus%2Ftestbench-cli-reporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbus%2Ftestbench-cli-reporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imbus%2Ftestbench-cli-reporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imbus","download_url":"https://codeload.github.com/imbus/testbench-cli-reporter/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228133609,"owners_count":17874511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-04T15:18:14.022Z","updated_at":"2024-12-04T15:18:14.855Z","avatar_url":"https://github.com/imbus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# testbench-cli-reporter\ntestbench-cli-reporter is a cli tool to export XML reports from an TestBench instance and import test results back into it.\n\nThis can be used for automated test execution with e.g. RobotFramework, triggered by a CI/CD pipeline.\n\n## Supported Actions\n- __Export XML Report__ from TestBench project\n- __Import test execution results__ into TestBench project\n- __Export actions__: Create a JSON file which can be used in automatic mode to repeat your previous actions automatically\n- __Change connection__: Change TestBench server and/or user\n\n## Installation\n\nPython 3.6 is required!\n\n`pip install testbench-cli-reporter`\n\n## Manual mode\nJust execute in command line \n`testbench-cli-reporter` or `TestBenchCliReporter`\n\n### **Connect to TestBench instance**\n\n1. Enter TestBench Server\n```\nPS C:\\Users\\falka\u003e testbench-cli-reporter\nNo config file given\nStarting manual mode\n? Enter the TestBench server address and port \u003chost:port\u003e:\n```\n\nIn here enter the testbench server you want to interact with. \nIf you don't enter a port, the default TestBench port 9443 is used.\n\nIf you don't know the server adress of your testbench instance you can find it inside your iTBClient intallation folder: bin/application.conf\n\n2. Enter Credential\n\nNext Step is providing login data the testbench-cli-reporter should use to connect with the TestBench. \n\nMake sure the user has rights to access the test project you want to work with.\n\n```\n? Enter your login name: testbench-user\n? Enter your password: ****************\n```\n\n### **Select Action**\n\n```\n? What do you want to do? (Use arrow keys)\n» Export XML Report\n  Import execution results\n  Write history to config file\n  Change connection\n  Quit\n```\n\nYou can select the action you want to do using the arrow keys.\n\n### **Export XML Report**\nExport an XML Report for test execution from the TestBench.\n\n1. Select a test project, test object version and test cycle you want.\n\n```\n? What do you want to do? Export XML Report\n? Select a project. TestBench Demo Agil\n? Select a test object version. Version 3.0\n? Select a test cycle. 3.0.1\n  Selection:\n    TestBench Demo Agil                             projectKey:         7917307\n      Version 3.0                                   tovKey:             8678256\n        3.0.1                                       cycleKey:           8684351\n```\n\n**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.\n\n2. select test theme to be used as root of report\n..you can also go back if you accidently selected a wrong test theme\n```\n? Please select an element to be used as the root of the report. TT: 1 TestBench\n? Please select an element to be used as the root of the report. (Use arrow keys)\n » \u003cSELECT\u003e 1 TestBench [iTB-TT-299]\n   TT: 1.1 Beispiele\n   TT: 1.2 Regression\n   TT: 1.3 Sprints V1.0\n   TT: 1.4 Sprints V2.0\n   \u003cBACK\u003e\n```\n3. activate filters\n```\n? Activate Filters: (Use arrow keys)\n   No\n » Yes\n\n ? Provide a set of filters. (Use arrow keys to move, \u003cspace\u003e to select, \u003ca\u003e to toggle, \u003ci\u003e to invert)\n » ○ automatisiert bdf\n   ○ automatisiert keyword\n   ○ Mir zugewiesen\n```\n\n4. Select report configuration\n```\n? Select Report Configuration: (Use arrow keys)\n » Itep Export\n   iTorx Export (execution)\n   iTorx Export (continue|view)\n   \u003cCUSTOM\u003e\n```\nItep Export, iTorx Export (execution) and iTorx Export(continue|view) are pre-configured exports.\nWith Custom you can configure the report by yourself.\n\nIn each case you must provide the path the export should be saved in.\n\nTODO: add explanations of each option\n\nCustom configuration possibilities\n\n- exportAttachments (True | False)\n: definition\n\n- exportDesignData (True | False)\n: definition\n\n- characterEncoding (UTF-16 | UTF-8)\n: definition\n\n- suppressFilteredData (True | False)\n: definition\n\n- exportExpandedData (True | False)\n: definition\n\n- exportDescriptionFields (True | False)\n: definition\n\n- exportExecutionProtocols (True | False)\n: definition\n\n\n\n### **Import execution results**\nImport test results into the TestBench.\n\n```\n? Provide the input path [report.zip]:\n```\n\n### **Write history to config file**\nWrites a config.json file containing the inputs given in the current session using the testbench-cli-reporter.\n\nThis config file can later be used to execute the testbench-cli-reporter in automatic mode.\n\nIf you didn't export nor import anything in the current session yet, at least the connection properties are written.\n\n```json\n{\n  \"configuration\": [\n    {\n      \"server_url\": \"https://localhost:9443/api/1/\",\n      \"verify\": false,\n      \"basicAuth\": \"XXXXXXXXXXXX=\",\n      \"actions\": []\n    },\n  ]\n}\n```\n\n### Change connection\nConnect to a different TestBench instance so you do not have to exit the testbench-cli-reporter completely.\n\n```\n? What do you want to do? Change connection\n? Enter the TestBench server address and port \u003chost:port\u003e:\n? Enter your login name: testbench-user\n? Enter your password: ****************\n```\n\n### Quit\nExits the testbench-cli-reporter\n\n----------\n## Automatic mode\nRun in automatic mode:\n`\ntestbench-cli-reporter --config /path/to/config/file.json\n`\n\n## Config file structure\nThe attribute `projectPath` is not mandatory though. Only using projectKey, tovKey, cycleKey is also more error prone, as they will not change within TestBench.\n```json\n{\n  \"configuration\": [\n    {\n      \"server_url\": \"https://localhost:9443/api/1/\",\n      \"verify\": false,\n      \"basicAuth\": \"XXXXXXXXXXXXX=\",\n      \"actions\": [\n        {\n          \"type\": \"ExportXMLReport\",\n          \"parameters\": {\n            \"tovKey\": \"8689447\",\n            \"projectPath\": [\n              \"TestBench Demo Agil\",\n              \"Version 3.0\",\n              \"3.0.1\"\n            ],\n            \"cycleKey\": \"8689450\",\n            \"reportRootUID\": \"itb-TT-8161\",\n            \"filters\": [],\n            \"report_config\": {\n              \"exportAttachments\": true,\n              \"exportDesignData\": true,\n              \"characterEncoding\": \"utf-16\",\n              \"suppressFilteredData\": true,\n              \"exportExpandedData\": true,\n              \"exportDescriptionFields\": true,\n              \"outputFormattedText\": false,\n              \"exportExecutionProtocols\": false,\n              \"reportRootUID\": \"itb-TT-8161\"\n            },\n            \"outputPath\": \"report.zip\"\n          }\n        },\n        {\n          \"type\": \"ImportExecutionResults\",\n          \"parameters\": {\n            \"inputPath\": \"report.zip\",\n            \"cycleKey\": \"8689450\",\n            \"reportRootUID\": \"ROOT\",\n            \"defaultTester\": false,\n            \"filters\": [],\n            \"importConfig\": {\n              \"ignoreNonExecutedTestCases\": true,\n              \"checkPaths\": true,\n              \"discardTesterInformation\": true,\n              \"useExistingDefect\": true,\n              \"filters\": []\n            }\n          }\n        }\n      ]\n    }\n  ]\n}\n```\n----------\n\n## Optional arguments\nTODO\n\n\nYou can access a list of optional arguments using `testbench-cli-reporter --help`\n\n```\nusage: testbench-cli-reporter [-h] [-c CONFIG] [-s SERVER] [--login LOGIN] [--password PASSWORD] [-p PROJECT]\n                              [-v VERSION] [-y CYCLE] [-u UID] [-t {e,i}]\n                              [path]\n\npositional arguments:\n  path                  Input- and Output-Path for xml reports \u003cOPTIONAL, Default = report.zip\u003e.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CONFIG, --config CONFIG\n                        Path to a config json file to execute pre-set actions based on the given configuration.\n  -s SERVER, --server SERVER\n                        TestBench Server address (hostname:port).\n  --login LOGIN         Users Login.\n  --password PASSWORD   Users Password.\n  -p PROJECT, --project PROJECT\n                        Project name to be exported \u003cOPTIONAL if --type is 'i'\u003e.\n  -v VERSION, --version VERSION\n                        Test Object Version name to be exported \u003cOPTIONAL if --type is 'i'\u003e.\n  -y CYCLE, --cycle CYCLE\n                        Test Cycle name to be exported \u003cOPTIONAL\u003e\n  -u UID, --uid UID     Root UID to be exported \u003cOPTIONAL, Default = ROOT\u003e\n  -t {e,i}, --type {e,i}\n                        'e' for Export \u003cdefault\u003e, 'i' for Import\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimbus%2Ftestbench-cli-reporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimbus%2Ftestbench-cli-reporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimbus%2Ftestbench-cli-reporter/lists"}