Plan > package > suite > case > method
Plan:
User can create plan in cts shell. Plan should include packages, suites, cases or methods. Picture below shows the “add plan” command.
- Cts test plan comes from [android source tree]/out/host/linux-x86/repository/plans/[xml file]
;
- User can also create cts plan by adding xml file manually, without cts shell. This means when user types command “ls --plan”, cts shell search xml immediately.
- Cts shell will check contents in plan when processing user command, following picture shows the error message for the item.
Package comes from [ android source tree]/out/host/linux-x86/repository/plans/*.xml- Each package should responds to one xml and one apk file in
[ android source tree]/out/host/linux-x86/repository/testcase/. (but some package don’t.)
- Following picture shows the xml structure. It show the relationship between suite, TestCase(Case) and Test(Method).
- And picture below shows the source code for corresponded class method.
- We can find Suite in each xml file in
[ android source tree]/out/host/linux-x86/repository/testcase/*.xml.
Case:
- It corresponds to class name in java file.
- Test case is recorded in xml as suite child node. We can find them in source code as a class name.
Method:
- Method is recorded in xml as TestCase child node. We can find them in source code as a class method.