cancel
Showing results for 
Search instead for 
Did you mean: 

How to start an android application without having to install it everytime

SOLVED
Highlighted
Contributor

How to start an android application without having to install it everytime

Hello !

 

I am testing an android application on different mobile devices.

At the moment I use the ImageRepository which contains different screens for different mobile devices.

 

In order to make my tests independent from ImageRepository, do you know a method for starting the android application, but without installing the package everytime?

 

For instance if I use teh Run method with Launch property set to true, everytime the application is installed.

 

I am interested if it is possible to use something like this:

Mobile.Device().ShellExecute("am start -n com.package.name");

The Test Complete Log.Message(this command above) displays the help, and if I run it, the TestComplete Log displays Shell command was run.

 

I used this syntax and nothing happens.

I took a look here : https://stackoverflow.com/questions/6613889/how-to-start-an-android-application-from-the-command-lin...

 

Can you please make the solution more obvious?

 

Best Regards,

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: How to start an android application without having to install it everytime

Hi,

 

> Mobile.Device().ShellExecute("am start -n com.package.name");

This approach works. Though note, that (as it is mentioned in the Stackoverflow article that you referenced) not only the package name must be provided as a parameter for the 'am' command, but also the name of the main activity after the slash.

This is also described in the TestComplete help: https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/mobile/android/devic...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
2 REPLIES 2
Community Hero

Re: How to start an android application without having to install it everytime

Hi,

 

> Mobile.Device().ShellExecute("am start -n com.package.name");

This approach works. Though note, that (as it is mentioned in the Stackoverflow article that you referenced) not only the package name must be provided as a parameter for the 'am' command, but also the name of the main activity after the slash.

This is also described in the TestComplete help: https://support.smartbear.com/testcomplete/docs/reference/test-objects/controls/mobile/android/devic...

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Manager

Re: How to start an android application without having to install it everytime

Hi @hacka87,

 

Did Alex's reply help you? If so, please accept it as a solution so that it would be highlighted as the best answer.

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors