Connect to db and run tests