[ckan-dev] Test coverage

David Read david.read at okfn.org
Mon May 2 20:54:37 UTC 2011


Hi all,

I've got the new buildbot to show us test coverage stats again. It looks
like some good improvement from a couple of months ago, especially with John
just having added tests for authorization groups. Still a few holes
elsewhere we should fill though.

It's at the bottom of the postgres build output. I've posted the latest
below for future comparison. I believe the basic rule of thumb is to care
when coverage is below 80%.

Dave

http://buildbot.okfn.org/builders/builder-ckan/builds/74/steps/shell_1/logs/stdio

Name                                   Stmts   Exec  Cover   Missing
--------------------------------------------------------------------
ckan                                       8      0     0%   1-24
ckan                                       8      0     0%   1-24
ckan.authz                               161    145    90%   90-94, 99-107,
167, 275
ckan.ckan_nose_plugin                     30     10    33%   1-13, 25-26,
32-48
ckan.config                                0      0   100%
ckan.config.environment                   59     52    88%   39-41, 65, 72,
84, 111
ckan.config.middleware                    45     42    93%   50, 68, 107
ckan.config.routing                      102    102   100%
ckan.controllers                           0      0   100%
ckan.controllers.api                     345    295    85%   115-117,
143-144, 147-151, 174-175, 185, 204-206, 212-213, 231-232, 250-252, 257-258,
270-273, 293-294, 303-305, 374-375, 392, 405-407, 410-421, 430, 451, 469
ckan.controllers.authorization_group     178    149    83%   19, 33, 55,
68-71, 91-92, 100, 127-130, 147, 164-168, 206, 210, 239-240, 244-246,
253-254, 257-259
ckan.controllers.error                    25     21    84%   39, 43, 49-50
ckan.controllers.group                   250    209    83%   22, 38, 116,
146-149, 166, 182-186, 191, 202, 209-221, 228, 231, 236-237, 256-259, 266,
268, 289, 291, 293, 331-333, 340-341, 344-346
ckan.controllers.home                     65     53    81%   35, 63-64,
72-73, 76, 88-93
ckan.controllers.package                 396    309    78%   52-53, 61-63,
75-77, 105-108, 119-120, 163-180, 190-193, 200, 219, 221, 223, 255-256, 323,
332-333, 367, 404, 415, 420, 435-439, 444, 455, 461-473, 480, 483, 487-488,
502-513, 518, 529, 549, 554-555, 563-564, 567-569, 574-582
ckan.controllers.revision                127    103    81%   44, 78-80, 118,
121, 133, 147, 154-170
ckan.controllers.tag                      34     33    97%   57
ckan.controllers.template                  6      6   100%
ckan.controllers.user                    142     80    56%   10, 15-45,
68-71, 74-94, 100-109, 122, 124, 127, 151-156, 174, 176
ckan.forms                                24     18    75%   18, 25-27,
30-31
ckan.forms.authorization_group            58     47    81%   19-20, 23,
27-33, 69
ckan.forms.authz                          59     59   100%
ckan.forms.builder                        67     66    98%   21
ckan.forms.common                        668    467    69%   28, 50, 53,
61-62, 67, 72-73, 77, 81, 86, 90-91, 94, 118-123, 126-128, 131-134, 139-140,
146-147, 151-152, 156, 159-162, 170-171, 175, 179, 182-185, 193, 198-202,
205-208, 212, 215, 221, 224-226, 232-237, 242, 245-249, 253-257, 260-265,
270-272, 279-280, 284-288, 293-301, 304-308, 311-319, 322-324, 327, 507,
524, 537, 595-598, 626-627, 642, 800, 819-824, 839-845, 848-852, 855-859,
863, 867-874, 877, 884-890, 893-895, 899-920, 923, 926-928, 934, 939-940,
943-945, 949-952, 955
ckan.forms.group                          97     77    79%   18, 22-23,
26-28, 32-40, 61-62, 75, 96, 122
ckan.forms.package                        44     43    97%   110
ckan.forms.package_dict                   84     54    64%   80-88, 91-99,
101, 104-114, 135-140
ckan.forms.registry                       30     29    96%   49
ckan.i18n                                 29     27    93%   22, 38
ckan.lib                                   0      0   100%
ckan.lib.alphabet_paginate                48     44    91%   75, 78, 97, 104
ckan.lib.app_globals                      15     15   100%
ckan.lib.authenticator                    32     13    40%   11-27, 37-42
ckan.lib.base                            163    140    85%   61, 126, 129,
132, 135, 151-154, 159, 173, 199, 210, 215, 222-228, 231-232, 243-248
ckan.lib.cache                           116     44    37%   70-160,
174-184, 196-197
ckan.lib.cli                             727     97    13%   22-32, 36-37,
62-97, 100-107, 110-121, 124-126, 129-132, 135-138, 141-142, 145-158,
161-169, 172-180, 183-197, 200-208, 226-245, 262-277, 294-305, 308-312,
315-334, 337-349, 369-385, 388-391, 394-398, 401-405, 408-427, 430-440,
443-473, 476-489, 507-518, 521-525, 528-537, 572-594, 597-601, 605-630,
633-642, 645-649, 652-657, 660-723, 726-744, 747-772, 775-778, 781-816,
820-826, 829-831, 834-849, 852-867, 870-910, 913-955
ckan.lib.cswclient                       147    111    75%   21, 94-95,
98-99, 102-103, 106-107, 125, 156-157, 163, 180-181, 186, 188-200, 204,
212-216, 221, 228
ckan.lib.dictization                      67     67   100%
ckan.lib.dictization.model_dictize       119    119   100%
ckan.lib.dictization.model_save          164    153    93%   27, 29,
103-112, 138, 141
ckan.lib.dumper                          238    109    45%   21, 78, 85, 89,
93-94, 108-140, 147-161, 164-175, 179-202, 238-247, 250-255, 258-262, 265,
269-270, 273-277, 282-303
ckan.lib.field_types                     176    167    94%   120-121, 128,
144-145, 186, 253, 261-263
ckan.lib.hash                             15     14    93%   18
ckan.lib.helpers                         135    105    77%   28-29, 47, 52,
65, 67, 69, 73, 75, 84-89, 108, 134-140, 168, 173-177, 210
ckan.lib.jsonp                            16     13    81%   12-14
ckan.lib.munge                            33     31    93%   34, 92
ckan.lib.navl                              1      1   100%
ckan.lib.navl.dictization_functions      234    183    78%   7, 9, 11, 13,
15, 17, 19, 21, 71, 75, 122-124, 138-143, 146-151, 161-164, 173, 223-233,
247-251, 274-278, 285-286
ckan.lib.navl.validators                  56     37    66%   6, 18-19,
40-48, 65-71, 83-86
ckan.lib.package_saver                    96     72    75%   39-41, 50, 52,
112-114, 124-134, 146, 154-158, 161
ckan.lib.search                           49     24    48%   33, 40-49,
52-64, 67-70
ckan.lib.search.common                   177    149    84%   30, 34, 47-51,
58-59, 66-68, 71, 121, 178-180, 226, 240, 243, 259, 263, 267, 272, 276, 280,
284, 288
ckan.lib.search.sql                      214    185    86%   53-58, 72, 84,
171, 241-244, 254-256, 270, 279, 290, 293-295, 298-304
ckan.lib.search.worker                    26     23    88%   24-26
ckan.lib.stats                           166    146    87%   10-11, 125-132,
138, 171-173, 192, 221-223, 247, 256, 260-261
ckan.logic                                31     29    93%   37-38
ckan.logic.action                          0      0   100%
ckan.logic.action.create                 126    114    90%   51, 64-67, 86,
88, 136, 154, 160-161, 165, 167
ckan.logic.action.delete                  62     58    93%   40, 42, 49, 53
ckan.logic.action.get                    118    115    97%   32, 79, 83
ckan.logic.action.update                 100     95    95%   81, 83, 94,
114, 135
ckan.logic.schema                         35     35   100%
ckan.logic.validators                     83     72    86%   20, 25-32, 59,
100, 109, 117
ckan.migration                             0      0   100%
ckan.misc                                 28     24    85%   12, 45-47
ckan.model                               150    138    92%   40-41, 66,
113-115, 128, 141, 178-180, 208
ckan.model.authorization_group            40     39    97%   32
ckan.model.authz                         237    216    91%   26, 138-142,
151-152, 219-223, 265-266, 273-274, 330-331, 368, 400-403
ckan.model.changeset                    1102    853    77%   126-128, 206,
208, 215-243, 257-261, 291-292, 298, 323-331, 351, 359-360, 378, 409,
425-426, 451-452, 462, 465-472, 554, 577, 601-603, 611-613, 640, 642,
644-645, 647-648, 672, 700, 738-739, 742, 751-752, 757-763, 768-769, 789,
853-855, 864, 874, 883, 897-899, 916-917, 924, 939, 948-951, 958-959, 971,
992, 999-1002, 1019-1021, 1073-1074, 1078-1104, 1110, 1117, 1132, 1148-1150,
1152-1153, 1157-1177, 1181-1187, 1191, 1211-1213, 1215, 1218, 1221,
1261-1262, 1266-1272, 1276-1294, 1313, 1416-1426, 1450-1451, 1454-1456,
1475, 1489-1490, 1492-1493, 1588, 1608-1615, 1617-1625, 1627, 1631,
1633-1642, 1659
ckan.model.core                           15     12    80%   14, 17, 21
ckan.model.domain_object                  76     55    72%   18, 34, 44-50,
54-55, 58-59, 62, 65-66, 69, 72, 92, 105-106
ckan.model.extension                      50     45    90%   13-18
ckan.model.group                          83     67    80%   78-79, 82-85,
88-93, 110-112, 119
ckan.model.group_extra                    22     22   100%
ckan.model.license                        60     48    80%   17-18, 44-46,
57, 62, 71, 82-86
ckan.model.meta                           15     14    93%   22
ckan.model.modification                   40     38    95%   35, 72
ckan.model.package                       313    293    93%   60-61, 158,
225, 232, 303, 309, 343-349, 519-527
ckan.model.package_extra                  23     23   100%
ckan.model.package_mapping                11     11   100%
ckan.model.package_relationship           85     75    88%   91-101, 158
ckan.model.rating                         11     11   100%
ckan.model.resource                      132    122    92%   70, 112,
119-120, 122, 132, 141, 148, 249-250
ckan.model.search_index                   12      9    75%   8-10
ckan.model.tag                            64     57    89%   34, 76, 87, 90,
94-98
ckan.model.types                          42     37    88%   12, 16, 19, 24,
39
ckan.model.user                           80     59    73%   49, 60-66,
98-105, 111-115, 118-120, 145
ckan.plugins                               2      2   100%
ckan.plugins.core                         69     65    94%   70-71, 82, 157
ckan.plugins.interfaces                   80     61    76%   32-33, 42, 59,
75, 84, 172, 183, 186, 189, 192, 195, 198, 207, 210, 213, 216, 219, 222
ckan.rating                               37     27    72%   13-20, 36-37,
39
ckan.websetup                              9      9   100%
ckanclient                               312     86    27%   134-137,
141-142, 157-204, 210-214, 218-222, 227-228, 231, 234-236, 242-244, 276,
280-285, 288, 294-297, 300-304, 318-323, 326-330, 335-342, 345-349, 354-361,
365-373, 377-385, 389-396, 399-402, 405-408, 411-416, 419-422, 425-428,
433-440, 447-454, 461-464, 467-472, 475-478, 481-486, 493-496, 499-502,
508-513, 515-517, 519-522, 524-527, 530-535, 537-540, 547
ckantestplugin                            36     34    94%   19, 50
--------------------------------------------------------------------
TOTAL                                  10162   7628    75%
----------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110502/164f2a9c/attachment.html>


More information about the ckan-dev mailing list