mercredi 8 mai 2019

iOS Unit/UI Test XIB File (to check it exists)

I would like to have some unit/ui test in place that will launch a ViewController with all the available XIB files in the app folder directory.

I would like to simulate a situation where in case one of my XIB file in the project is missing from the project.pbxproj file reference and hence I forgot to add it to the project through Xcode, but that file do exist in the folder as a raw file, I would like the test to fail and to alert me about this.

This in order to avoid that in some merge situation one of the reference get removed accidentally for a XIB file and somehow when a user will trigger the ViewController that is linked with that particular XIB file the app would crash, and I would like to avoid and prevent that through unit/ui tests if possible.

Aucun commentaire:

Enregistrer un commentaire