def test_multiple_iterator_add_root_result(stc, resource_cleanup): RI.create_test() RI.start_test() framesizelist = [64] loadlist = [10] fs_itr_id = 1 fs_iterator_handle = 12123 load_handle = 5555 for fs in framesizelist: RI.set_iterator_current_value(fs_iterator_handle, 'FrameSize', fs, fs_itr_id) load_id = 1 for load in loadlist: RI.set_iterator_current_value(load_handle, 'Load', load, load_id) RI.add_provider_result(test_utils.dummy_verify_result_failed) RI.add_provider_result(test_utils.dummy_verify_result_passed) # add to root RI.add_provider_result_to_root(test_utils.dummy_verify_result_passed) load_id += 1 RI.complete_iteration() RI.end_iterator() # frame size fs_itr_id += 1 RI.complete_iteration() RI.end_iterator() RI.end_test() RI.stop_test() file_data = vu.get_report_file_list() vu.validate_result_file_list(file_data['fileList'], test_utils.result_file_list_3) vu.validate_result_file_Schema(file_data) sum_data = vu.verify_summary_file_info() assert ru.compare_dict_data_using_json_string(test_utils.status_pass_2, sum_data[pc.STATUS]) is True # 2 root results, iterator and added root result root_list = sum_data[pc.DATA][rc.CHILDREN] assert len(root_list) == 2 result_data = ru.get_data_from_dictionary(root_list, '0.data.children.0') fz_data = ru.get_data_from_dictionary(root_list, '1.data.children.0') assert fz_data[pc.INFO]['param'] == 'FrameSize' # verify result data expected_string = ru.get_json_string(test_utils.dummy_verify_result_passed) assert ru.compare_dict_data_using_json_string(expected_string, result_data) is True
def submit_provider_data_to_root(data): ResultInterface.add_provider_result_to_root(data)