Added some ai testing code in swingTest