• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Tests annotations
2
3Test annotations are needed to collect statistics during project development, so it is important to write them correctly \
4The test annotation is cpp comment, consisted of tags and values for test description in format \
5! // Test: {tag1}={value1}, {tag2}={value2}, ...
6
7### test-kind tag
8
9    The kind of test:
10        * api
11        * mock
12        * internal
13
14### api tag
15
16    api tag reflects the implemented api name which checks ypur test
17    api tag must be in format *api_group*::*api_name*
18
19    examples:
20        api=GraphApiImpl::bbCreateEmpty - for bbCreateEmpty api from GraphApiImpl struct \
21        api=DynamicIsa::CreateLoadString - for CreateLoadString method of DynamicIsa class
22
23    api name should be correct (without typos and *api_name* is api from *api_group*)
24    api tag is necessary if test-kind=api or test-kind=mock
25
26### abc-kind tag
27
28    The type of abc:
29        * ArkTS1
30        * ArkTS2
31        * JS
32        * TS
33        * NoABC
34
35### category tag
36
37    the category of test:
38        * positive
39        * negative
40
41### extension tag:
42
43    Tested extension. Add this tag only to extension's tests, but not to c api tests
44    * cpp
45
46There are examples of correct annotations:
47// Test: test-kind=api, api=GraphApiImpl::bbCreateEmpty, abc-kind=ArkTS1, category=positive
48// Test: test-kind=api, api=File::GetModules, abc-kind=ArkTS1, category=positive, extension=cpp
49