Skip to content

Latest commit

 

History

History
32 lines (24 loc) · 2.04 KB

README.md

File metadata and controls

32 lines (24 loc) · 2.04 KB

Description

This repository contains code for SONiC testbed deployment and setup, SONiC testing, test report processing.

Ansible is the main tool powering all the tasks for SONiC testing. The tasks include:

  • Deploy and setup testbed
  • Interact with various devices in testbed in ansible playbooks and in pytest scripts.

Originally, all the tests were written in ansible playbooks. In 2019, pytest was first introduced to replace the ansible playbook based tests. Since then, new tests were all written using pytest. Existing ansible-playbook tests were also converted to pytest gradually. At the time of writing (2020 Nov.), only pytest based new tests are accepted.

Using of pytest does not mean that ansible will no long be used. Ansible is still the core tool power SONiC testing. A new pytest plugin named pytest-ansible was introduced to bridge the power between pytest and ansible. Under the hood, all the pytest based test scripts are still using ansible to interact with various devices in testbed. Ansible playbooks are still used for testbed deployment and configuration. All the customized ansible modules are re-used by the pytest scripts as well.

Folder structure

  • ansible: This folder contains code for SONiC testbed deployment and setup. Legacy ansible playbook based automation code is also under this folder.
  • docs: Documentations
  • spytest: The SPyTest automation framework and tests for validating SONiC
  • test_peporting: For parsing, uploading and processing junit xml test reports generated by pytest. Processed test data is uploaded to Kusto for query.
  • tests: Pytest and pytest-ansible based test infrastructure code and test scripts
  • api_wiki: Information on how to communicate between localhost/dut/ptf. Useful for testwriting.

Documentations