Ask a Question

Start Appium mobile test without reinstalling the app

SOLVED
slecault
Contributor

Start Appium mobile test without reinstalling the app

Hello,

 

New to Appium mobile testing (try to migrate from legacy mobile testing:-).

 

How do we run a mobile test without re-installing the mobile app each time.

Current situation:  our app has different behavior on first opening, then need to authorize device acces (photo, position...). 

I want to run tests using an already running app (appium session).

 

I have tried with capabilities, but did not get it working yet.

 

Here are my Android capabilities (Physical Android device connected USB to local Laptop, running Appium server locally also).

 

var capabilities = {
"app": "c:\\TC\\Android\\MyApp\\myCie-5.2.40118.2_Emulator.apk",
"appPackage": "com.myCie.pjc",
"appActivity" : "myCie.views.pages.root.RootPage",
"noReset" : "true",
"fullReset" : "false",
"automationName": "UiAutomator2",
"deviceName": "Huawei P20",
"newCommandTimeout": "600",
"platformName": "Android",
"udid": "xpnxxnppxnx"
};

Win10 / Server 2016 - Testing Delphi Application, Dynamic AX, Web, Mobile app iOS and Android, TC 14 and TestExecute
1 ACCEPTED SOLUTION

Accepted Solutions
hkim5
Staff

Re: Start Appium mobile test without reinstalling the app

this is pure guesing, but :

 

with the caps you have here:

"appPackage": "com.myCie.pjc",
"appActivity" : "myCie.views.pages.root.RootPage",
"noReset" : "true",
"fullReset" : "false"

 

i feel like you can get rid of the "app" capability to the the path of your apk, and given the app is already on your android device, appium should be able to start the app given the 4 caps above without reinstalling from scratch.

Best,
Justin Kim

View solution in original post

3 REPLIES 3
hkim5
Staff

Re: Start Appium mobile test without reinstalling the app

this is pure guesing, but :

 

with the caps you have here:

"appPackage": "com.myCie.pjc",
"appActivity" : "myCie.views.pages.root.RootPage",
"noReset" : "true",
"fullReset" : "false"

 

i feel like you can get rid of the "app" capability to the the path of your apk, and given the app is already on your android device, appium should be able to start the app given the 4 caps above without reinstalling from scratch.

Best,
Justin Kim

View solution in original post

hkim5
Staff

Re: Start Appium mobile test without reinstalling the app

also, i feel like it shouldnt be reinstalling from scratch for android devices as per appium capabilities docs state:

enforceAppInstall By default application installation is skipped if newer or the same version of this app is already present on the device under test. Setting this option to true will enforce Appium to always install the current application build independently of the currently installed version of it. Defaults to false.
Best,
Justin Kim
slecault
Contributor

Re: Start Appium mobile test without reinstalling the app

Thank you hkim5,

 

Tried previously, obviously something was not ok at that time.  The setup is currently not well known by myself. All from the laptop and physical device. I need to learn the sequencing:  

Plugin device

Allow file transfer on device

Start Fiddler (need to redirect app traffic to work office)

start Appium

Start Session (appium)

Run test from TC!

 

Last attempt work after removing "App" capability. It did restart the my app, but I am guess this is related to Mobile.Connect...

 

I continue from here.

 

Win10 / Server 2016 - Testing Delphi Application, Dynamic AX, Web, Mobile app iOS and Android, TC 14 and TestExecute
cancel
Showing results for 
Search instead for 
Did you mean: