Enhancement Stop Scan Testcase (#17105)

Added error retries to improve test stability

Signed-off-by: Yang Jiao <jiaoya@vmware.com>
This commit is contained in:
Yang Jiao 2022-06-30 17:40:30 +08:00 committed by GitHub
parent 79d149b603
commit 90e9b997bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 7 deletions

View File

@ -34,7 +34,7 @@ Create An New Project And Go Into Project
Run Keyword If '${public}' == 'true' Run Keywords Wait Until Element Is Visible And Enabled ${element_project_public} AND Retry Element Click ${element_project_public}
Run Keyword If '${count_quota}'!='${null}' Input Count Quota ${count_quota}
Run Keyword If '${storage_quota}'!='${null}' Input Storage Quota ${storage_quota} ${storage_quota_unit}
Run Keyword If '${proxy_cache}' == '${true}' Run Keywords Mouse Down ${project_proxy_cache_switcher_id} AND Mouse Up ${project_proxy_cache_switcher_id} AND Retry Element Click ${project_registry_select_id} AND Retry Element Click xpath=//select[@id='registry']//option[contains(.,'${registry}')]
Run Keyword If '${proxy_cache}' == '${true}' Run Keywords Retry Element Click ${project_proxy_cache_switcher_xpath} AND Retry Element Click ${project_registry_select_id} AND Retry Element Click xpath=//select[@id='registry']//option[contains(.,'${registry}')]
Retry Double Keywords When Error Retry Element Click ${create_project_OK_button_xpath} Retry Wait Until Page Not Contains Element ${create_project_OK_button_xpath}
Sleep 2
Go Into Project ${projectname} has_image=${false}

View File

@ -76,5 +76,5 @@ ${project_add_count_quota_input_text_id} xpath=//*[@id='create_project_count_
${project_add_storage_quota_input_text_id} xpath=//*[@id='create_project_storage_limit']
${project_add_storage_quota_unit_id} xpath=//*[@id='create_project_storage_limit_unit']
${project_proxy_cache_switcher_id} xpath=//*[@id='proxy-cache']
${project_proxy_cache_switcher_xpath} xpath=//form//clr-toggle-wrapper
${project_registry_select_id} xpath=//*[@id='registry']

View File

@ -463,14 +463,21 @@ Body Of Stop Scan And Stop Scan All
Create An New Project And Go Into Project project${d}
Push Image With Tag ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} project${d} ${repo} ${tag} ${tag}
# stop scan
Scan Artifact project${d} ${repo}
Stop Scan Artifact
Check Scan Artifact Job Status Is Stopped
Retry Action Keyword Stop Scan project${d} ${repo}
# stop scan all
Retry Action Keyword Stop Scan All
Close Browser
Stop Scan
[Arguments] ${project_name} ${repo}
Scan Artifact ${project_name} ${repo}
Stop Scan Artifact
Retry Action Keyword Check Scan Artifact Job Status Is Stopped
Stop Scan All
Scan All Artifact
Stop Scan All Artifact
Check Scan All Artifact Job Status Is Stopped
Close Browser
Retry Action Keyword Check Scan All Artifact Job Status Is Stopped
Prepare Image Package Test Files
[Arguments] ${files_path}