This invention discloses an online editing and parallel execution method and
system for vehicle network test cases, relating to the field of vehicle
network testing technology. It establishes an online editing environment via a web interface, enabling automatic generation of protocol code and providing testers with a convenient and efficient development experience. Regarding
test case execution, it accurately analyzes the dependencies of test cases, uses a topology
sorting algorithm to construct a reasonable
execution plan, and adaptively switches between sequential and parallel execution
modes. Combined with
containerization isolation technology, it allocates an independent execution container for each
test case, ensuring the isolation and stability of the testing environment. Simultaneously, it initializes a unified
test execution context for each
test case and establishes a communication connection with the vehicle network
bus simulation engine through a standardized interface, achieving
standardization and normalization of operations such as message sending and receiving,
fault injection, and assertion
verification. In variable management, it adopts a copy-on-write mechanism to achieve isolated sharing of project variables, avoiding data
crosstalk.