Search code examples
androidunit-testingtestcase

Android: Is there any naming rule for test cases


I found really weird stuff when I was building my test project.
I subclassed my own test from AndroidTestCase, and implemented several test cases inside. Some cases didn't run at first, however, there was no exceptions. After I just changed the name of these cases, they got invoked by test runner and all passed.
I've no idea if there's any naming convention.


Solution

  • These are the tests naming conventions in Android: https://source.android.com/setup/contribute/code-style#javatests-style-rules