Manual upload of a previously generated report
If you wish to upload a report manually, you can do it by following one of the approaches (depending on format of the report):
1. Generating an Allure report based on a certain single allure-results directory and uploading it to Typhoon Test Hub
In this case, the directory path is the only mandatory parameter which must be defined, as shown:
--allure-results-path={directory_with_allure_results}
Command example (directory_with_allure_results should be replaced with the directory path):
python -m tth-upload --allure-results-path={directory_with_allure_results}
Depending on which python is being used (global or from the environment) manual upload of the report might be executed using one of the following commands:
-
When using Python from the environment:
python -m tth-upload --allure-results-path={directory_with_allure_results}
-
When using global Python:
tth-upload --allure-results-path={directory_with_allure_results}
2. Combining multiple allure-results directories (positioned in one mutual parent directory) into one Allure report and uploading it to Typhoon Test Hub
In this case, two parameters must be defined: the path of the parent directory containing multiple allure-results directories (--allure-results-path), and the command to merge multiple Allure-results (--merge-results):
--allure-results-path={directory_with_multiple_allure_results}
and
--merge-results
Command example (directory_with_multiple_allure_results should be replaced with the directory path):
python -m tth-upload --allure-results-path={directory_with_multiple_allure_results} --merge-results
3. Uploading a previously generated Allure report to Typhoon Test Hub
In this case, the directory path with the previously generated Allure report must be defined, as shown:
--report-path={directory_with_allure_report}
Command example (directory_with_allure_report should be replaced with the directory path):
python -m tth-upload --report-path={directory_with_allure_report}
4. Uploading different type of report
Although Allure report is a first choice of test report, also PDF, HTML and custom reports are supported. In order to upload a report with any of these three types, following options must be defined:
--report-type={report_type}
Value of report type parameter should be one of the following values: allure, pdf, html or custom. Default value is allure. For PDF and custom report, --report-path should be a path to a file. For Allure and HTML report, report-path should be a path to a directory. In case of PDF, HTML and custom report, only --report-path is required and --allure-results-path and --merge-results options are not available.
Command example (report_type should be replaced with the report type value and report_path should be replaced with the report path):
python -m tth-upload --repot-type={report_type} --report-path={report_path}
More optional parameters are --summary-path which allows specifying path to json file with report summary and --test-results-path which allows specifying path to json file with test results. This option can be used when uploading PDF, HTML or custom report.
Notice
-
Either --allure-results-path or --report-path needs to be defined. Both parameters cannot be defined at the same time because it would result in an Exception.
-
The --tth-tags parameter is optional and is explained in the previous section. In cases 1 and 2, the history of Allure reports is generated based on the reports that belong to a previously tagged executions with the same tags.
-
Both python -m tth-upload and tth-upload calls can be used.