Not sure about the instrument, but the thought that comes to mind is doubled.
Create a TestRule class that tracks the number of statements per test (use a static counter, clear the counter at the beginning of the test, assert that it is not 0 at the end of the test).
Wrap the Assert class in your own proxy server, which increments the TestRule counter with every call.
Whether your Assert class is named Assert, you only need to update the import and add the rule to the tests. The above mechanism is not thread safe, so if you run several tests at the same time, you will get erroneous results.
source share