Exemplo n.º 1
0
def archive_results(config: dict, results_dir: Path):
    validate_config(config)
    for run in config['runs']:
        results_folder_path = Path(run["fullPath"])
        destination_name = f"{config['profile']}_run_{clean_str(run['runName'])}_{results_folder_path.name}"
        destination_path = results_dir / destination_name
        archive_path = __zip_folder(results_folder_path, destination_path)
        print(f'Folder {results_folder_path} is zipped to {archive_path}')
Exemplo n.º 2
0
def aggregate(config: dict, results_dir: Path) -> (Path, str):
    validate_config(config)
    output_file_path = __get_output_file_path(config, results_dir)
    summary_files = __get_summary_files(config)
    run_names = __get_run_names(config)
    status_message = 'OK' if __get_overall_status(summary_files) else "FAIL"
    __write_to_summary_report(summary_files, run_names, status_message, output_file_path)
    validate_file_exists(output_file_path, f"Results file {output_file_path} is not created")
    print(f'Results file {output_file_path.absolute()} is created')
    return output_file_path, status_message
Exemplo n.º 3
0
def aggregate(config: dict, results_dir: Path) -> Path:
    validate_config(config)
    tests_results = __get_tests_results(config)
    __validate_count_of_actions(tests_results)
    output_file_path = __get_output_file_path(config, results_dir)
    header = __create_header(config)
    __write_list_to_csv(header, tests_results, output_file_path, config)

    validate_file_exists(output_file_path,
                         f"Result file {output_file_path} is not created")
    print(f'Results file {output_file_path.absolute()} is created')
    return output_file_path