Unit testing and the tests themselves are written by humans. Humans are prone to error. Unit tests and the testing infrastructure can be imperfect. The
test_centerplugin includes tools that remove (or alleviate) the effects of an imperfect test infrastructure.
(fastlane is a popular way to automate building/releasing iOS and Android apps.)