diff options
author | Tibor Frank <tifrank@cisco.com> | 2016-10-27 15:33:42 +0200 |
---|---|---|
committer | Tibor Frank <tifrank@cisco.com> | 2016-11-07 17:07:12 +0100 |
commit | 440370de3fc66d5bb9754a55fa78ccce8c598f5d (patch) | |
tree | e5c9b88a6f854d9fc55d5e36e2897809b8fb1300 /tests/func/softwire | |
parent | efe5c162d2311ed470285a6f84af7c0f3a0c109c (diff) |
CSIT-465: Common test setup and teardown
This test setup and teardown is aimed to be used with all functional
tests.
It does not include functionality to manipulate VMs (qemu).
Test setup includes:
- Setup all DUTs before test
- Save VPP PIDs
- Setup all TGs before traffic script
- Update All Interface Data On All Nodes
Test teardown includes:
- Show Packet Trace on All DUTs
- Show vpp trace dump on all DUTs
- Vpp Show Errors On All DUTs
- Check VPP PID in Teardown
Change-Id: Ifee0bd58b7865442c5b510852908fd8363e3c543
Signed-off-by: Tibor Frank <tifrank@cisco.com>
Diffstat (limited to 'tests/func/softwire')
-rw-r--r-- | tests/func/softwire/lightweight_4over6.robot | 5 | ||||
-rw-r--r-- | tests/func/softwire/map_e.robot | 31 | ||||
-rw-r--r-- | tests/func/softwire/map_t.robot | 13 |
3 files changed, 17 insertions, 32 deletions
diff --git a/tests/func/softwire/lightweight_4over6.robot b/tests/func/softwire/lightweight_4over6.robot index 06f7c6efad..f96ee19b4e 100644 --- a/tests/func/softwire/lightweight_4over6.robot +++ b/tests/func/softwire/lightweight_4over6.robot @@ -19,9 +19,8 @@ | Resource | resources/libraries/robot/map.robot | Library | resources.libraries.python.Trace | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Test Setup | Run Keywords | Setup all DUTs before test -| ... | AND | Setup all TGs before traffic script -| Test Teardown | Show Packet Trace on All DUTs | ${nodes} +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown | Documentation | *Lightweight 4 over 6 test cases* | ... | ... | LW4o6 is a subset of MAP-E, with per-subscriber rules. It uses the diff --git a/tests/func/softwire/map_e.robot b/tests/func/softwire/map_e.robot index c8b7f151fa..78246b5e44 100644 --- a/tests/func/softwire/map_e.robot +++ b/tests/func/softwire/map_e.robot @@ -20,17 +20,10 @@ | Resource | resources/libraries/robot/map.robot | Library | resources.libraries.python.IPUtil | Library | resources.libraries.python.Trace -| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO | Variables | resources/test_data/softwire/map_e_domains.py | ${5} -| Suite Setup | Run Keywords -| ... | Setup All DUTs Before Test | AND -| ... | Setup All TGs Before Traffic Script -| Test Setup | Run Keywords -| ... | Setup All DUTs Before Test | AND -| ... | Setup All TGs Before Traffic Script -| Test Teardown | Run Keywords -| ... | Show Packet Trace On All DUTs | ${nodes} | AND -| ... | Show Vpp Trace Dump On All DUTs +| Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO +| Test Setup | Func Test Setup +| Test Teardown | Func Test Teardown | Documentation | *Test for Basic mapping rule for MAP-E*\ | ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the | ... | nodes. @@ -66,8 +59,7 @@ # TODO: replace setup when VPP-312 fixed #| | [Setup] | Set Interfaces IP Addresses And Routes | | [Setup] | Run Keywords -| | ... | Setup All DUTs Before Test | AND -| | ... | Setup All TGs Before Traffic Script | AND +| | ... | Func Test Setup | AND | | ... | Set Interfaces IP Addresses And Routes | | [Template] | Check MAP Configuration With Traffic Script # |=================|===============|================|============|=============|==========|================|==========|==================================| @@ -92,8 +84,7 @@ # TODO: replace setup when VPP-312 fixed #| | [Setup] | Set Interfaces IP Addresses And Routes | | [Setup] | Run Keywords -| | ... | Setup All DUTs Before Test | AND -| | ... | Setup All TGs Before Traffic Script | AND +| | ... | Func Test Setup | AND | | ... | Set Interfaces IP Addresses And Routes | | [Template] | Check MAP Configuration With Traffic Script # |===================|===============|================|============|=============|==========|================|==========|==================================| @@ -121,8 +112,7 @@ # TODO: replace setup when VPP-312 fixed #| | [Setup] | Set Interfaces IP Addresses And Routes | | [Setup] | Run Keywords -| | ... | Setup All DUTs Before Test | AND -| | ... | Setup All TGs Before Traffic Script | AND +| | ... | Func Test Setup | AND | | ... | Set Interfaces IP Addresses And Routes | | [Template] | Check MAP Configuration With Traffic Script # |===================|===============|================|============|=============|==========|================|==========|===================================| @@ -169,8 +159,7 @@ # TODO: replace setup when VPP-312 fixed #| | [Setup] | Set Interfaces IP Addresses And Routes | | [Setup] | Run Keywords -| | ... | Setup All DUTs Before Test | AND -| | ... | Setup All TGs Before Traffic Script | AND +| | ... | Func Test Setup | AND | | ... | Set Interfaces IP Addresses And Routes | | [Template] | Check MAP Configuration With Traffic Script # |===================|=========================|================|============|=============|==========|================|==========| @@ -187,8 +176,7 @@ # TODO: replace setup when VPP-312 fixed #| | [Setup] | Set Interfaces IP Addresses And Routes | | [Setup] | Run Keywords -| | ... | Setup All DUTs Before Test | AND -| | ... | Setup All TGs Before Traffic Script | AND +| | ... | Func Test Setup | AND | | ... | Set Interfaces IP Addresses And Routes | | [Template] | Check MAP Configuration With Traffic Script # |===================|=========================|================|============|=============|==========|================|==========| @@ -419,7 +407,8 @@ | | [Teardown] | Run Keywords | | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND | | ... | Show Packet Trace On All DUTs | ${nodes} | AND -| | ... | Clear Packet Trace On All DUTs | ${nodes} +| | ... | Clear Packet Trace On All DUTs | ${nodes} | AND +| | ... | Check VPP PID in Teardown | Check Encapsulation With Traffic Script | | [Arguments] | ${ipv4_dst} | ${dst_port} | ${ipv6_dst} diff --git a/tests/func/softwire/map_t.robot b/tests/func/softwire/map_t.robot index 5629f50e89..4167ca2bcf 100644 --- a/tests/func/softwire/map_t.robot +++ b/tests/func/softwire/map_t.robot @@ -21,12 +21,9 @@ | Library | resources.libraries.python.IPUtil | Library | resources.libraries.python.Trace | Force Tags | HW_ENV | VM_ENV | 3_NODE_DOUBLE_LINK_TOPO -| Suite Setup | Run Keywords -| ... | Setup all DUTs before test | AND -| ... | Setup all TGs before traffic script -| Test Teardown | Run Keywords -| ... | Show packet trace on all DUTs | ${nodes} | AND -| ... | Show vpp trace dump on all DUTs +| Test Setup | Run Keywords | Func Test Setup +| ... | AND | Set interfaces IP addresses and routes +| Test Teardown | Func Test Teardown | Documentation | *Test for Basic mapping rule for MAP-T*\ | ... | *[Top] Network Topologies:* TG - DUT1 - TG with two links between the | ... | nodes. @@ -55,7 +52,6 @@ | TC01: MAP-T test | | [Documentation] | | | ... | Test to check map-t address translation. -| | [Setup] | Set interfaces IP addresses and routes | | [Template] | Check MAP-T configuration with traffic script # |===================|===============|================|============|=============|==========|===========|================|==========| # | ipv4_pfx | ipv6_dst_pfx | ipv6_src_pfx | ea_bit_len | psid_offset | psid_len | ipv4_src | ipv4_dst | dst_port | @@ -122,4 +118,5 @@ | | [Teardown] | Run Keywords | | ... | Map Del Domain | ${dut_node} | ${domain_index} | AND | | ... | Show packet trace on all DUTs | ${nodes} | AND -| | ... | Clear packet trace on all DUTs | ${nodes} +| | ... | Clear packet trace on all DUTs | ${nodes} | AND +| | ... | Check VPP PID in Teardown |