diff --git a/testing.md b/testing.md index 0d4ad2ea8a69b232c9cfa49928c89f62538891f0..c79f88b568cb29bab5d702838ba6a341fbfe6635 100644 --- a/testing.md +++ b/testing.md @@ -1,25 +1,34 @@ Testing Plan + Unit Tests: Validate each function separately in both the C/C++ and Python implementations. + Integration Tests: Test the complete communication flow between the Raspberry Pi Pico and the PC. + Error Handling: Simulate error conditions such as lost packets or corrupted data to test the protocol's robustness. + Unit Tests + C/C++: Test protocol_init to ensure UART initialization. Test protocol_send and protocol_receive for data transmission and reception. Test calculate_checksum for correct checksum calculation. + Python: Test connect and disconnect methods for proper serial port handling. Test send and receive methods for data transmission and reception. Test calculate_checksum for correct checksum calculation. + Integration Tests Establish a connection between the Raspberry Pi Pico and the PC. Send a variety of data packets from the Pico to the PC and verify correct reception. Test with varying payload sizes and types. Verify error handling by introducing intentional errors in the packets. + Error Handling Checksum Mismatch: Verify that corrupted packets are detected and handled. Lost Packets: Ensure sequence numbers are used to detect and handle lost packets. -Conclusion + +Conclusion: By following these steps, we have created a custom communication protocol that effectively transmits data between a Raspberry Pi Pico and a PC using UART. The protocol design ensures data integrity and reliability, while the implementation provides a practical means of communication. \ No newline at end of file