Abstract:SDN (software-defined network) is designed to solve the problems of traditional networks with complex and scattered architecture, making the network more flexible.The characteristic of the P4 programming language is that users can directly define P4 programs according to their needs for processing data packets,and then compile and configure user requirements to network equipment through the adaptation file.The SDN data plane conformance test for the P4 programming language is to send the consistency test cases to the P4 network equipment to evaluate the consistency of the actual output and the expected output.Conformance test cases are the carriers for performing conformance tests,and the traditional manual construction of test cases is a tedious and time-consuming work.This article focuses on the design principles and generation method of SDN data plane software conformance test cases for P4 programming language, gives the conformance test case coverage standards,designs the command information entity structure and the test case entity structure, and uses the simple_switch virtual switch loaded with the P4 program as the test object to illustrate the conformance test case generation process.This paper also implements an automatic test case generation tool for P4 network device conformance testing, and verifies the effectiveness of the tool to automatically generate test cases, and realizes the simplicity of the conformance test case construction process