blob: 52071fb7abe8b28f03d0a2e6d4a0752aca4a4363 [file] [log] [blame]
Yi Tseng1da30b62021-09-30 17:39:14 -07001P4 Pipeline Tests (PTF)
2=======================
3
4`PTF <https://github.com/p4lang/PTF>`_ is a Python based data plane test framework.
5It is based on unittest, which is included in the standard Python distribution.
6
7To test the P4 pipeline, we are using the following components:
8
9* PTF framework and tests
10
11 * Installs table entries to the device.
12 * Generate and verify the traffic.
13
14* Stratum: the software that process P4Runtime requests from PTF and configures the device.
15* The device under tests: can be software device like Tofino Model, or a hardware device.
16* TRex server: for the line rate test.
17
18.. image:: ../images/pipeline-test-arch.svg
19 :width: 800px
20
21Test plans
22----------
23
24See `test plans <https://github.com/stratum/fabric-tna/tree/main/ptf#the-unary-test-plan>`_ section in the fabric-TNA repository
25
26Run tests
27---------
28
29See `step to run tests <https://github.com/stratum/fabric-tna/tree/main/ptf#steps-to-run-tests-on-tofino-model-with-stratum>`_
30section in the Fabric-TNA repository.
31
32Test result
33-----------
34
35See `test result <https://github.com/stratum/fabric-tna/tree/main/ptf#test-result>`_
36section in the Fabric-TNA repository.
37
38
39Contribute new test cases
40-------------------------
41
42See `contribute new test cases <https://github.com/stratum/fabric-tna/tree/main/ptf#contribute-new-test-cases>`_
43section in the Fabric-TNA repository.