instrumentation

Accessing AlertDialog in AndroidTestCase

I'm using ActivityInstrumentationTestCase2 to do automated black-box testing on my GUI. Is there a way to click on a dialog, or get Views belonging to the Dialog in unit tests? The only way I could come up with is to keep a reference to the dialog and have my Activity implement a getter method to let testcases access the dialog. Is ther...

Examples for Robotium

Hi All, I found a tool for Instrumentation Testing called Robotium.It is easy and simple for black box testing of android applications. We can use it as follows: solo.clickOnText("Other"); solo.clickOnButton("Edit"); assertTrue(solo.searchText("Edit Window")); solo.enterText(1, "Some text for testing purposes") solo...

Hibernate, instrumentation and delete cascade order

I have a complex object graph with JPA connected entities. When I delete the parent the deletions cascade correctly to the children. Then I instrument the parent class (as to not load eagerly one-to-one relationships) and upon deletion I get referential integrity violation exceptions. Looking at the queries hibernate issues upon flush,...

Motion Events in android

I am trying to simulate Mouse events in my instrumentation testing I have the following code but I am getting the following error java.lang.NullPointerException at com.ni.MyApp.test.MyAppTest.test(MyAppTest.java:28) at java.lang.reflect.Method.invokeNative(Native Method) at android.test.InstrumentationTestCase.runMethod(Instrumentation...

Effective Code Instrumentation?

All too often I read statements about some new framework and their "benchmarks." My question is a general one but to the specific points of: What approach should a developer take to effectively instrument code to measure performance? When reading about benchmarks and performance testing, what are some red-flags to watch out for that m...

Motion Events in android

This is the code for motion events in my instrumentation testing. long downTime = SystemClock.uptimeMillis(); long eventTime = SystemClock.uptimeMillis(); MotionEvent event = MotionEvent.obtain(downTime, eventTime, MotionEvent.ACTION_DOWN, 100,100, 0); MotionEvent event2 = MotionEvent.obtain(downTime, eventTime, Mot...

Instrumentation test cases in groovy?

Can we write instrumentation test cases for an android application in Groovy? If so , how ? ...

Measuring a Windows XP Embedded Application's Memory & CPU Requirements

My question says it all really. Are there any tools like perfmon or xperf that will work under the Windows XP Embedded OS, to monitor the resource requirements of a compiled (C++, as it happens) application as it does its job? ...

Fetching Object Size using Instrumentation

I have an object which is a composite of several other objects. When i use the getObjectSize() method in the Instrumentation package, does it include the size of the composite objects also? ...

What is instrumentation?

I've heard this term used a lot in the same context as logging, but I can't seem to find a clear definition of what it actually is. Is it simply a more general class of logging/monitoring tools and activities? Please provide sample code/scenarios when/how instrumentation should be used. ...

How to discover table properties from SQLAlchemy mapped object

Hi, My point is i have a class mapped with a table, in my case in a declarative way, and i want to "discover" table properties, columns, names, relations, from this class : engine = create_engine('sqlite:///' + databasePath, echo=True) # setting up root class for declarative declaration Base = declarative_base(bind=engine) class Shi...

Adding code to the beginning / end of methods in runtime dynamically

I know instrumentation is a technique to add trace code dynamically into the methods to enable tracing and debugging. I was wondering if this is only a "Trace" option, hard coded into the CLR to add only trace code, or is there the ability to add any code to the methods? For example, I want to check for a condition in the beginning of ...

How to run Android instrumentation tests from the command line (in Kubuntu)?

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 l...

Android InstrumentationTestRunner XML output for Hudson ingestion

I have an Android test project that I'd like to link into Hudson, but I haven't found a way to output the test results as XML instead of text. Does anyone know if there's an easy way to do this already? -Dan ...

Instrumentation class in the Android API.

Hi All, I have question on the Android API. Android API provides a class called "Instrumentation" class. What is the use of this class? Is the Instrumentation class be used only together with Junit for unit testing. Can Junit framework can be used to test the methods of the Android API without using the Instrumentation class. Since Ju...

Macros giving problems with dladdr()

I have implemented tracing behavior using the -finstrument-functions option of gcc and this (simplified) code: void __cyg_profile_func_enter(void *this_fn, void *call_site) { Dl_info di; if(dladdr(this_fn, &di)) printf("entered %s\n", (di.dli_sname?di_dli_sname:"<unknown>")); } This works great, except for one thing: m...

Is there an equivalent to Java's ClassFileTransformer in .NET? (a way to replace a class)

I've been searching for this for quite a while with no luck so far. Is there an equivalent to Java's ClassFileTransformer in .NET? Basically, I want to create a class CustomClassFileTransformer (which in Java would implement the interface ClassFileTransformer) that gets called whenever a class is loaded, and is allowed to tweak it and re...

android instrumentation testsuite

Hi I have written two test cases in a package com.app.myapp.test When I try to run them both of them are not getting executed, only one test case gets executed and stops. I have written the following testsuite in the same package AllTests.java public class AllTests extends TestSuite { public static Test suite() { return new ...

android instrumentation

can we add the interactive ui to the instrumentation test case and get the the values dynamically and put assertions based on them. ...

GUI testing with Instrumentation in Android

I want to test my Android applications UI, with keyevents and pressed buttons and so on. I've read som documentation that Instrumentation would be able to use for this purpose. Anyone with expericence with using Instrumentation for UI testing? ...