blob: ca8cb87d88ccad917aa6757c59f2df1c73b6262a [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
Charles Chana937f772022-02-23 16:24:35 -080027See `test plans <https://github.com/stratum/fabric-tna/tree/main/ptf#user-content-the-unary-test-plan>`_ section in the fabric-TNA repository
Yi Tseng1da30b62021-09-30 17:39:14 -070028
29Run tests
30---------
31
Charles Chana937f772022-02-23 16:24:35 -080032See `step to run tests <https://github.com/stratum/fabric-tna/tree/main/ptf#user-content-steps-to-run-tests-on-tofino-model-with-stratum>`_
Yi Tseng1da30b62021-09-30 17:39:14 -070033section in the Fabric-TNA repository.
34
35Test result
36-----------
37
Charles Chana937f772022-02-23 16:24:35 -080038See `test result <https://github.com/stratum/fabric-tna/tree/main/ptf#user-content-test-result>`_
Yi Tseng1da30b62021-09-30 17:39:14 -070039section in the Fabric-TNA repository.
40
41
42Contribute new test cases
43-------------------------
44
Charles Chana937f772022-02-23 16:24:35 -080045See `contribute new test cases <https://github.com/stratum/fabric-tna/tree/main/ptf#user-content-contribute-new-test-cases>`_
Yi Tseng1da30b62021-09-30 17:39:14 -070046section in the Fabric-TNA repository.