So I am launching an application using launch application keyword but whenever I am launching the application app cache is getting cleared automatically. I tried using noReset = True and fullReset = False in my appium capabilities but it is not working it seems. I think there is some issue with noreset and fullreset.
What I actually wants:
I have my first test case where I will launch an application then login into my app and then after then login is successful my first test case is completed.
Then I move to the next test case where I will launch the same application using launch application keyword. So my application should be logged in at that time but as now it is taking me to the login screen only.
Thanks in advance✌🏾
Launch application keeps the same settings as Open Application. So, If you use the Open Application as default (clearing the cache), Launch Application will do the same. Solution is to use Open Application with noReset set to true and then Launch Application will no longer clear the cache
Thanks @zastress. After trying so many time I got the same solution. But thank you so much the reply though. This is the correct solution
What I recommend you do for your setup is:
- start first test case with open appplication and noReset=false
- execute login and other steps
- at the end of the test, close application and open it again with noReset=true.
This way, when test2 comes along with launch application it will no longer clear the cache. I have bren using this method successfully for quite some time
Oh I guess that’ll be better. Thanks will do the same. I have one more question. And that is I have around 40-50 test cases in regression. So I’m planning to automate all of them. What would you recommend to do it one suite or multiple suite? So should I open application just once and then use launch and quit application?
It all depends on what you want to achieve. Using Launch Application instead of Open Application saves time.