instrumentation

How to send key events to a headless emulator in an instrumentation test?

末鹿安然 提交于 2019-12-09 05:42:31
问题 We are currently working on an instrumentation test suite which runs on our build server, but while the tests pass on a dev machine using a normal Android emulator, the builds fail on the build server since there we only run a headless emulator with the -no-window flag. The failure occurs when trying to invoke the InstrumentationTestCase.sendKeys() method to programmatically open the options menu. The error is: Permission denied: injecting key event from pid 646 uid 10026 to window Window

Slow down Espresso

跟風遠走 提交于 2019-12-08 15:58:57
问题 this is regarding Espresso. I am successfully running integration test on a simulator. I think some tests are failing because it's running too fast. Is there a way to slowdown the execution/playback speeD? 回答1: It's impossible that a test fails cause to speed. Espresso can synchronize all test operations with the application under test. By default, Espresso waits for UI events in the current message queue to process and default AsyncTasks to complete before it moves on to the next test

winforms instrumentation . [closed]

匆匆过客 提交于 2019-12-08 12:22:41
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . What is the best pattern for instrumentation. I have an application and i want to be able to track metrics on everytime a users does a

Construct the stackmap of method while using bcel

风格不统一 提交于 2019-12-08 10:59:59
问题 I am trying bcel to modify a method by inserting invoke before specific instructions. It seems that my instrumentation would result in a different stackmap table, which can not be auto-generated by the bcel package itself. So, my instrumented class file contains the old stackmap table, which would cause error with jvm. I haved tried with removeCodeAttributes, the method of MethodGen, that can remove all the code attributes. It can work in simple cases, a wrapped function, for example. And it

Creating jarFile to use Instrumentation for calculating Memory usage of an object in Eclipse

六眼飞鱼酱① 提交于 2019-12-08 03:05:26
I want to calculate the memory usage of my object with help of instrumentation class. I found the this page as a straightforward instruction but I do not know how create a jar file in eclipse with the following setting. Where should I mention these setting during exporting JAR file in eclipse? jar -cmf manifest.txt agent.jar mypackage/MyAgent.class To answer question of @Rodrigo Ribeiro; I try to compile my code through command prompt with command javac MyAgent.java but I got the following errors since I always work with eclipse I do not know how solve this problem.How can I address this pages

Error in Android --Unable to find instrumentation info for: ComponentInfo

时光总嘲笑我的痴心妄想 提交于 2019-12-07 13:16:47
问题 For Example I had an application that will invoke contacts and has to select one of the contact. But its not doing exactly what I want. It is showing me error Unable to find instrumentation info for: ComponentInfo{com.sample/com.sample.ContactsSelectInstrumentation} Following is my Code.. This is my Activity class @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.go);

How do I replace a class with new one with Java instrumentation?

元气小坏坏 提交于 2019-12-07 09:25:11
问题 I need to create a java agent that when is enabled it gets the path to a jar file as argument and then it replaces any loaded class the the one inside the jar file if their names are matched. For example, we have an application with a class called com.something.ClassTest. Now if the mentioned jar (is not in the class path) has a class exactly the same name as com.something.ClassTest, I want to replace it with the one in the jar. I have this class transformer but not sure if that's correct or

Instrumentation (diagnostic) library for C++

半腔热情 提交于 2019-12-06 08:08:57
问题 I'm thinking about adding code to my application that would gather diagnostic information for later examination. Is there any C++ library created for such purpose? What I'm trying to do is similar to profiling, but it's not the same, because gathered data will be used more for debugging than profiling. EDIT: Platform: Linux Diagnostic information to gather: information resulting from application logic, various asserts and statistics. 回答1: You might also want to check out libcwd: Libcwd is a

Delay (approx 200 ms) in streamed audio playback

旧城冷巷雨未停 提交于 2019-12-06 06:18:43
问题 I have an application which plays the streamed audio data (like a chat client). The workflow involves three simple steps: The file header info (sample rate, bits per sample and num of channels) is sent first. Audio waveout device is initialized based on the above parameters. Audio (pcm) data is sent and is played on the above device. The data receiving code is native (C code). and it reads data on a socket. Then it calls the managed C# code, which uses Naudio library to initialize device and

Error in Android --Unable to find instrumentation info for: ComponentInfo

好久不见. 提交于 2019-12-06 03:43:31
For Example I had an application that will invoke contacts and has to select one of the contact. But its not doing exactly what I want. It is showing me error Unable to find instrumentation info for: ComponentInfo{com.sample/com.sample.ContactsSelectInstrumentation} Following is my Code.. This is my Activity class @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Button button = (Button) findViewById(R.id.go); button.setOnClickListener(mGoListener); } private OnClickListener mGoListener = new OnClickListener() {