Questions tagged [instrumentation]

The process of inserting extra diagnostic code during compilation of a given source code.

The process of inserting extra diagnostic code during compilation of a given source code. Instrumentation can involve adding extra debugging information or providing hooks into profilers and other utilities in order to provide extra feedback to the developer.

1193 questions
69
votes
7 answers

Trace vs Debug in .NET BCL

It seems that the System.Diagnostics.Debug, and System.Diagnostics.Trace are largely the same, with the notable exception that Debug usage is compiled out in a release configuration. When would you use one and not the other? The only answer…
Ben Collins
  • 20,538
  • 18
  • 127
  • 187
46
votes
4 answers

What is meant by the term "Instrumentation"?

As the title suggests. Many explanations are really vague, can anyone provide a more solid definition? The term is used a lot in Android testing, but I don't think it's restricted to that platform.
barry
  • 4,037
  • 6
  • 41
  • 68
42
votes
1 answer

Write/create file within Android Instrumentation context

I have a class that creates (or opens) a file to write some data to it. This class receives a Context in the constructor, saves it in an instance field, and then uses it to call the context.openFileOutput method. When running the application, I…
mato
  • 1,461
  • 10
  • 17
41
votes
6 answers

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…
Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
33
votes
2 answers

How to discover table properties from SQLAlchemy mapped object

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…
Olivier Girardot
  • 4,618
  • 6
  • 28
  • 29
29
votes
5 answers

How can I deliver parameters to a test function, that launched using adb shell am Instrumentation command

I am developing in Android, I am using instrumentation to test Phone application. Instrumentation is Android env to test applications. For that I use am command with name of test case. I run adb, then I enter adb shell, then write in shell the am…
ilana
  • 505
  • 2
  • 5
  • 12
28
votes
3 answers

How do you force an orientation change in an Android Instrumentation test?

I'm writing some acceptance tests for an application using the ActivityInstrumentationTestCase2 class. I want to cause an orientation change from within the test to ensure that a number of things happen. Among these things are ensuring that Activity…
28
votes
3 answers

android.util.AndroidException: INSTRUMENTATION_FAILED:

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…
user1968471
  • 301
  • 1
  • 3
  • 5
27
votes
6 answers

How can I profile Signed Assemblies with VS 2010 or VS 2013

I have a website that uses AjaxControlToolkit.dll and Log4Net.dll. When I try to run the performance profiling tool in VS 2010 on it it gives me the following warning: AjaxControlToolkit.dll is signed and instrumenting it will invalidate its…
Storm
  • 4,307
  • 11
  • 40
  • 57
25
votes
3 answers

Tools to analyze core dump from Node.js

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…
Dave Dopson
  • 41,600
  • 19
  • 95
  • 85
25
votes
2 answers

Android NullPointerException in Instrumentation.execStartActivity

I keep getting the bellow exception from some users: java.lang.NullPointerException at android.app.Instrumentation.execStartActivity(Instrumentation.java:1414) at android.app.Activity.startActivityForResult(Activity.java:2880) at…
Adrian
  • 717
  • 11
  • 18
23
votes
4 answers

"Failed to load Premain-Class manifest attribute" while trying to get the size of an object using java agent

When i try to run a java program (java -javaagent:size.jar ObjectSizeTest) i get the following error: Failed to load Premain-Class manifest attribute from D:\workspace\ObjectSizeTest\size.jar Error occurred during initialization of VM agent library…
java_geek
  • 17,585
  • 30
  • 91
  • 113
22
votes
4 answers

Accessing instrumentation test resources

I am trying to find a way for my instrumentation tests to have access to string resources generated within the test package. More details: I have an Android test case which inherits from ActivityInstrumentationTestCase2. I used Eclipse's New…
Vasanth Asokan
  • 291
  • 1
  • 3
  • 7
22
votes
2 answers

Difference between ActivityUnitTestCase and ActivityInstrumentationTestCase2

I am new to Android Instrumentation cases. i have been looking at the API samples and see that sometimes we use ActivityUnitTestCase and the ActivityInstrumentationTestCase2. What is the difference between the two ? When would we use one over the…
user1730789
  • 5,157
  • 8
  • 36
  • 57
21
votes
4 answers

PL/SQL Logging - How to control?

I am looking to introduce a logging framework into our existing Oracle application to replace the use of DBMS_OUTPUT. The framework will be used primarly to aid debugging and would detail such things as starting x procedure, details of parameters,…
Ian Carpenter
  • 8,346
  • 6
  • 50
  • 82
1
2 3
79 80