Improved test program and dynamic connection handling