0


The iOS app that I am writing automation for, waits for 5 minutes before doing an activity and there are lot of cases I need to test when the 5 minutes are over. Is it possible to advance the app state to say 4 minutes and 15 seconds and then have every Appium test start from this point onwards so that overall my test suite runs faster - akin to having a save and restore state kind of facility? The default fullReset option is for a different purpose. Is there a way out?

thanks,
Paddy

3 Answers 3

1

Maybe You setting capability noReset to true will help?

2
  • Hi @Jakub, my understanding was that the noReset flag helps to avoid app installs before each test, can it be used to restore to a saved state, and start over again from that checkpoint dropping off any state transitions that happened after the checkpoint?
    – Paddy
    Jul 22, 2016 at 5:38
  • This won't work. Setting noReset to true would mean that you'd continue from the app's previous state. If you've already advanced past the 5 minute wait state, you would again open up the app past the 5 minute wait state.
    – abrarisme
    Jul 24, 2016 at 6:17
0

It sounds like you want to create a snapshot of the app state. From my understanding, this is not possible - so you're going to have to wait the full duration every time.

0

From my experience in most cases you don't wait X amount of time rather than wait for activity to happen - Sometime the way to approach it is to wait constant time assuming that by then the operation will end. I usually try to understand how i can validate that the action ended - E.g. check the back-end or DB status - Than you can build a function that wait until the status is ready for the next step.

1
  • Let me explain my case, my app waits for 5 minutes before posting activity details to server. So to test various scenarios of activity posting, I have to run every such test in isolation so that the activity log is cleared after the 5 minutes post to server and the log is now empty. If I run the tests in parallel, an activity from another test can enter the activity log history and asserting for expected results will become messier. Hope I am clear.
    – Paddy
    Aug 2, 2016 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.