How to run Robotium test on real phone - android

I have and compiled .apk (rather than project source files) which I would like to test on my phone with Robotium.
How should I setup test to run it on my phone?
I'm confused because in every tutorial about Robotium these information that I should create an application project and launch the tests from that, but I have only .apk file (which i don't want to modify) and I want only to automate testing it on my phone.
TL;DR
How should I create test case to application which .apk i CAN'T open and it is on REAL device plugged via USB.

hope this helps
RobotiumForAPKFiles
Blackbox Tutorial 1
Blackbox Tutorial 2

Related

Are there ways to run testing scripts on an Android device directly?

I am currently testing an app for Android phones using the Espresso library with local devices as well as the Google Firebase Test Lab. For a good portion of these tests to be functional the phone running the test needs to connect to another phone or at least receive feedback from another device. I have been trying to do some research but really can't find anything on what I'm looking to do, seeing that it isn't a common practice.
Is there away to run Espresso or any small script directly on an Android device? I just need a script to sit idle or looping until it receives the information from the tested device, accepts it so the test can continue. I am not trying to alter any direct code in my app to auto accept things, I want to keep the app itself as untouched as possible. And I could manually do it on a small scale, but with Firebase I would like to test lots of devices at once or will run tests daily, sometimes when I'm not there for feedback. I want to automate this process as much as possible, so anything that could do that would help.
I've automated this process completely. The best thing is that you don't have to keep busy of your Android Studio and resources. Everything is done remotely.
You can use this plugin to setup Firebase test lab:
https://github.com/piotrmadry/firebase-test-lab-gradle-plugin
Hopefully you have CI (Continuous Integration) for your project.
So after your setup for test lab (you can define as many devices as you want)
You can create 2 parallel jobs on you CI:
First - it would build your project in normal way
Second - would run android task created by plugin ./gradlew uploadTestLab. After this job you will be able to look at results in Firebase Console.

Regarding instrumentation test cases for APK

I have developed an Android application that parses RSS feed from a website.
I have developed instrumentation test cases for application since I have access to code. So far everything is ok.
Now I want to ask is there any way or is it possible through which I can develop instrument test cases for apk when I don't have access to code.
If yes then what are all components in Android that can be tested through.
Thanks in advance
Now I want to ask is there any way or is it possible through which I
can develop instrument test cases for apk when I don't have access to
code.
You can test it using Appium
If yes then what all components in Android can be tested through.
I have tested UI and flow for app.

Run automation test on android device from a automation app

I want to make an android app which will install and start another app and then perform the UIautomation tests on that app.
Well currently i know how to intall another apk from my app , but the question is can i call the UIautomation from my app for anther app in question.
I want my app to work as a tool to work as a automation tool which will start automation of a particular app without going through the adb commands of pushing the automation jar and starting the test.

Does Robotium test an Android apk which are installed in /data/app location without having the source code?

I am new to Robotium. I want to test my mobile application using Robotium . I want to know whether it is possible to test the app with only having .apk file without having the source code of app , having only the source code of test app using Robotium . If possible for these kind of apps may i know the process to do it...which means how we can follow the process.....
Note : I want to use only my app(.apk) and my test app(.apk) with these two apks whether it is possible or not.
Just go here to the Robotium tutorial page and look into the Test Android Calculator APK Black Box Testing pdf for an example on how to do blackbox-tesing with Robotium.
Of course you need the source code of your app in order to prepare the APK file. Otherwise using Robotium to make automated inputs to arbitrary APK's is not possible.

chossing robotium or monkey runner for writing a automated application runner on downloaded apk

I am working on project, which needs to track information android application sharing, I will not have access to source code of application being tested just apk file.
The typical synario is
1.User sends application apk to system
2.System runs(by giving inputs, filling information) application on many emulators,ex. as some applications don't do anything till they are registered
3.Gather with whom application shared all information and report it to user
I was looking for differences between the two (monkey runner and robotium), when I found out
How to use MonkeyRunner and Robotium together (not separately!)
it says, Robotium require code access.
But Robotium tutorials does have Black box testing which test apk file.
I want to know which one will better suit my needs?

Categories

Resources