blob: 52071fb7abe8b28f03d0a2e6d4a0752aca4a4363 [file] [log] [blame]
P4 Pipeline Tests (PTF)
=======================
`PTF <https://github.com/p4lang/PTF>`_ is a Python based data plane test framework.
It is based on unittest, which is included in the standard Python distribution.
To test the P4 pipeline, we are using the following components:
* PTF framework and tests
* Installs table entries to the device.
* Generate and verify the traffic.
* Stratum: the software that process P4Runtime requests from PTF and configures the device.
* The device under tests: can be software device like Tofino Model, or a hardware device.
* TRex server: for the line rate test.
.. image:: ../images/pipeline-test-arch.svg
:width: 800px
Test plans
----------
See `test plans <https://github.com/stratum/fabric-tna/tree/main/ptf#the-unary-test-plan>`_ section in the fabric-TNA repository
Run tests
---------
See `step to run tests <https://github.com/stratum/fabric-tna/tree/main/ptf#steps-to-run-tests-on-tofino-model-with-stratum>`_
section in the Fabric-TNA repository.
Test result
-----------
See `test result <https://github.com/stratum/fabric-tna/tree/main/ptf#test-result>`_
section in the Fabric-TNA repository.
Contribute new test cases
-------------------------
See `contribute new test cases <https://github.com/stratum/fabric-tna/tree/main/ptf#contribute-new-test-cases>`_
section in the Fabric-TNA repository.