improve devices connection methods in tests