Update test case to increase passrate (#5083)

Update test case order to avoid scan on push fail
Add sleep time to avoid view scan results fail
Change keyword to wait unitl avoid delete operation fail
Change delete rule and repicate manual confirm to mouse down and up
This commit is contained in:
sigsbee 2018-06-05 18:51:11 +08:00 committed by GitHub
parent bf6192f32b
commit a6f14c6d89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 18 deletions

View File

@ -142,7 +142,9 @@ Trigger Replication Manual
Click Element //clr-dg-row[contains(.,'${rule}')]//label
Click Element ${action_bar_replicate}
Wait Until Page Contains Element ${dialog_replicate}
Click Element ${dialog_replicate}
#change from click to mouse down and up
Mouse Down ${dialog_replicate}
Mouse Up ${dialog_replicate}
Sleep 2
Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${rule}')]/../div/clr-icon[@shape="success-standard"]
Sleep 1
@ -165,7 +167,9 @@ Delete Rule
Click Element //clr-dg-row[contains(.,'${rule}')]//label
Click Element ${action_bar_delete}
Wait Until Page Contains Element ${dialog_delete}
Click Element ${dialog_delete}
#change from click to mouse down and up
Mouse Down ${dialog_delete}
Mouse Up ${dialog_delete}
Sleep 2
Filter Rule

View File

@ -23,13 +23,13 @@ ${HARBOR_VERSION} v1.1.1
Delete Success
[Arguments] @{obj}
:For ${obj} in @{obj}
\ Page Should Contain Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape="success-standard"]
\ Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape="success-standard"]
Sleep 1
Delete Fail
[Arguments] @{obj}
:For ${obj} in @{obj}
\ Page Should Contain Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape="error-standard"]
\ Wait Until Page Contains Element //clr-tab-content//div[contains(.,'${obj}')]/../div/clr-icon[@shape="error-standard"]
Sleep 1
Filter Object

View File

@ -45,7 +45,7 @@ Scan Repo
#select one tag
Click Element //clr-dg-row[contains(.,"${tagname}")]//label
Click Element //button[contains(.,'Scan')]
Sleep 1
Sleep 5
Run Keyword If '${status}' == 'Succeed' Wait Until Element Is Visible //hbr-vulnerability-bar//hbr-vulnerability-summary-chart
Run Keyword If '${status}' == 'Fail' Wait Until Element Is Visible //hbr-vulnerability-bar//a

View File

@ -474,19 +474,6 @@ Test Case - Project Level Image Serverity Policy
Cannot pull image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library haproxy
Close Browser
Test Case - Scan Image On Push
Init Chrome Driver
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Go Into Project library
Goto Project Config
Enable Scan On Push
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library memcached
Back To Projects
Go Into Project library
Go Into Repo memcached
Summary Chart Should Display latest
Close Browser
Test Case - Verify Download Ca Link
Init Chrome Driver
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
@ -686,6 +673,19 @@ Test Case - View Scan Error
View Scan Error Log
Close Browser
Test Case - Scan Image On Push
Init Chrome Driver
Sign In Harbor ${HARBOR_URL} ${HARBOR_ADMIN} ${HARBOR_PASSWORD}
Go Into Project library
Goto Project Config
Enable Scan On Push
Push Image ${ip} ${HARBOR_ADMIN} ${HARBOR_PASSWORD} library memcached
Back To Projects
Go Into Project library
Go Into Repo memcached
Summary Chart Should Display latest
Close Browser
#Test Case - OVA reboot
# Reboot VM ${vm_name} ${vc_host} ${vc_user} ${vc_password}
# Wait for Harbor Ready https ${ip}