A closed-loop system automates the testing of medical devices. The system includes a medical device, a testing device, and a computer. The medical device has a tube for transporting a fluid and is programmed to perform various tests. The testing device is connected to the tube of the medical device to measure various parameters related to the tests conducted by medical device. The computer is electrically connected to both the medical device and the testing device for substantially automating the testing of the medical device.