Now that test cases 01.01 - 01.05 have test case parameters, you'll complete test case 01.06 by adding a Job File and a parameter file.
From your project's Test Cases page:
*** Settings ***
# CXTA
Library CXTA
Resource cxta.robot
# Import Robot Framework keywords from open source or custom libraries:
# http://robotframework.org/robotframework/#standard-libraries
Library Collections
# Load topology/testbed file and connect to devices
Suite Setup Run Keywords
... load testbed
... AND
... SpirentRest Connect device_name=SpirentRestDevice
... AND
... Connect to device "${FANOUT}" via "ssh"
# Disconnect sessions from all devices
Suite Teardown Run Keywords
... disconnect from all devices
... AND
... SpirentRest End Session
*** Test Cases ***
1. START SPIRENT
[Documentation] Start Spirent devices and traffic
SpirentRest Load Config config_file_path=${spirent_config_file} revoke_ownership=${true}
SpirentRest Start Arp On All Devices
Sleep 10s
SpirentRest Start Streams ${streamblocks}
2. EXECUTE FAILURE
[Documentation] Execute the failure trigger
Sleep 5s
SpirentRest Clear Traffic Results
Sleep 5s
Spirent Verify No Drops
Spirent Check Drops
Select Device "${FANOUT}"
Sendline "config t"
Sendline "router bgp ${BGP_AS}"
Sendline "vrf ${BGP_VRF}"
Sendline "neighbor ${BGP_NBR}"
Sendline "shutdown"
Sleep 5s
3. STOP SPIRENT AFTER FAILURE
[Documentation] Stop Spirent traffic streams
SpirentRest Stop Streams ${streamblocks}
4. GET RESULTS AFTER FAILURE
[Documentation] Get traffic convergence results after the failure
${strms_convergence}= Spirent Get Stream Convergence
csv save ${strms_convergence} as "${FAILURE_EVENT_FILE_NAME}"
${strms_convergence_ms} Create List
FOR ${strm_convergence} IN @{strms_convergence}
${convergence_ms} Set Variable ${strm_convergence['convergence_ms']}
Append to List ${strms_convergence_ms} ${convergence_ms}
END
Sort List ${strms_convergence_ms}
Reverse List ${strms_convergence_ms}
${status}= Run Keyword And Return Status Should be true ${strms_convergence_ms[0]}<=${EXPECTED_FAILURE_CONVERGENCE}
IF ${status} != ${True}
Fail ++UNSUCCESSFUL++ Dropped Frame Duration ${strms_convergence_ms[0]} is more than the expected: ${EXPECTED_FAILURE_CONVERGENCE}
ELSE
Set Test Message ++SUCCESSFUL++ Dropped Frame Duration ${strms_convergence_ms[0]} is <= to the expected: ${EXPECTED_FAILURE_CONVERGENCE}
END
5. RESTART SPIRENT
[Documentation] Start Spirent traffic streams
SpirentRest Start Streams ${streamblocks}
6. EXECUTE RECOVERY
[Documentation] Execute the recovery trigger
Sleep 5s
SpirentRest Clear Traffic Results
Sleep 5s
Spirent Verify No Drops
Spirent Check Drops
Select Device "${FANOUT}"
Sendline "config t"
Sendline "router bgp ${BGP_AS}"
Sendline "vrf ${BGP_VRF}"
Sendline "neighbor ${BGP_NBR}"
Sendline "no shutdown"
Sleep 5s
7. STOP SPIRENT AFTER RECOVERY
[Documentation] Stop Spirent traffic streams
SpirentRest Stop Streams ${streamblocks}
8. GET RESULTS AFTER RECOVERY
[Documentation] Get traffic convergence results after the recovery
${strms_convergence}= Spirent Get Stream Convergence
csv save ${strms_convergence} as "${RECOVERY_EVENT_FILE_NAME}"
${strms_convergence_ms} Create List
FOR ${strm_convergence} IN @{strms_convergence}
${convergence_ms} Set Variable ${strm_convergence['convergence_ms']}
Append to List ${strms_convergence_ms} ${convergence_ms}
END
Sort List ${strms_convergence_ms}
Reverse List ${strms_convergence_ms}
${status}= Run Keyword And Return Status Should be true ${strms_convergence_ms[0]}<=${EXPECTED_RECOVERY_CONVERGENCE}
IF ${status} != ${True}
Fail ++UNSUCCESSFUL++ Dropped Frame Duration ${strms_convergence_ms[0]} is more than the expected: ${EXPECTED_RECOVERY_CONVERGENCE}
ELSE
Set Test Message ++SUCCESSFUL++ Dropped Frame Duration ${strms_convergence_ms[0]} is <= to the expected: ${EXPECTED_RECOVERY_CONVERGENCE}
END
NOTE: You may need to scroll down to see the Parameter File section.
FANOUT: n9k-fanout1
spirent_config_file: /tmp/LABATO-2205-user07.xml
streamblocks:
- pod07_107-1107
- pod07_1107-107
BGP_AS: 65999
BGP_VRF: pod07-external
BGP_NBR: 192.168.107.10
EXPECTED_FAILURE_CONVERGENCE: 50
EXPECTED_RECOVERY_CONVERGENCE: 1
FAILURE_EVENT_FILE_NAME: BGP-Neighbor-Failure.csv
RECOVERY_EVENT_FILE_NAME: BGP-Neighbor-Recovery.csv
Now that you've added a Job File and parameters to your last test case, you'll navigate to the project's Job Files page to set the Default Topology to the Topology you created earlier, SaC CAIT Lab Topology, for all Job Files.
Return to the sidebar.
From your project's Job Files page:
Continue to the next section to add your test cases to a Batch to be run in your CI/CD pipeline.