Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 980
fifth Avatar asked Apr 21 '11 09:04

fifth


People also ask

How should you name test cases?

Be concise. Test case names are usually limited to a specific length, so space is at a premium. Make sure to keep names unique while refraining from adding any details that aren't required for identification. You can add those details to the case's instructions or test data, for example.

What is the naming convention for Android?

Each new version of Android is named after a dessert, going in alphabetical order (Fig. 1.5).

What is an appropriate naming scheme for a test class?

Test class naming convention usually follows the naming convention of the class being tested, e.g., the class under test is “Order” the corresponding test class will be “OrderTests“. When in doubt, it is a good practice to model the test class name after the production class it is testing.

How do you write test cases for Android Apps?

Test cases should be written in such a way that they allow a person to test only one feature at a time. One should not overlap or complicate test cases. Cover all the positive and negative probabilities of the test outcomes. Write in simple language with exact and accurate names of forms, fields, etc.


1 Answers

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

like image 149
Diego Torres Milano Avatar answered Sep 27 '22 17:09

Diego Torres Milano