Is there a way to create an espresso test file from a class like does Command / Control+Shift+T?
Same for launch the current test with espresso into the device?
It's very annoying to create/launch every test manually through the whole process of going to the file's hierarchy and then create the launch configuration of it. Neither an option is hidden in options?
If I remember well, these functionalities were available on Android Studio 2.3, I noticed the lack of them from AS3.0. Where did they go?
As today, Android Studio 3.1.1 comes with the functionality just as before
Related
I am working on a Google glass Android app. I have installed the glass development kit (GDK) in Android SDK. Now I created a glass project using Android Studio (Version 3.3.2). The newly created project is showing an error "Default Activity not found" in run->edit configuration.
Please refer the screenshot for the error.
1.
And 2. By clicking run->Edit Configuration in menu.
I have searched a lot on Google and found many articles regarding the same. All are suggested to set the edit configurations option like below.
Module: app
Package: Deploy default APK
Activity: Launch default Activity
Target Device: USB Device
I did the same, but no one is working for me. After spending the whole day to make it work, I came here. This error is due to the Launcher activity, because there is no launcher activity in Google glass project instead it uses Voice Trigger intent filter. It is similar to wearable apps they also don't have the launcher activity.
Android Studio won't let you use a standard run configuration without specifying a launcher in the manifest.
You could try using the gradle command line instead:
./gradlew installDebug
In case you haven't resolved the issue. I came across similar issue before, two ways worked for me:
Choose "Nothing" as the option. You will be able to run the app manually on the Glass, but your debugger won't work straight away. You have to manually attach the debugger to the process. You may also have to use logcat if there is a bug in the launching process.
Specify an activity (whichever is associated with voice trigger).
Also, I noticed that you created the app using Kotlin. Kotlin activity didn't work in my case, throwing exceptions associated with nullable var when resuming the activity. Non-activity classes worked fine. Please let me know if Kotlin activity worked in your case.
Every time I want to do a quick test of some code, android studio takes 20-40 minutes loading an emulator which then either crashes my laptop or makes it run very slow. Is there any way to just use the system log without loading the whole app, similar to the System.out.Prinln() feature in net beans?
I understand that the question is about running your app for quick testing and not about automated tests. But you can learn a lot by trying to adapt writing tests, and they can help you to solve your problem.
1) For code without android dependencies you can write JUnit tests and run those just on JVM to test the code. Bonus: you'll start with creating your testsuite!
2) For code with android dependencies: a) Try to be better in separating platform specific code and internal logic so you will be able to cover more code with unit tests. b) You can use roboelectric and test everything without emulator/device for the rest.
I’m using Rational Test Workbench (RTW) for automatization of my mobile tests. I want to test only the newest version of my app, so I'm using the test variable RTW_Mobile_App_Selection within my tests.
I'm initializing it with the right value AlwaysUseLatestVersion but the when triggering the test over Rational Quality Manager (RQM) or RTW they always run with the old one. The newest version of the app is available on the workbench.
I’m trying to do it with Android apps. I’m always compiling the app from the same eclipse-project changing only the version and some lines of code. Do I have to set something special on the app side to make it work? How should it work?
Thanks for the help!
Edit:
I'm using worklight with android enviroment.
If you are not in silent install mode, you should have first install the new version on your phone/tablet.
Be also care to the case
I made a huge mistake testing this feature only with one testsuite. It seems the one I was trying to get it work with was somehow broken and took always version 1.0. I tried it today with another testsuite and it worked like a charm.
I am using Robotium to test the GUI in my Android application. When I run my tests through eclipse they all pass without a hitch, however when I run them through maven the tests seem to fail randomly. The activity screens can sometimes hang before the crash, other times I get the error that the text to be clicked on cannot be found, when I can see it on the emulator. I have solo.waitForText() and solo.waitForActivity() in all the necessary places and have tried many different code rewrites but I get the same issue every time.
Has anyone else come across this issue with Robotium and found a solution? It is a fantastic framework and allows thorough testing of applications so I would like to use it if at all possible.
Chuck
Please update Robotium to version 3.4.1. The issue that you are describing has been fixed in the new version.
If your issue still exists in 3.4.1 please file a defect report on:
http://code.google.com/p/robotium/issues/list
I created an Android test project using instrumentation and it works find with eclipse running as Android Junit test. It also generated apk file.
My question is how do I run this test from another android application instead of from eclipse. For example, if the test project is named T and I have another Android application named A. Then I would like to open up T from A.
Thanks in advance..
I think it will be good if you try to call the appropriate intent on a button click or on whatever you want to start the program. For example:
startActivity(new Intent("com.yourprogram.T") I'm not sure but i think it will works.
Why do you need to open Test project from an app on Device. I dont think you can do it because Android does not allow any app to inject action or call functions from other apps.