In Android developers, I saw that the testPreconditions () method should run before all tests. But in my application, the test, it acts like a regular test. It does not start before all tests. Something is wrong?
Here is a description of the testPreconditions () conditions from the Android developer: "The prerequisite test checks the initial conditions of the application before performing other tests. It is similar to setUp (), but with less overhead since it runs only once."
Actually, testPreconditions () is another unit test. Here is a quote from the Android Application Testing Guide, Diego Torres Milano’s book:
" testPreconditions . , , . .
, (2011-06-23). Android (. 76). Packt Publishing. Kindle Edition.
Android SDK:
The name 'test preconditions' is a convention to signal that if this test doesn't pass, the test case was not set up properly and it might explain any and all failures in other tests. This is not guaranteed to run before other tests, as junit uses reflection to find the tests.
, (ActivityInstrumentationTestCase2) :
public void testPreconditions()