Make test more automated and add travis hook