Regarding instrumentation test cases for APK - android

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.

Related

How to use Android UI Automator without access to source code

so I am trying to learn test automation on an Android, Basically I want to learn how to use Google's UI Automator, however, it seems like all tutorial that I could find requires me to have access to the source code of the app under test.
I found this repo AndroidTestWithoutSource it uses espresso but requires me to re-sign the APK.
My target environment basically is a production test environment I mean like install the app under test on an android device then connect the device to my PC through ADB, for learning purposes I like to test youtube or even the native settings app.
Is my goal even possible with UI Automator? like being able to test apps installed in the device like appium does?
I would really appreciate a sample to that launch youtube app just to get me started.
Thank you!
Yes you can for instance use UI Automator viewer to get the resource ids (textview ids, edittext ids, etc) you want to click or act on.
After that you can write a UI Automator test that starts the app you're going to test (having the package name) and acts on the resource ids you previously collected.
Hope this helps.

Automation of Android APK with UI Automator

I want to automate an Android app using Google firebase test lab. I came to know that there are 2 tools with which we can do this.
Espresso & UI Automator: To use Espresso we need the App source code, but while reading some articles I came to know that we doesn't need App source code for UI Automator. I have even tried to use app source code of an hybrid app and found that there is only one element for App and not able to proceed.
Can someone help me how to automate an android app using UI Automator without app source code. I have my apk with me and not able to find any solution to run automation scripts using it.
The only way to automate android APK without source code is to use Selenium WebDriver, Appium or some similar framework, especially when it is not a native application.
For native applications, I strongly suggest to use Espresso.

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?

how to do cross app automation testing for android

lots of apps now need to interact with other apps. i'll give some examples:
take picture by calling system camera
open url like http://www.shihuangzhilu.com in a browser
android instruments can only test one app per time. can we do automation testing here?
You can't explicit definitely not using the current testing framework of android.
What you can do is use robotium, and then check if you have gotten the values back, and that you are no longer within your application/activity, that's the only way i can think of.
Yes, you can test across applications, see monkeyrunner:
http://developer.android.com/guide/developing/tools/monkeyrunner_concepts.html
(not to be confused with Monkey, another android tool)

Categories

Resources