Fixes for Redist and Shorten time 19/49219/1
authorBrian Freeman <bf1936@att.com>
Sat, 26 May 2018 02:09:05 +0000 (21:09 -0500)
committerBrian Freeman <bf1936@att.com>
Sat, 26 May 2018 02:10:22 +0000 (21:10 -0500)
Issue-ID: AAI-1181
Change-Id: Id5420f4ee46f2ae20e53f0c1b8f1efcbb8c292b2
Signed-off-by: Brian Freeman <bf1936@att.com>
robot/resources/asdc_interface.robot
robot/resources/vid/create_service_instance.robot

index c4c79ca..f31e7c5 100644 (file)
@@ -73,17 +73,18 @@ Distribute Model From ASDC
         \   Distribute ASDC Catalog Service    ${catalog_service_id}
         \   ${catalog_service_resp}=    Get ASDC Catalog Service    ${catalog_service_id}
         \   ${vf_module}=    Find Element In Array    ${loop_catalog_resource_resp['groups']}    type    org.openecomp.groups.VfModule
-        \   ${status}   Loop Over Check Catalog Service Distributed       ${catalog_service_resp['uuid']}
-       \   Exit For Loop If   ${status}
+        \   ${status}   ${_} =   Run Keyword And Ignore Error   Loop Over Check Catalog Service Distributed       ${catalog_service_resp['uuid']}
+       \   Exit For Loop If   '${status}'=='PASS'
     [Return]    ${catalog_service_resp['name']}    ${loop_catalog_resource_resp['name']}    ${vf_module}   ${catalog_resource_ids}    ${catalog_service_id}   ${catalog_resources}
 
 Loop Over Check Catalog Service Distributed
     [Arguments]    ${catalog_service_id} 
-    : FOR     ${CHECK_INDEX}  IN RANGE   1   7  
-    \   ${status}     Run Keyword And Ignore Error     Check Catalog Service Distributed    ${catalog_service_id}   
-    \   Sleep     15s  
-    \   Exit For Loop if   ${status}
-    [Return]   ${status}
+    : FOR     ${CHECK_INDEX}  IN RANGE   1   15  
+    \   ${status}   ${_} =   Run Keyword And Ignore Error     Check Catalog Service Distributed    ${catalog_service_id}   
+    \   Sleep     20s  
+    \   Return From Keyword If   '${status}'=='PASS'
+    Fail
+     
 
 Setup ASDC Catalog Resource
     [Documentation]    Creates all the steps a vf needs for an asdc catalog resource and returns the id
@@ -518,3 +519,4 @@ Create Multi Part
    ${fileDir}  ${fileName}=  Split Path  ${filePath}
    ${partData}=  Create List  ${fileName}  ${fileData}  ${contentType}
    Set To Dictionary  ${addTo}  ${partName}=${partData}
+
index b05bf66..aa0d32a 100644 (file)
@@ -16,20 +16,22 @@ Create VID Service Instance
     [Documentation]    Creates a service instance using VID
     [Arguments]    ${customer_name}  ${service_model_type}    ${service_type}     ${service_name}  ${project_name}  ${owning_entity}
     Go To VID Browse Service Models
-    Wait Until Keyword Succeeds    300s    1s    Wait For Model    ${service_model_type}
+    Wait Until Keyword Succeeds    180s    5s    Wait For Model    ${service_model_type}
     Press Key    xpath=//tr[td/span/text() = '${service_model_type}']/td/button[text() = 'Deploy' and not(@disabled)]    \\13
     ${uuid}=    Generate UUID
     Wait Until Page Contains Element    xpath=//input[@parameter-name='Instance Name']    ${GLOBAL_VID_UI_TIMEOUT_LONG}
     Wait Until Element Is Visible    xpath=//input[@parameter-name='Instance Name']    ${GLOBAL_VID_UI_TIMEOUT_LONG}
-    Xpath Should Match X Times    //input[@parameter-name='Instance Name']    1
-    Wait Until Keyword Succeeds   120s  5s    Input Text When Enabled    //input[@parameter-name='Instance Name']    ${service_name}   timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
     Select From List When Enabled    //select[@prompt='Select Subscriber Name']    ${customer_name}   timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
     Select From List When Enabled    //select[@prompt='Select Service Type']     ${service_type}   timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
     Select From List When Enabled    //select[@prompt='Select Project Name']     ${project_name}   timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
     Select From List When Enabled    //select[@prompt='Select Owning Entity']     ${owning_entity}   timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+    Capture Page Screenshot
+    Xpath Should Match X Times    //input[@parameter-name='Instance Name']    1
+    Wait Until Keyword Succeeds   120s  5s    Input Text When Enabled    //input[@parameter-name='Instance Name']    ${service_name}   timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
+    Capture Page Screenshot
     Click On Button When Enabled    //div[@class = 'buttonRow']/button[text() = 'Confirm']
-       Wait Until Element Contains    xpath=//pre[@class= 'log ng-binding']    requestState    timeout=${GLOBAL_VID_UI_TIMEOUT_LONG}
-       Page Should Contain    "requestState": "COMPLETE"
+       Wait Until Element Contains    xpath=//pre[@class= 'log ng-binding']    requestState    timeout=${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
+        Wait Until Page Contains    "requestState": "COMPLETE"   timeout= ${GLOBAL_VID_UI_TIMEOUT_LONG}
     ${response text}=    Get Text    xpath=//pre[@class = 'log ng-binding']
     Click On Button When Enabled    //div[@class = 'buttonRow']/button[text() = 'Close']
     ${request_id}=    Parse Request Id    ${response text}
@@ -41,7 +43,7 @@ Wait For Model
     [Documentation]   Distributed model may not yet be available. Kepp trying until it shows up.
     [Arguments]   ${service_model_type}
     Page Should Contain Element    xpath=//div/h1[text() = 'Browse SDC Service Models']
-    Wait Until Page Contains Element    xpath=//button[text() = 'Deploy']    ${GLOBAL_VID_UI_TIMEOUT_LONG}
+    Wait Until Page Contains Element    xpath=//button[text() = 'Deploy']    ${GLOBAL_VID_UI_TIMEOUT_MEDIUM}
     Input Text When Enabled    //input[@ng-model='searchString']    ${service_model_type}
     Wait Until Element Is Visible    xpath=//tr[td/span/text() = '${service_model_type}']/td/button[contains(text(),'Deploy')]    ${GLOBAL_VID_UI_TIMEOUT_SHORT}