I did a few test cases by recording it.
I just wanna know, is there any other way for me to change all the input data (Start Application) for all test cases.
There is so many test cases created, i can’t change it 1 by 1.
I need to change to the new apk file.
HI @Chris_Trevarthen could you please assist me on this matters.
Because my team keep on giving me different apk files. So everytime i want run it, i need to change the apk 1 by 1 for all my test cases (100 +)
Please advise if there is any other way to make it easier
Then change all of your tests to take a variable as the apk name in the startApplication function:
import internal.GlobalVariable as GlobalVariable
String appFile = GlobalVariable.G_AndroidApp
MobileBuiltInKeywords.startApplication(appFile, false);
All you have to do to change the apk going forward is to update that global variable.
You said you had a lot of startApplication calls, so something to think about for optimization is to reduce the number of those calls - usually, I only have one startApplication for my entire suite of tests.
Starting and stopping the application between tests is usually unnecessary depending on whether you need each test to start from the beginning of the app launch. You might want to consider looking at Test Suites, if you haven’t already. Test Suites let you perform some action once, e.g. startApplication, and then run a bunch of related Test Cases together. Without knowing much about your testing, I don’t know if this would be useful, but I have found that it greatly reduced the delay between tests, shortening the overall test execution time.