instrumentation

Examples for Robotium

时光毁灭记忆、已成空白 提交于 2019-12-02 19:41:09
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.clickOnButton("Save"); assertTrue(solo.searchText("Changes have been made successfully")); solo.clickOnButton("Ok"); assertTrue(solo.searchText("Some text for testing purposes")); Can any body have more idea about it? Can any one please tell how can we use it for webviews and listviews etc

Tools to analyze core dump from Node.js

女生的网名这么多〃 提交于 2019-12-02 17:14:26
If I use gcore to make a code dump of a Node.js process, what are the best tools to analyze it? Inspired by: Tool for analyzing java core dump In my specific case, I'm interested in investigating some memory leaks, so I'm really curious to get some heap analysis. General tools and even instrumentation packages and techniques are also welcome. I'm finding Node.js to be very interesting, but the runtime analysis tools are just not there yet. For investigating crashes, I've found node-segfault-handler to be invaluable. It's a module I cooked up to get a native-code stack trace in the event of a

android.util.AndroidException: INSTRUMENTATION_FAILED:

心已入冬 提交于 2019-12-02 17:12:34
I have a simple android app and I am testing it using my phone. So, there are two ways to do that : Using eclipse Using CLI Problem: When I run unit test case using Eclipse, it installs app on my phone at runtime and run junit test and after that if I use command on CLI: adb -d shell am instrument -w com.abc.xyz.test/android.test.InstrumentationTestRunner, it runs fine. However, if I directly run the above command in CLI without first running the unit test cases in Eclipse, I am getting error: android.util.AndroidException: INSTRUMENTATION_FAILED: com.abc.xyz.test/android.test

Instrumenting C/C++ codes using LLVM

孤街醉人 提交于 2019-12-02 14:44:16
I just read about the LLVM project and that it could be used to do static analysis on C/C++ codes using the analyzer Clang which the front end of LLVM. I wanted to know if it is possible to extract all the accesses to memory(variables, local as well as global) in the source code using LLVM. Is there any inbuilt library present in LLVM which I could use to extract this information. If not please suggest me how to write functions to do the same.(existing source code, reference, tutorial, example...) Of what i have thought, is I would first convert the source code into LLVM bc and then instrument

What instructions 'instCount' Pin tool counts?

不想你离开。 提交于 2019-12-02 13:28:44
问题 I run pintool 'instCount' on basic C program with empty body within the main function. int main() { } When I run the instCount on this program executable , it shows around 86000 instructions. Even the program is very small why so many instructions are genrated..??Any idea.?? Thank you 回答1: What's missing is that behind the scenes, a lot of work is done to get you up to the point where the main() function is executed. There is a lot of work that the runtime needs to perform in order to provide

c++ function addresses coming out different in attached profiler library than in the subject code base

耗尽温柔 提交于 2019-12-02 13:25:02
问题 I have written an instrument-er in C++ to log entry and exit functions by hooking on enter and exit calls. It is working as supposed to with a legacy code base. However on hooking with a project that I downloaded from git, function addresses that I save in an extern variable in the subject code, they are coming out different in the profiler library. That is messing up the function pointer comparison between hooked and saved functions. Function address in subject code main file, breakpoint is

Call waitForMonitorWithTimeout() from a @UiThreadTest

六眼飞鱼酱① 提交于 2019-12-02 09:53:07
问题 To illustrate my latest problem with writing JUnit tests for my Android app, I wrote a simple example with two activities, StartActivityForResult and ChildActivity . The former contains a TextView (for display purposes) and a Button while the later contains just a Button . The onClickListener for the button in StartActivityForResult simply starts an instance of ChildActivity . private View.OnClickListener onStart = new View.OnClickListener() { @Override public void onClick(View view) { Log.d

c++ function addresses coming out different in attached profiler library than in the subject code base

放肆的年华 提交于 2019-12-02 04:30:00
I have written an instrument-er in C++ to log entry and exit functions by hooking on enter and exit calls. It is working as supposed to with a legacy code base. However on hooking with a project that I downloaded from git, function addresses that I save in an extern variable in the subject code, they are coming out different in the profiler library. That is messing up the function pointer comparison between hooked and saved functions. Function address in subject code main file, breakpoint is inside the _penter hook function in the profiler code currently The same entry is showing a different

Call waitForMonitorWithTimeout() from a @UiThreadTest

女生的网名这么多〃 提交于 2019-12-02 03:54:53
To illustrate my latest problem with writing JUnit tests for my Android app, I wrote a simple example with two activities, StartActivityForResult and ChildActivity . The former contains a TextView (for display purposes) and a Button while the later contains just a Button . The onClickListener for the button in StartActivityForResult simply starts an instance of ChildActivity . private View.OnClickListener onStart = new View.OnClickListener() { @Override public void onClick(View view) { Log.d(TAG, "Start button clicked"); Intent intent = new Intent(StartActivityForResult.this, ChildActivity

Is Object constructor called when creating an array in Java?

流过昼夜 提交于 2019-12-01 15:16:31
问题 In Java, an array IS AN Object. My question is... is an Object constructor called when new arrays is being created? We would like to use this fact to instrument Object constructor with some extra bytecode which checks length of array being constructed. Would that work? 回答1: As far as the Java Language Specification is concerned, although both use the new keyword, Class Instance Creation Expressions and Array Creation Expressions are different forms of expression, each with its own rules. The