GUI acceptance tests using environment deployed from packages.
Build: #2874 failed
Job: automation-examples workflows failed
user downloads audit log of executed workflow and sees that log entries in the downloaded file correspond to those visible in gui[1oz 1op openfaas]: Test case result
The below summarizes the result of the test " user downloads audit log of executed workflow and sees that log entries in the downloaded file correspond to those visible in gui[1oz 1op openfaas]" in build 2,874 of Onedata Products - gui acceptance pkg - automation-examples workflows.
- Description
- user downloads audit log of executed workflow and sees that log entries in the downloaded file correspond to those visible in gui[1oz 1op openfaas]
- Test class
- gui.scenarios.test_automation_examples_workflows_tests
- Method
- test_user_downloads_audit_log_of_executed_workflow_and_sees_that_log_entries_in_the_downloaded_file_correspond_to_those_visible_in_gui[1oz_1op_openfaas]
- Jira Issue
-
- Duration
- 2 mins
- Status
- Failed (New Failure)
Error Log
AssertionError: logs in file: {'timestamp': 1722118262387, 'severity': 'info', 'index': '1', 'content': {'referencedElements': {'tasks': ['46cdb76dd41c5196791f9ebe998d16dbchdd26']}, 'description': '[Lane: 1, Run: 1, PBox: 1, Task: 1] Started.'}} and visible {'index': '0', 'timestamp': 1722118257307, 'severity': 'notice', 'content': {'details': {'scheduledLaneRunSelector': {'laneIndex': 1, 'RunNumber': 1}}, 'description': 'Scheduled execution.'}}are different request = <FixtureRequest for <Function 'test_user_downloads_audit_log_of_executed_workflow_and_sees_that_log_entries_in_the_downloaded_file_correspond_to_those_visible_in_gui[1oz_1op_openfaas]'>> @pytest.mark.usefixtures(*function_args) def scenario_wrapper(request): > _execute_scenario(feature, scenario, request, encoding) /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:227: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:189: in _execute_scenario _execute_step_function(request, scenario, step, step_func) /usr/local/lib/python3.8/dist-packages/pytest_bdd/scenario.py:130: in _execute_step_function step_func(**kwargs) tests/utils/bdd_utils.py:78: in wrapper return fun(*ba.args, **ba.kwargs) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ browser_id = 'browser' tmpdir = local('/tmp/pytest-of-bamboo/pytest-0/test_user_downloads_audit_log_1') modals = <class 'tests.gui.utils.common.modals.Modals'> selenium = {'browser': <selenium.webdriver.chrome.webdriver.WebDriver (session="aa37714311058e97c337832ec083c70d")>} clipboard = Clipboard(copy=<function clipboard.<locals>.copy at 0x7f656106e9d0>, paste=<function clipboard.<locals>.paste at 0x7f656106ea60>) displays = {'browser': ':1006.0'} @wt(parsers.parse('user of {browser_id} sees that recent downloaded json ' 'file contains audit log which has the same entries as the ' 'workflow audit log in GUI')) def assert_log_entries_in_json_same_as_visible_in_workflow_audit_log( browser_id, tmpdir, modals, selenium, clipboard, displays): driver = selenium[browser_id] modal = modals(driver).audit_log path = tmpdir.join(browser_id, 'download') file_name = os.listdir(path)[-1] file_path = tmpdir.join(browser_id, 'download', file_name) if file_path.isfile(): with open(file_path) as f: data = json.load(f) log_entries = len(modal.logs_entry) err_msg = (f'there is different number of log entries in file ' f'{len(data)} and visible {log_entries}') assert len(data) == log_entries, err_msg for i in range(log_entries): file_log = data[i] idx = log_entries - i - 1 modal.logs_entry[idx].click() modal.copy_json() visible_log = json.loads( clipboard.paste(display=displays[browser_id])) # remove 'source' from dict visible_log.pop('source') err_msg = (f'logs in file: {file_log} and visible {visible_log}' f'are different') > assert file_log == visible_log, err_msg E AssertionError: logs in file: {'timestamp': 1722118262387, 'severity': 'info', 'index': '1', 'content': {'referencedElements': {'tasks': ['46cdb76dd41c5196791f9ebe998d16dbchdd26']}, 'description': '[Lane: 1, Run: 1, PBox: 1, Task: 1] Started.'}} and visible {'index': '0', 'timestamp': 1722118257307, 'severity': 'notice', 'content': {'details': {'scheduledLaneRunSelector': {'laneIndex': 1, 'RunNumber': 1}}, 'description': 'Scheduled execution.'}}are different tests/gui/meta_steps/oneprovider/automation/audit_log.py:742: AssertionError