I am trying to set up a test environment or test data for Android. For example, I have a test case that sends a SMS and another that sends a MMS picture message. For the SMS test, I want the device to remove any previously sent messages so initially the messaging app does not contain any data every time the test is run. For the MMS test, I want the device to have a picture in it’s storage that can be selected to be sent.
Can Katalon Studio run adb commands? I have some test cases that require Wi-Fi disabled and Mobile data enabled and some that require both to be disabled.
Is there a way for me to set the test environment for these scenarios so the device is in a state ready to test?
My current solution is to create smaller test cases as Preconditions i.e. Turn on Wi-Fi, Delete Messages etc so these are run first before the actual test is run.
It’s a bit long and I would have preferred like a test state that could be loaded (like perhaps from a database) but this current setup will suffice for now
@thongnmtran - sorry to bother you again. Any idea how to load a test environment on a mobile device? In the past on web projects I’ve seen people use .xml files and load information from this to set the test environment in a specific state so I was wondering if something similar is possible with mobile devices.
I spend hours looking for the solution but there is still no hope… /=). Maybe I couldn’t help you this time.
I think the solution you have right now is the very best solution /=)
@thongnmtran oh wow, thank you for trying to look for the solution. I’ll stick to the way I’m doing it for now but I’ll continue looking to see if this is possible. I should send you a gift for all the advice and help you’ve shared. Thanks.
@mohammad.arif, yeah, you’re welcome /=). This is my duty, and I am very happy to help you too /=)
~ Happy testing!..