aboutsummaryrefslogtreecommitdiffstats
path: root/tests/suites
diff options
context:
space:
mode:
authorStefan Kobza <skobza@cisco.com>2016-01-11 18:03:25 +0100
committerStefan Kobza <skobza@cisco.com>2016-02-08 22:38:32 +0100
commit33499c81c94c2d3baef9d3e9f061cd76ef86fa74 (patch)
tree2d000ba17b821339a05e0c039f71e48e09553de9 /tests/suites
parent5cbeca02602061d32212e14f289d65cf648920e4 (diff)
New version of RF tests.
Change-Id: I241a2b7a7706e65f71cfd4a62e2a40f053fc5d07 Signed-off-by: Stefan Kobza <skobza@cisco.com>
Diffstat (limited to 'tests/suites')
-rw-r--r--tests/suites/__init__.robot20
-rw-r--r--tests/suites/bridge_domain/test.robot39
-rw-r--r--tests/suites/ipv4/ipv4_untagged.robot58
-rw-r--r--tests/suites/ipv6/ipv6_untagged.robot52
-rw-r--r--tests/suites/performance/short.robot41
5 files changed, 210 insertions, 0 deletions
diff --git a/tests/suites/__init__.robot b/tests/suites/__init__.robot
new file mode 100644
index 0000000000..fc3c810e39
--- /dev/null
+++ b/tests/suites/__init__.robot
@@ -0,0 +1,20 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Resource | resources/libraries/robot/default.robot
+| Library | resources/libraries/python/SetupFramework.py
+| Library | resources.libraries.python.topology.Topology
+| Suite Setup | Run Keywords | Setup Framework | ${nodes}
+| ... | AND | Update All Interface Data On All Nodes | ${nodes}
+
diff --git a/tests/suites/bridge_domain/test.robot b/tests/suites/bridge_domain/test.robot
new file mode 100644
index 0000000000..a36e5928b6
--- /dev/null
+++ b/tests/suites/bridge_domain/test.robot
@@ -0,0 +1,39 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*** Settings ***
+| Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/interfaces.robot
+| Resource | resources/libraries/robot/bridge_domain.robot
+| Test Setup | Setup all DUTs before test
+| Library | resources.libraries.python.topology.Topology
+| Variables | resources/libraries/python/topology.py
+| Force Tags | 3_NODE_DOUBLE_LINK_TOPO
+
+*** Test Cases ***
+
+| VPP reports interfaces
+| | VPP reports interfaces on | ${nodes['DUT1']}
+
+| Vpp forwards packets via L2 bridge domain 2 ports
+| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
+| | ${TG_DUT_links}= | Get active links connecting "${nodes['TG']}" and "${nodes['DUT1']}"
+| | Setup l2 bridge on node "${nodes['DUT1']}" via links "${TG_DUT_links}"
+| | Send traffic on node "${nodes['TG']}" from link "${TG_DUT_links[0]}" to link "${TG_DUT_links[1]}"
+
+| Vpp forwards packets via L2 bridge domain in circular topology
+| | [Tags] | 3_NODE_DOUBLE_LINK_TOPO
+| | ${tg}= | Set Variable | ${nodes['TG']}
+| | ${dut1}= | Set Variable | ${nodes['DUT1']}
+| | ${dut2}= | Set Variable | ${nodes['DUT2']}
+| | ${tg_links}= | Setup TG "${tg}" DUT1 "${dut1}" and DUT2 "${dut2}" for 3 node l2 bridge domain test
+| | Send traffic on node "${nodes['TG']}" from link "${tg_links[0]}" to link "${tg_links[1]}"
diff --git a/tests/suites/ipv4/ipv4_untagged.robot b/tests/suites/ipv4/ipv4_untagged.robot
new file mode 100644
index 0000000000..dde2e5bb67
--- /dev/null
+++ b/tests/suites/ipv4/ipv4_untagged.robot
@@ -0,0 +1,58 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+*** Settings ***
+| Library | resources.libraries.python.topology.Topology
+| Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/ipv4.robot
+| Suite Setup | Run Keywords | Setup all DUTs before test
+| ... | AND | Update All Interface Data On All Nodes | ${nodes}
+| ... | AND | Setup nodes for IPv4 testing
+| Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes}
+
+*** Test Cases ***
+
+| VPP replies to ICMPv4 echo request
+| | TG interface "${nodes['TG']['interfaces']['port3']['name']}" can route to node "${nodes['DUT1']}" interface "${nodes['DUT1']['interfaces']['port1']['name']}" "0" hops away using IPv4
+| | Vpp dump stats table | ${nodes['DUT1']}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port1']['name']} | ${1}
+
+| TG can route to DUT egress interface
+| | TG interface "${nodes['TG']['interfaces']['port3']['name']}" can route to node "${nodes['DUT1']}" interface "${nodes['DUT1']['interfaces']['port3']['name']}" "0" hops away using IPv4
+| | Vpp dump stats table | ${nodes['DUT1']}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port1']['name']} | ${1}
+
+| TG can route to DUT2 through DUT1
+| | TG interface "${nodes['TG']['interfaces']['port3']['name']}" can route to node "${nodes['DUT2']}" interface "${nodes['DUT2']['interfaces']['port3']['name']}" "1" hops away using IPv4
+| | Vpp dump stats table | ${nodes['DUT1']}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port1']['name']} | ${1}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port3']['name']} | ${1}
+| | Vpp dump stats table | ${nodes['DUT2']}
+| | Check ipv4 interface counter | ${nodes['DUT2']} | ${nodes['DUT2']['interfaces']['port3']['name']} | ${1}
+
+| TG can route to DUT2 egress interface through DUT1
+| | TG interface "${nodes['TG']['interfaces']['port3']['name']}" can route to node "${nodes['DUT2']}" interface "${nodes['DUT2']['interfaces']['port1']['name']}" "1" hops away using IPv4
+| | Vpp dump stats table | ${nodes['DUT1']}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port1']['name']} | ${1}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port3']['name']} | ${1}
+| | Vpp dump stats table | ${nodes['DUT2']}
+| | Check ipv4 interface counter | ${nodes['DUT2']} | ${nodes['DUT2']['interfaces']['port3']['name']} | ${1}
+
+| TG can route to TG through DUT1 and DUT2
+| | TG interface "${nodes['TG']['interfaces']['port3']['name']}" can route to node "${nodes['TG']}" interface "${nodes['TG']['interfaces']['port5']['name']}" "2" hops away using IPv4
+| | Vpp dump stats table | ${nodes['DUT1']}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port1']['name']} | ${1}
+| | Check ipv4 interface counter | ${nodes['DUT1']} | ${nodes['DUT1']['interfaces']['port3']['name']} | ${1}
+| | Vpp dump stats table | ${nodes['DUT2']}
+| | Check ipv4 interface counter | ${nodes['DUT2']} | ${nodes['DUT2']['interfaces']['port3']['name']} | ${1}
+| | Check ipv4 interface counter | ${nodes['DUT2']} | ${nodes['DUT2']['interfaces']['port1']['name']} | ${1}
diff --git a/tests/suites/ipv6/ipv6_untagged.robot b/tests/suites/ipv6/ipv6_untagged.robot
new file mode 100644
index 0000000000..e437ae618a
--- /dev/null
+++ b/tests/suites/ipv6/ipv6_untagged.robot
@@ -0,0 +1,52 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""IPv6 untagged test suite"""
+
+*** Settings ***
+| Documentation | IPv6 untagged test suite
+| Resource | resources/libraries/robot/ipv6.robot
+| Resource | resources/libraries/robot/counters.robot
+| Resource | resources/libraries/robot/default.robot
+| Variables | resources/libraries/python/IPv6NodesAddr.py | ${nodes}
+| Suite Setup | Run Keywords | Setup ipv6 to all dut in topology | ${nodes} | ${nodes_ipv6_addr}
+| ... | AND | Vpp nodes ra supress link layer | ${nodes}
+| ... | AND | Vpp nodes setup ipv6 routing | ${nodes} | ${nodes_ipv6_addr}
+| ... | AND | Setup all TGs before traffic script
+| Suite Teardown | Clear ipv6 on all dut in topology | ${nodes} | ${nodes_ipv6_addr}
+| Test Setup | Clear interface counters on all vpp nodes in topology | ${nodes}
+
+*** Test Cases ***
+| VPP replies to ICMPv6 echo request
+| | Ipv6 icmp echo | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}
+
+| VPP can process ICMPv6 echo request from min to max packet size with 1B increment
+| | Ipv6 icmp echo sweep | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}
+
+| TG can route to first DUT egress interface
+| | Ipv6 tg to dut1 egress | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}
+
+| TG can route to second DUT through first DUT
+| | Ipv6 tg to dut2 via dut1 | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
+| | ... | ${nodes_ipv6_addr}
+
+| TG can route to second DUT egress interface through first DUT
+| | Ipv6 tg to dut2 egress via dut1 | ${nodes['TG']} | ${nodes['DUT1']}
+| | ... | ${nodes['DUT2']} | ${nodes_ipv6_addr}
+
+| TG can route to TG through first and second DUT
+| | Ipv6 tg to tg routed | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['DUT2']}
+| | ... | ${nodes_ipv6_addr}
+
+| VPP replies to IPv6 Neighbor Solicitation
+| | Ipv6 neighbor solicitation | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes_ipv6_addr}
diff --git a/tests/suites/performance/short.robot b/tests/suites/performance/short.robot
new file mode 100644
index 0000000000..5c04d5ec81
--- /dev/null
+++ b/tests/suites/performance/short.robot
@@ -0,0 +1,41 @@
+# Copyright (c) 2016 Cisco and/or its affiliates.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at:
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+*** Settings ***
+| Resource | resources/libraries/robot/default.robot
+| Resource | resources/libraries/robot/interfaces.robot
+| Library | resources/libraries/python/VatExecutor.py
+| Library | resources/libraries/python/TrafficGenerator.py
+| Force Tags | topo-3node
+| Test Setup | Setup all DUTs before test
+
+*** Test Cases ***
+| VPP passes traffic through L2 cross connect
+| | Given L2 xconnect initialized in topology
+| | Then Traffic should pass with no loss | 10 | 10 | 512
+
+*** Keywords ***
+| L2 xconnect initialized in topology
+| | Setup L2 xconnect | ${nodes['DUT1']} | port1 | port2
+| | Setup L2 xconnect | ${nodes['DUT2']} | port1 | port2
+
+
+| Setup L2 xconnect | [Arguments] | ${node} | ${src_port} | ${dst_port}
+| | Execute script | l2xconnect.vat | ${node}
+| | Script should have passed
+
+
+| Traffic should pass with no loss
+| | [Arguments] | ${duration} | ${rate} | ${framesize}
+| | Send traffic on | ${nodes['TG']} | port1 | port2 | ${duration}
+| | ... | ${rate} | ${framesize}
+| | No traffic loss occured