Skip to content

Testing Guide

maggiemsft edited this page Aug 8, 2017 · 50 revisions

Testlab/Testbed

Please find testlab setup instructions here

Minigraph

Minigraph is the only resource/starting point for configuring a SONiC device.

Minigraph is a XML format file. Each SONiC device must have a matching Minigraph file for device configuration and test.

SONiC devices Minigraph files could be saved locally or centralized saved in a remote location.

All local Minigraph files are saved under ansible/minigraph folder. The file name must match your SONiC device name specified in 'lab' inventory file under ansible/ folder

Configuration and Minigraph

Generate Minigraph File Based On Testbed Type

Run Tests

How to Run Test

Tests that you may run to validate SONiC switch features of your platform

  • Test List

  • Command to run tests:

      ansible-playbook -i lab --limit your-dut-name test_sonic.yml --tags your-test-tag1,test-tag-2
    
  • Example: run fib test

      ansible-playbook -i lab --limit your-dut-name test_sonic.yml --tags fib -e "ptf_host=10.64.246.19 testbed_type=t1"
    
  • not all tests in the list can be run through for a single topology

    based on your testbed topology, here is summary of what test can be run in which deployed testbed type

        t0: [acl, bgp_facts, bgp_speaker, decap, dhcp_relay, fast_reboot, fdb, lldp, lag_2]
    
        common: [ link_flap, mem_check, ntp, snmp, sensors_check, syslog, reboot ]   
    
        t1: [ acl, bgp_fact, decap, everflow_testbed, fib, link_flap, lldp ]
    
        t1_lag: [ acl, bgp_fact, everflow_testbed, decap, fib, lldp, lag_2 ]   
    
        ptf: [ arp, copp, everflow, qos, neighbor ]`
    
  • Some of tests are not actively maintained and is/going to be deprecated, running these tests most likely will get failed result unless you know how to run them and make it work:

        ECMP:  ptf testbed type; ECMP is covered by FIB test now
               
        LAG:   t0 or t1-lag; LAG load balancing is covered under FIB and LAG features is covered under lag_2.
    

Here are some test design docs

Clone this wiki locally