instrumentation

android instrumentation test case - getinstrumentation() returning null

basically the title says it all. I've been trying to make a test case extending intstrumentationtestcase, and whenever I call getinstrumentation() it returns a null instance of Instrumentation instead of an Instrumentation, rendering any of the automation I'm wanting to do useless. I have the permission set in the manifest as well even ...

From within android InstrumentationTestCase: Scrolling a listview to the next screen

I am writing my android JUnit tests in InstrumentationTestCase class. I need to scroll a list view to the next screen for several verifications. One of the scenarios where I need to scrool is given below. Say there are 25 entries and each screen can fit 10 entries. I need to iterate through the list and click the info button associated...

getAllTests and getTestSuite in android.test.InstrumentationTestRunner

I've created a test runner extending android.test.InstrumentationTestRunner. I'm looking for a way to define the set of tests to get executed based on a set of configurations. I thought I may be able to override the below methods to return my custom test suite, however, these are not getting called! Just wondering whats the use of these...

Android - Junit - Tested project uses external Jar

I have some java code (compiles nicely for Android) in a library project (LIB) that I want to use in an another Android project (A). As LIB's code is unlikely to change much, I opted for adding it as a jar to A. It works fine. I have another project that is an Android instrumentation project, testing the first Android project (B). So ...

Can MSVC _penter and _pexit hooks be disabled on a per function basis ?

There are compiler options in MSVC to enable the automatic generation of instrumentation calls on entering and exiting functions. These hooks are called _penter() and _pexit(). The options to the compiler are: /Gh Enable _penter Hook Function /GH Enable _pexit Hook Function Is there a pragma or some sort of function ...

How to get started with WCF Performance profiling

Hello, I'm trying to figure out how to profile a WCF service so I can identify any bottlenecks. I have found a bit of information on line, but nothing that assumes no prior knowlege which is where I'm at. What are recomended FREE tools? - visual studio tools - clrprofiler Here is information I found using vsperfcmd.exe to profile w...

WCF Service inaccessable when attaching VS 2010 profiler

I'm receiving the following error after I attach the visual studio 2010 profiler to my wcf service. The requested service, 'net.tcp://host:port/path/myservice.svc' could not be activated. See the server's diagnostic trace logs for more information. The service works great otherwise, and as soon as I stop profiling, I can c...

Testing this Activity

I have an Activity I would like to automate testing on. The start up of the Activity is like this: Get data from Intent Bind to service and obtain some objects specific to that Activity's intent data Query these objects and print information to screen I have a basic grasp of testing Activities but given how this Activity depends quit...

How to tell gcc to instrument the code with calls to my own function each _line_ of code?

For example, there is the source: void my_special_debugging_function(const char* function_name, const char* file_name, int line_number); void func1() { func3(); func4(); } void foo() { func1(); if(qqq) { func2(); }; func3(); func4(); for(...) { func5(); } } It should compile as: v...

Calculating byte-size of Java object

Hi, I am working on calculaitng the size [memory used] of a java object [hashmap] . It contains elements of different data types [at runtime] so [ no-of-elem * size-of-element] is not that good an approach. The code right now does it by series of if (x) do something else if (primitives) lookup size and calculate However this pro...

How to "interleave" C/C++ souce with my string (only inside functions at appropriate places)?

For example, there is the source: void func1() { func3(); if(qqq) { func2(); } func4( ); } It should be transformed to: void func1() { MYMACRO func3(); MYMACRO if(qqq) { MYMACRO func2(); MYMACRO } MYMACRO func4( ); MYMACRO } I.e. to insert "MYMACRO\n" at the end of each line...

Instrumentation

Hello All, I am new to ASM(byte code manipulation kit) and am using it to instrument java byte code. I want to access the methods of a class and change their access modifiers using ASM. Does someone have an idea about how to achieve this? I know that calling visitMethod would help but do not know how to do that exactly Any information o...

Interfacing GPIB with Qt

Hi, I was wondering if it is possible to interface with GPIB Instruments by using C++ and Qt. If it is possible, can anyone tell me how easy it would be and/or point me in a direction for a tutorial or examples? Thanks a lot. ...

visual studio performance tools, not instrumenting an assembly

I've got a solution which I am trying to profile with instrumentation. The resulting report seems to collect only up to a certain depth, and even though all of the projects have been added in the Targets section, it's not capturing the full stack in a given assembly. Is there a setting I'm missing or something? ...

Asserting order of synchronization in Java

In highly concurrent systems, it can be difficult to be confident that your usage of locks is correct. Specifically, deadlocks can result if locks are acquired in an order that was not expected while being acquired in the proper order in another thread. There are tools (e.g. Coverity) which can do static analysis on a code base and loo...