Reputation: 5177
In my instrumentation tests i have a function called
@SmallTest
public void testPreconditions() {
startActivity(mStartIntent, null, null);
secondListView=(ListView)getActivity().findViewById(R.id.myListView);
}
For JUnit to recognize a test case does the functionname have to start with testXXXX or can i follow any convention? Is this convention configurable anywhere ?
Kind Regards
Upvotes: 0
Views: 88
Reputation: 6716
Yes, the function name has to start with test<function>
. This is a standard convention followed to differentiate test units from other functions. Kindly follow the same to keep your code readable and understandable by others.
Upvotes: 1