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