Better Solution for holding app Finish after all UI tests finished

Asked

Viewed 23 times

1

I’ve been Working with iOS UI tests in the Past few few Weeks and Besides of KIF I’ve been using Fastlane as CI to check my code style and do other some Stuff like Releasing to Fabric and Testflight. One of the Great Features of Fastlane is 'snapshot', which takes screenshots of Every screen on Every language of the app and then gives you Everything on a silver Plate, Pretty Sweet. Problem is: It uses XCUI so it doesn’t work with KIF. I had to do a workaround that seems Pretty Much Hacky and Maybe there is already a Better Solution for this on the framework and I couldn’t find it, Anyways my problem was that after all the tests have finished I had to force a Waiting interval so I could upload screenshots that I Took programmatically. My Solution was to run a while loop with a flag being changed on a callback after the Completion block was called on the request. I don’t have the code snippet with me right now but I will Edit this Question soon with it. My Question Basically is: Is there a Better way to do this? I’ve tried to use semaphores and other GCD Stuff that didn’t work out, I was Always with deadlock or un-useful Wait. I Did Semaphore in distinct queues etc, Nothing of that worked... It’s not a problem for me to lock the main thread because this code will only run on a test Scheme.

  • You are asking in English at stackoverflow in Portuguese. Redo the question in Portuguese or post it at stackoverflow in English. I think you have a better chance of responding

  • You’re right, thank you. I’ll redo the stackoverflow in English. @L.Albano

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.