Android :: Isolating Units / Writing Tests
Jul 23, 2010
My project has the run-of-the-mill HTTP calls to fetch XML files, parsing the XML files, and creating domain objects. Those objects are later used in the actions and services of the Android app, I'd like to isolate that code. I also want to write tests for it. What are some good ways of doing this? Creating an Android Library doesn't seem appropriate. The tests would have to be in a separate project. And there are no services or activities in the extracted HTTP and XML related code. So the test suite doesn't have to be an Android test suite, it could be regular JUnit tests.
View 2 Replies
Aug 6, 2010
"Hello, World" and "Hello, Testing" tutorials I created an android application created with Eclipse, along with a corresponding Android Test Project.The tests run fine once. After that, in order for me to run the tests again, I have to close the emulator.If I don't close the emulator, the Eclipse console get stuck on "Installing instrumentation android.test.InstrumentationTestRunner on device emulator-5554"... Nothing happens after that.I've been told to exit out of the application under test in the emulator in order to run the test again. Unfortunately the emulator doesn't have the app pulled up (it's in the normal "locked" position and when unlocked brings up the home screen) and even if I do pull it up then exit, it doesn't seem to let me run my tests again.All the example videos and tutorials all stop at the first run of a test. I have yet to see anyone anywhere run a test a second time!
View 1 Replies
View Related
Jul 8, 2009
This may be in the wrong forum, but I can't figure out where else to post it.
The maps app (the one from google your phone comes with by default) only shows routes in feet and miles. Is there no way to get it in meters? I can't find any settings for this!
View 1 Replies
View Related
Mar 20, 2010
I'm starting to design my object graph for an OpenGL ES 1.1 app on Android. What's advisable when it comes to actually drawing my triangles and controlling their size? Should I store all the vertices in units relative to each other and then multiply them by a value I pass during a draw(GL10 gl)? Would this approach have any impact when it comes time to do frustum culling?
View 1 Replies
View Related
Aug 23, 2009
I am experimenting with orientation sensor, register it like this: SesnorManager sensor_manager = (SensorManager)getSystemService (Context.SENSOR_SERVICE); Sensor sensor_orientation = sensor_manager.getSensorList (SensorManager.SENSOR_ORIENTATION).get(0); sensor_manager.register Listener(sensor_listener, sensor_orientation, SensorManager.SENSOR_DELAY_UI); and then read the orientation values in the sensor event listener: private final SensorEventListener sensor_listener = new SensorEventListener() { ... float sensor_data_x = event.values[SensorManager.DATA_X];}
View 4 Replies
View Related
Nov 2, 2012
How many storage units Android OS have? Including a possible microSD external Card.
Internal Storage, internal memory?! Whats the difference and location in file system folders?
When an app is installed from market where does it go?
In application manager, in most apps there is an option "Move to SD card"...
If I have an external micro SD Card and choose this apps option "Move to SD card" where the heck is suppose to going the app or some part of it? (Data? Apk? Cache?) It's not in external microSD Card! So what is "Move to SD Card".
View 4 Replies
View Related
May 4, 2009
I live in an area which is 9 feet above sea level, and when I call getAltitude I get back a value less than -10. Am I doing something wrong, is my device a failure, or is there some nifty scale that I don't know about?
View 2 Replies
View Related
Feb 24, 2010
1) I have not been able to find out in which units Location.distance Between receives the latitude and longitude. Is it degrees or micro degrees? Whats the unit for the distance returned? 2) In windows XP using Eclipse 3.3.2. Emulator does not send coordinates properly. Either it by hand or by loading a gpx file the location Listener is not invoked. This same code I have tried it in Ubuntu and works fine. Does someone know how can I solve this? In the office there is no linux installed and I can take my personal laptop.
View 2 Replies
View Related
Apr 30, 2010
this is just an issue with how the emulator is setup, but I'm not sure.
I'm (natively) calling this:
int maxt = 0;
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &maxt);
__android_log_print(ANDROID_LOG_VERBOSE, "Native", "Max textures %d", maxt);
This only outputs 2... could it be possible that I'm going to be allowed only 2 textures? That seems impossible... GL_MAX_TEXTURE_SIZE reports 4096 which is more than enough. I suppose you could lay everything out on a couple of 4096x 4096 images (seems a bit crazy) but anyway... Am I just running into one of things that will be different per phone processor?
View 9 Replies
View Related
Aug 1, 2010
I've got the hard-coded layout, consisting of buttons, and need to enlarge some of them. I found Button's method setWidth(int value), accepting width in pixels, but I need to set value in dp. So, how can I set dp value in program code?
View 1 Replies
View Related
Aug 13, 2009
in xml file we can define measuring units along with the values. If I want to set some property through code it only takes "int" value. What is the default unit for this int? px(pixels) or dp(density independent pixels) ?
View 7 Replies
View Related
May 15, 2013
I have seen several 2DIN car headunits that has Android 2.3 supports FM Radio and Handsfree and can be controlled through the UI itself. how is it implemented?
eg: In eBay, search for item No : 130862564199
View 1 Replies
View Related
May 15, 2010
I just played with a test unit in Atlanta at the South Cobb Radio Shack store. It was a sprint employee who is making the rounds to different stores and talk to customers. Freakin' sweet. I have to run to a b'day party, but it is beyond amazing. Not too heavy, fits in your pant pockets very well. Meow!
View 12 Replies
View Related
Jun 9, 2009
I've got unit tests which are subclasses of AndroidTestCase, I thought they were just taking awhile to run, but for some reason when I run them via Eclipse, they actually run twice. I can verify this in LogCat after the Console outputs "Launching instrumentation android.test.InstrumentationTestRunner on device..." the first run starts, which is only visible via LogCat. Then the JUnit pane comes to life and starts tracking the second run.
View 2 Replies
View Related
Sep 16, 2009
Can you please tell me the process for running the tests on device? currently I am using the eclipse IDE to run the tests as Android Junit tests. And I would like to run the unit tests on device.
View 2 Replies
View Related
Sep 19, 2010
I need to run the skia_bench and surfaceflinger tests.I have downloaded the eclari source code and compiled it with debug option.After compilation I am able to launch the emulator with the target debug image. Now the question is how can I run the skia_bench or surfaceflinger tests (which are available in android source code).
View 1 Replies
View Related
Dec 6, 2009
Is it possible to run some android tests for example: AndroidTestCase without using emulator?
View 2 Replies
View Related
Feb 1, 2010
In order to release a device to the market, You need to run the Compatibility Test Suite given by android...I need to know how to download and run it..
View 3 Replies
View Related
May 8, 2010
1st month, US sales...the EVO vs the new iPhone - which will sell more units?
View 45 Replies
View Related
Aug 5, 2009
I'm getting VerifyErrors when running unit tests. My tests are setup as a separate eclipse project which references the project I am testing. I have a class in my project which I use fairly heavily in my test project and this class is getting rejected by Dalvik.I also have a third party jar on the build path of both the project under test and the test project. This causes no problems when running the project under test so I can't see why it should when running the test project, basically I'm stumped. I have posted the error text below, MyProjectClass is a class in the project under test which is used fairly heavily in the test project.
View 7 Replies
View Related
Feb 19, 2010
Can someone advise the am command (for adb shell) to run junit tests in the main thread please? The following shows onStart etc running in the test runner thread. am instrument -w -e class co.uk.telesense. tests.MyTest co.uk.telesense.tests/android.test.InstrumentationTestRunner Ewan Benfield ttp://www.telesense.co .uk tel: 0845 643 5691 (+44 845 643 5691) mob: +44 (0) 77859 26477
View 2 Replies
View Related
Oct 3, 2009
I got a problem launching unit tests. I did: * new android project in eclipse, new android test project in eclipse * added one test case, added one test suite * run as-> android junit test hangs on "Launching instrumentation android.test.InstrumentationTestRunner on device emulator-5556".I got eclipse galileo, newest ADT and android 1.6 sdk
View 5 Replies
View Related
Jan 19, 2010
I am writing my first Android database backend and I'm struggling to unit test the creation of my database. Currently the problem I am encountering is obtaining a valid Context object to pass to my implementation of SQLiteOpenHelper.Is there a way to get a Context object in a class extending TestCase? The solution I have thought of is to instantiate an Activity in the setup method of my TestCase and then assigning the Context of that Activity to a field variable which my test methods can access...but it seems like there should be an easier way.
View 3 Replies
View Related
Sep 4, 2009
How to get the junit test results from eclipse to an XML or any logfile?
View 2 Replies
View Related
Dec 12, 2009
We ran core tests by the command "/development/testrunner/runtest.py - v --coverage core" and got coverage report successfully. But the reports says all are 0%. We ran apidemos and got coverage report which looks good.
Below is the console output for core tests:
CODE:.............
So I wonder why core tests's coverage report says 0% and how can I make the report make sense.
View 2 Replies
View Related
Dec 23, 2009
If u have downloaded any android source code u would see a test folder present for almost all applications and base framework. I wanted to know whether we build the test code too while building sdk from source code or is it just for our reference. If it is for the latter, what is the best way to use it. Please post me the exact use of tests present in android source code.
View 2 Replies
View Related
Apr 19, 2010
Does anyone know when display units will be available to try out in the Verizon stores? Will they not be there until the 4/29 release date? I'd really like to have the hands-on opportunity before I plunk down a couple of Benjamin's on this phone.
View 6 Replies
View Related
Mar 22, 2010
We are able to run instrumentation tests of Android from the command line on Windows by launching: adb shell am instrument -w <package.test>/android.test.InstrumentationTestRunner. This gives us good results. Using the same architecture, we are unable to run the same in Kubuntu. We have the same setup in Kubuntu. Can someone let us know, if there are packages with same name.. Then what package will the adb shell point? How will the emulator connect with adb shell from cmd line? DO we need to do any changes to do so in Kubuntu?
View 1 Replies
View Related
Jul 21, 2010
I'm trying to run unit tests on the android platform in accordance with tutorial. Say, for example, I want to run tests for Email application. I open /apps/Email/tests/AndroidManifest.xml file, look for the <manifest> element, and look at the package attribute, which is com.android.email.tests, and in the <instrumentation> element I look at the android:name attribute, which is android.test.InstrumentationTestRunner.
View 3 Replies
View Related
Mar 12, 2010
I get the following stack trace when running my Android tests on the Emulator code...
I run my tests from an extra project. And it seems there are some problems with loading the classes from the other project. I have run the tests before but now they are failing. The project under tests runs without problems.
Line 14 of the Helper Class is:
this.httpHelper = new HttpHelper(userProfile);
I start a HttpHelper class that is responsible for executing httpqueries. I think somehow this helper class is not available anymore, but I have no clue why.
View 1 Replies
View Related