Fix variable naming for some immutable variables
[integration/test.git] / csit / suites / netconf / restperfclient / performance.robot
index fa5506a35a871eb30fa46cf65507c7badcc9a272..1c7847e86f5aec5ef67464efcdea95f21462028d 100644 (file)
@@ -1,7 +1,7 @@
 *** Settings ***
 Documentation     netconf-restperfclient Update performance test suite.
 ...
-...               Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
 ...
 ...               This program and the accompanying materials are made available under the
 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
@@ -18,13 +18,12 @@ Documentation     netconf-restperfclient Update performance test suite.
 Suite Setup       Setup_Everything
 Suite Teardown    Teardown_Everything
 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Fast_Failing
-Test Teardown     FailFast.Start_Failing_Fast_If_This_Failed
+Test Teardown     SetupUtils.Teardown_Test_Show_Bugs_And_Start_Fast_Failing_If_Test_Failed
 Library           Collections
 Library           RequestsLibrary
 Library           OperatingSystem
 Library           String
 Library           SSHLibrary    timeout=10s
-Resource          ${CURDIR}/../../../libraries/FailFast.robot
 Resource          ${CURDIR}/../../../libraries/KarafKeywords.robot
 Resource          ${CURDIR}/../../../libraries/NetconfKeywords.robot
 Resource          ${CURDIR}/../../../libraries/NetconfViaRestconf.robot
@@ -34,10 +33,9 @@ Resource          ${CURDIR}/../../../libraries/Utils.robot
 Variables         ${CURDIR}/../../../variables/Variables.py
 
 *** Variables ***
-${DIRECTORY_WITH_CRUD_TEMPLATES}    ${CURDIR}/../../../variables/netconf/CRUD
-${DIRECTORY_WITH_TEMPLATE_FOLDERS}    ${CURDIR}/../../../variables/netconf/RestPerfClient
 ${DEVICE_NAME}    ${FIRST_TESTTOOL_PORT}-sim-device
 ${REQUEST_COUNT}    65536
+${directory_with_crud_templates}    ${CURDIR}/../../../variables/netconf/CRUD
 
 *** Test Cases ***
 Start_Testtool
@@ -57,7 +55,7 @@ Wait_For_Device_To_Become_Connected
 Create_Device_Data
     [Documentation]    Send some sample test data into the device and check that the request went OK.
     ${template_as_string}=    BuiltIn.Set_Variable    {'DEVICE_NAME': '${DEVICE_NAME}'}
-    NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf    ${DIRECTORY_WITH_CRUD_TEMPLATES}${/}cars    ${template_as_string}
+    NetconfViaRestconf.Post_Xml_Template_Folder_Via_Restconf    ${directory_with_crud_templates}${/}cars    ${template_as_string}
 
 Deploy_And_Run_RestPerfClient
     [Documentation]    Deploy and execute restperfclient, asking it to send the specified amount of requests to the netconf connector of the device.
@@ -70,7 +68,7 @@ Deploy_And_Run_RestPerfClient
     ${options}=    BuiltIn.Set_Variable    ${options} --destination /restconf/config/network-topology:network-topology/topology/topology-netconf/node/${DEVICE_NAME}/yang-ext:mount/car:cars
     ${options}=    BuiltIn.Set_Variable    ${options} --edit-content request1.json
     ${options}=    BuiltIn.Set_Variable    ${options} --auth ${ODL_RESTCONF_USER} ${ODL_RESTCONF_PASSWORD}
-    ${command}    BuiltIn.Set_Variable    java -Xmx1G -XX:MaxPermSize=256M -jar ${filename} ${options}
+    ${command}=    NexusKeywords.Compose_Full_Java_Command    -Xmx1G -XX:MaxPermSize=256M -jar ${filename} ${options}
     BuiltIn.Log    Running restperfclient: ${command}
     ${restperfclientlog}=    Utils.Get_Log_File_Name    restperfclient
     BuiltIn.Set_Suite_Variable    ${restperfclientlog}    ${restperfclientlog}
@@ -86,6 +84,8 @@ Check_For_Failed_Requests
     ...    we don't want to test performance of ODL rejecting our requests.
     ${result}=    SSHLibrary.Execute_Command    grep "Request failed" ${restperfclientlog}
     BuiltIn.Should_Be_Equal    '${result}'    ''
+    ${result}=    SSHLibrary.Execute_Command    grep "Status code" ${restperfclientlog}
+    BuiltIn.Should_Be_Equal    '${result}'    ''
 
 Deconfigure_Device_From_Netconf
     [Documentation]    Deconfigure the testtool device on Netconf connector.
@@ -101,8 +101,6 @@ Setup_Everything
     # Connect to the tools system (rest-perf-client)
     ${restperfclient}=    SSHKeywords.Open_Connection_To_Tools_System
     BuiltIn.Set_Suite_Variable    ${restperfclient}    ${restperfclient}
-    # Initialize artifact deployment infrastructure.
-    NexusKeywords.Initialize_Artifact_Deployment_And_Usage
     ${testtool}=    SSHLibrary.Get Connection
     BuiltIn.Set_Suite_Variable    ${testtool}    ${testtool.index}