Android :: How To Build Ctsand To Add And Run Your Test Case
May 13, 2010
From 2.0 the cts is freely downloadable from android's repository.
But there is no documents about it.
Does anyone can tell me:
How to build cts? Is there a standard procedure? How to run cts? How to add customized test case?
Here, share my experience. After repo sync all source, you can't directly run "make" to build all source.
You will get some errors.
Now, I'am trying to first build android source without cts, and then build cts alone.
Also, here are some reference for run cts:
http://i-miss-erin.blogspot.com/2010/05/how-to-add-test-plan-package-to-android.html
www.mentby.com/chenny/how-does-cts-work-where-can-i-get-the-test-streams.html
www.jxva.com/?act=blog!article&articleId=157
1st time Update @ 5-13 18:39 +8:00
I do the following steps:
1.build android source without cts (move cts out of the $SDK_ROOT).
2.build cts (move cts back).
both jdk1.5 and 1.6 have the following errors:
CODE:.....................
View 1 Replies
Dec 8, 2009
I have added the "android.test.runner" user library and "android.test.InsturmentationTestRunner" in instrumentation. But when i run the test in Instrumentation, 0 test has been run.
My test class is as below: package com.android.ProjectTest.test;
CODE:................
View 2 Replies
View Related
Oct 20, 2010
I am working on android automation ,and i am new to this field , i went through the test example available at developer site and i am getting
11-05 14:43:14.509: WARN/TestGrouping(1485): Invalid Package: '' could not be found or has no tests
as error on running this code .
CODE:.................
View 2 Replies
View Related
Feb 11, 2009
I have an instrumentation test case that is waiting for an incoming call. I would like to abort this test case after some time from outside of this test case. Is there any argument to "adb shell am instrument" command that will stop the on going instrument test case?
View 2 Replies
View Related
Oct 23, 2009
I have downloaded donut branch and build for emulator. I am running the author test case in the following way cd /data;test_pvauthorengine -test 5 5 -video yuvtestinput.yuv - videoconfigfile mp4_config.cfg -audio amrtestinput.amr - audioconfigfile amr_config.cfg -output mp4.3gp Starting Test 5: AMR & YUV to AV using M4V Encoder .3gp Test PVSCHED:Scheduler 'PVAuthorEngineTestScheduler', Thread 0xafe43c24: Error! AO PvmiMIOFileInput Error 101 not handled PVSCHED:Scheduler 'PVAuthorEngineTestScheduler', Thread 0xafe43c24: Error! Reason 101
View 3 Replies
View Related
Mar 18, 2012
I am adding an android testcase for the UI. I have been following the tuto for the Spinner Test.Unfortunately I have a nullpointerexception on a object medtSalePercent.setText("10"); which has been initialised.
Code:
import jle.base.WorkActivity;
import android.test.ActivityInstrumentationTestCase2;
import android.widget.EditText;
import android.widget.TextView;
[code]...
There is no exception on medtPriceValue.setText("50");.but there is one on the screen for medtSalePercent.setText("10");
View 4 Replies
View Related
Sep 8, 2009
How to start/bind a service from a test case. I tried using the ServiceTestCase and somehow I am getting the context as null and the test is not launching/starting the service.
View 2 Replies
View Related
Jan 29, 2009
When implementing an ActivityInstrumentationTestCase, how do you start the activity with a Bundle of saved state?
View 2 Replies
View Related
Jan 28, 2009
I am trying to run Junit test case for the android APIDemo project under eclipse. I create an eclipse project from the APIDemo source, it compiles fine and then I did: 1. Debug->Run as Junit tests
But I get this error: 'Lanuching AllTests' has encountered a problem. Cannot connect to VM...................
View 9 Replies
View Related
Jan 9, 2010
After following some instructions on Diego Torres blog I am able to test my classes using the regular Eclipse JUnit test-runner, however I also want to be able to run my unit tests from within the emulated android environment. For now this should make no real difference since the classes I am working on do very basic numerical or networking tasks, but obviously anything which involves the UI or Android API specific functions can only ever be tested on the emulator.
I set up a new run configuration of type AndroidJUnitTest wich uses the ndroid.test.InstrumentationTestRunner, however whenever I fire up the test I get the following error in the console:
[2010-01-09 00:45:23 - Pal1]Uploading Pal1.apk onto device 'emulator-5556'....................
View 1 Replies
View Related
Mar 17, 2010
I have a module called MyApp, and another module called MyAppTests which has a dependency on MyApp. Both modules produce APKs, one named MyApp.apk and the other MyAppTests.apk.I normally build these in IntelliJ or Eclipse, but I'd like to create an ant buildfile for them for the purpose of continuous integration.I used "android update" to create a buildfile for MyApp, and thanks to commonsware's answer to my previous question I've been able to build it successfully using ant.I'd now like to build MyAppTests.apk using ant. I constructed the buildfile as before using "android update", but when I run it I get an error indicating that it's not finding any of the classes in MyApp.Taking a que from my previous question, I tried putting MyApp.apk into my MyAppTests/libs, but unfortunately that didn't miraculously solve the problem.
View 1 Replies
View Related
Mar 18, 2010
I have a module that builds an app called MyApp.I have another that builds some testcases for that app, called MyAppTests. They both build their own APKs, and they both work fine from within my IDE. I'd like to build them using ant so that I can take advantage of continuous integration.Building the app module works fine. I'm having difficulty getting the Test module to compile and run.I used android create test-project -p MyAppTests -m ../MyApp -n MyAppTests to create the necessary build files to build and run my test project. This seems to work great (once I remove an unnecessary test case that it constructed for me and revert my AndroidManifest.xml to the one I was using before it got replaced by android create), but I have two problems.Any idea what's causing the "Class ref in pre-verified class resolved to unexpected implementation" error?
View 3 Replies
View Related
Aug 22, 2010
I cannot test build Android application on my HTC Evo at all. I searched online for answers, but nothing helped, including updating all the software. The Eclipse launched Emulator doesn't recognize it as an external device either.
View 1 Replies
View Related
Mar 8, 2010
I just switched the way my Android project is being built and non of my unit tests work any more...I get errors like WARN/dalvikvm(575): VFY: unable to resolve static field X in WARN/dalvikvm(575): VFY: unable to find class referenced in signature These errors only come from my Unit Tests, where classes defined in it can't even see other classes defined in the unit test. Before each project had it's own directory with copies of the 3rd party jar files. I've read around that Dex does weird things with references but haven't been able to figure out how to fix this problem. Is there a better way to do this? I would love to see an example of a large Android workspace where there are multiple projects, jar references, etc.Is it possible to fix this with an Order/Export tweak ?
View 3 Replies
View Related
Oct 1, 2010
From my activity I do startActivityForResult(MediaStore.ACTION_IMAGE_CAPTURE),and then I land in the builtin camera activity (in this case in the emulator).in my testcase, it does not find ANY button (null is found for index=0).How do I write a Solo/Robotium testcase that uses the builtin camera to take a picture ?
View 1 Replies
View Related
Aug 4, 2009
While running i am getting this error in my logcat and my app exiting automatically...
CODE:....................
View 3 Replies
View Related
Sep 24, 2010
I'm writing an Android JUnit test and want to copy/reset a test fixture file (it's an SQLite database file.) If I were within the main application, I know I could just place the file in the assets directory and use getResources().getAssets().open(sourceFile).However, this API appears to be unavailable from the ActivityInstrumentationTestCase2 class.Is there an easy way to copy a file over from the testing PC, or should I just keep a fresh copy of a test fixture on the device and copy it over a temporary file?
View 2 Replies
View Related
Aug 23, 2009
I am using ActivityInstrumentationTestCase2 to do some test for an activity. I get a button in the setUp() method like this: protected void setUp() throws Exception {super.setUp(); act = getActivity(); btn = Button)act.find ViewById ( R.id.bike_button ); // this button has been defined in layout} Then I use this button to perform a click in a test method like this: public void testBikeButton(){ //click the bike button btn.performClick();}
View 7 Replies
View Related
Aug 11, 2010
I have never used JUnit before, and now I'm trying to set it up on an Android project.My project under test is fairly complex, including some JNI, but my test project, at the moment, is completely trivial. I have found many examples (that look totally different) online of how to make a test project, but it seems that no matter which one I follow, I get the same results.Here's my JUnit project code:package com.mycompany.myproject.test;
import android.test.AndroidTestCase;public class SimpleTestCaseExample extends Android TestCase {public void test_testOne() {fail("Just Always Fail");When I run, I see the following in Logcat:
stdout INSTRUMENTATION_STATUS: numtests=2
stdout INSTRUMENTATION_STATUS: test=test_testOne
stdout INSTRUMENTATION_STATUS_CODE: 0
stdout INSTRUMENTATION_STATUS: id=InstrumentationTestRunner
stdout INSTRUMENTATION_STATUS: current=2
stdout INSTRUMENTATION_STATUS: class=com.mycompany.myproject.test.SimpleTestCaseExample
stdout INSTRUMENTATION_STATUS: stream=
stdout INSTRUMENTATION_STATUS: numtests=2
stdout INSTRUMENTATION_STATUS: test=testAndroidTestCaseSetupProperly
stdout INSTRUMENTATION_STATUS_CODE: 1
stdout INSTRUMENTATION_STATUS: id=InstrumentationTestRunner
stdout INSTRUMENTATION_STATUS: current=2
stdout INSTRUMENTATION_STATUS: class=com.mycompany.myproject.test.SimpleTestCaseExample
stdout INSTRUMENTATION_STATUS: stream=.
stdout INSTRUMENTATION_STATUS: numtests=2
stdout INSTRUMENTATION_STATUS: test=testAndroidTestCaseSetupProperly
stdout INSTRUMENTATION_STATUS_CODE: 0
stdout INSTRUMENTATION_RESULT: stream=
stdout Test results for InstrumentationTestRunner=..
stdout Time: 0.07
stdout OK (2 tests)
stdout INSTRUMENTATION_CODE: -1
But, I get the following in the Console:Launching instrumentation android.test. Instrumentation TestRunner on device emulator-5554 Collecting test information Test run failed: No test results I have tried a variety of different things, messing with the basic TestCase class, or the TestSuite class, or a variety of other options. I tried to just go for the most trivial example because I'm really still trying to learn how this works.Whatever I try, I see this error.
View 1 Replies
View Related
Nov 9, 2010
I'm working on a school project and I'm researching testing possibilities for Android applications. On this page: http: // developer . android . com/ resources / tutorials /testing /hello android. Google writes about a unit test. Is this really a unit test? A Unit test will not integrate all classes and will not test in his context. So my opinion is it is not a Unit Test but an Integration Test.
View 7 Replies
View Related
Jun 24, 2010
I downloaded the Android 2.2 source code and try to build it. When I executed the make command, I got an error here like this build/core/java.mk:20: *** frameworks/ex/common: Invalid LOCAL_SDK_VERSION '8' Choices are: current 4 5 6 7. Stop. Then I changed the frameworks/ex/common/Android.mk to LOCAL_SDK_VERSION = 8 from LOCAL_SDK_VERSION = 7. Next place, build/core/java.mk:20: *** external/jsr305: Invalid LOCAL_SDK_VERSION '8' Choices are: current 4 5 6 7. Stop. I changed the external/jsr305/Android.mk to LOCAL_SDK_VERSION = 8 from LOCAL_SDK_VERSION = 7
Last one, build/core/java.mk:20: *** external/guava: Invalid LOCAL_SDK_VERSION '8' Choices are: current 4 5 6 7. Stop. I changed the external/guava/Android.mk to LOCAL_SDK_VERSION = 8 from LOCAL_SDK_VERSION = 7
By these changes the code started the compilation.
1. Why the error occured?
2. Changes which I did is correct or not?
View 3 Replies
View Related
Jul 15, 2010
One more video about the fancy touchscreen of the Droid X. This one has happier results! Check it out at the link below.Droid X Touchscreen Test See you later. you'll know why this post is short when you read the blog. running downstairs!
View 5 Replies
View Related
Nov 10, 2011
I have a project (that compiles and runs in the emulator.) I have a test project that tests part of this project. This test project also compiles with no problems, but when I try to run (test) it in the emulator, I get a NoClassDefFoundError exception on one of the classes my test class tests (I hope that made sense!) when it starts to run in the emulator. This is coming out of the adb log. I looked in the bin directory (of the test project) for the missing class, but could not find it... Should it be there? I found no reference (apk, etc) of the project I am trying to test either in the test projects bin directory. How does the test project get the classes it needs to test against (in the classpath, I assume.) How do the tested classes get moved to the emulator? I did try running the app before testing, so I know it is installed and runs correctly. BTW, I am using netbeans with the nbandroid plugin.
View 1 Replies
View Related
Jul 16, 2010
I am unable to integrate Junit with Android. I am using Junit 3, I have also tried Junit4.
package* com.android.test;
import* com.android.MyActivity;
import* android.app.Activity; *
import* android.test.ActivityInstrumentationTestCase2;
public* *class* TestMyView *extends *
ActivityInstrumentationTestCase2<MyActivity> {
Activity myActivity ;
*public* TestMyView(String pkg, Class<MyActivity> activityClass) {
*super*(pkg, activityClass);
myActivity = getActivity() ;
View 3 Replies
View Related
Feb 21, 2013
I have a phone with a MT6577. The vendor (Wiko) published the kernel source code. So, i'm trying to build it. I can get the zImage. I converted it to boot.img but i can't boot with it on my phone.build a good zImage? (if you want to try) : URL...
cp mediatek-configs .config
TARGET_PRODUCT=s9081 MTK_ROOT_CUSTOM=../mediatek/custom make
# sudo mtk-tools/repack-MT65xx.pl -boot zImage boot.img-ramdisk boot.img
MTK-Tools by Bruno MartinsMT65xx repack script (last update: 27-01-2013)
Repacking boot image...
Ramdisk size: 2046 blocs
Repacked boot image into 'boot.img'.
Here are the Warnings I got when compiling
mediatek/platform/mt6577/kernel/drivers/video/tvc_drv.c:61:5: warning: "FIXED_WVGA_PARAMS" is not defined
net/ipv4/tcp.c: In function 'tcp_nuke_addr':
include/net/ipv6.h:338: warning: 'in6' may be used uninitialized in this function
net/ipv4/tcp.c:3367: note: 'in6' was declared here
In file included from net/ipv4/netfilter/ipt_LOG.c:27:
include/net/netfilter/xt_log.h: In function 'sb_close':
[code]....
View 9 Replies
View Related
Mar 17, 2009
why CheckBox is always null.
<CheckBox id="@+id/checkbox" android:layout_width="wrap_content" android:layout_height="wrap_content" />
code file-
package com.reblogr.reblogrclient;
public class Test extends Activity { /** Called when the activity is first created. */
public CheckBox checkbox;
@Override public void onCreate(Bundle savedInstanceState) { ....................
View 5 Replies
View Related
Jun 4, 2010
And how many people use a skin or case, or even screen protector. Personally, I won't leave the house without my otterbox commuter case on, I just feel like it would be for me to leave me house without clothes on, Dones't feel right.
View 45 Replies
View Related
Nov 8, 2010
Is there any reason why SQL became case sensitive with Froyo (2.2)? I was tracking down why I have an Error reported which doesn't occur on my 2.1 phone nor on earlier OS version emulation with SimpleCursorAdapter.My bad was that between two selectable databases that one had lower case fields and the other that fields in uppercase. Usually this would make no difference with SQL as it is supposed to be case insensitive according to my investigations.
View 4 Replies
View Related
Sep 8, 2010
What we are doing currently? We have some structured, textual data on a server which is exposed using web services(RESTful). My application polls this server regularly(AlarmManagerService) to fetch the data and save it on local database(sqlite). Also, a user is authenticated and authorized beforehand for access.
Questions: There is a SyncAdapter/AccountManager class in the SDK and I was wondering if it can be of any use in my application to achieve the syncing mentioned above? If yes, what sort of infrastructure is needed at back end to support a sync set up using this adapter? Links to articles etc. that give details of using this adapter and other info is appreciated.
View 1 Replies
View Related
Jun 8, 2010
I want the contains() method from ArrayList to be case insensitive. Is there any way?
View 1 Replies
View Related