update Travis CI to xctool
improve unit test robustness