|Wazuh version|Component|Install type|Install method|Platform| |---|---|---|---|---| | 3.9.2 | Framework unit test | Any | Any | Any |
Currently, the framework unit tests don't test all the code they should. The following shows the current status of the tests and their coverage:
Active Response
Name Stmts Miss Cover Missing
-------------------------------------------------------------------------
/wazuh/framework/wazuh/active_response.py 44 12 73% 11-19, 53, 62-64, 74
Agent
Name Stmts Miss Cover Missing
---------------------------------------------------------------
/wazuh/framework/wazuh/agent.py 1394 952 32% 37-47, 87-93, 143-148, 159-163, 170-172, 179, 183, 187-188, 235, 238, 241-246, 290-325, 332-335, 339-340, 348-354, 364-377, 384-392, 404-416, 428-435, 467-468, 510-511, 534, 560-572, 591-615, 634-752, 764-780, 787-797, 835-837, 847-859, 874-877, 891-925, 936-947, 959, 971, 981-992, 1007-1026, 1042-1083, 1097-1101, 1114-1155, 1172-1173, 1185-1198, 1212-1217, 1232-1290, 1302-1309, 1321-1327, 1339-1348, 1365-1370, 1386, 1403-1442, 1454-1474, 1484-1501, 1510-1530, 1543-1586, 1600-1603, 1614-1639, 1650-1677, 1682-1687, 1692-1703, 1716-1736, 1750-1764, 1776-1782, 1794-1797, 1811-1833, 1845-1851, 1865-1875, 1904, 1926-1927, 1933-1938, 1942-1943, 1949-1950, 1964, 1975-1979, 1981, 1987, 1990, 1993-1994, 1999-2000, 2008-2013, 2020-2028, 2032, 2036-2037, 2042-2045, 2051, 2054, 2071, 2077, 2081, 2084-2094, 2096, 2103, 2107, 2109, 2113, 2116, 2118, 2124-2134, 2144, 2148, 2150, 2157, 2161, 2163, 2168, 2176, 2182, 2186, 2189, 2195, 2201, 2206, 2211, 2216, 2223-2226, 2238, 2245-2281, 2293, 2300-2409, 2416-2445, 2456-2459, 2469, 2496-2516, 2525-2529, 2539-2543, 2555-2558
Cdb_List
root:/wazuh/framework/wazuh/tests# coverage report -m
Name Stmts Miss Cover Missing
------------------------------------------------------------------
/wazuh/framework/wazuh/cdb_list.py 77 7 91% 91, 135-142
Common
Name Stmts Miss Cover Missing
----------------------------------------------------------------
/wazuh/framework/wazuh/common.py 78 5 94% 15, 38-39, 115, 119
Decoders
Name Stmts Miss Cover Missing
-----------------------------------------------------------------
/wazuh/framework/wazuh/decoder.py 141 21 85% 34, 49-53, 85, 95, 107, 114, 137-138, 178-179, 181-182, 184-185, 188, 218, 224-225
Groups
Name Stmts Miss Cover Missing
---------------------------------------------------------------
/wazuh/framework/wazuh/agent.py 1394 1229 12% 37-47, 54-58, 62-78, 82-83, 87-93, 98-103, 106-132, 135-139, 142-150, 159-163, 170-172, 179, 183, 187-188, 215-235, 238, 241-246, 254-262, 269-276, 290-325, 332-335, 339-340, 348-354, 364-377, 384-392, 404-416, 428-435, 445-543, 560-572, 591-615, 634-752, 764-780, 787-797, 815-819, 835-837, 847-859, 874-877, 891-925, 936-947, 959, 971, 981-992, 1007-1026, 1042-1083, 1097-1101, 1114-1155, 1172-1173, 1185-1198, 1212-1217, 1232-1290, 1302-1309, 1321-1327, 1339-1348, 1365-1370, 1386, 1403-1442, 1454-1474, 1484-1501, 1510-1530, 1543-1586, 1600-1603, 1614-1639, 1650-1677, 1682-1687, 1692-1703, 1716-1736, 1750-1764, 1776-1782, 1794-1797, 1845-1851, 1865-1875, 1889-1908, 1912-1916, 1922-1952, 1960-2056, 2063-2168, 2175-2226, 2238, 2245-2281, 2293, 2300-2409, 2416-2445, 2456-2459, 2467-2476, 2486-2492, 2496-2516, 2525-2529, 2539-2543, 2555-2558
Manager
Name Stmts Miss Cover Missing
-----------------------------------------------------------------
/wazuh/framework/wazuh/manager.py 320 130 59% 73, 105, 112, 119-122, 126, 132, 135-138, 152-182, 198, 203-206, 209, 213-216, 221-222, 251-256, 262-263, 269-272, 276-279, 290-316, 330, 334, 339-340, 350-359, 367-380, 423-424, 431-432, 447-462, 483-485, 493-494, 501-504, 510-511, 521-522, 531-532, 567
Rules
Name Stmts Miss Cover Missing
--------------------------------------------------------------
/wazuh/framework/wazuh/rule.py 296 71 76% 41, 44-47, 50-53, 56-59, 62-65, 127-131, 142, 179, 189, 201, 208, 231-232, 271-273, 281-282, 284-285, 287-288, 290-291, 293-294, 296-297, 302-303, 305-306, 308-314, 317, 337-351, 471, 483, 485-488, 491-492, 527-528
SCA
Name Stmts Miss Cover Missing
-------------------------------------------------------------------------------------------
/wazuh/framework/wazuh/security_configuration_assessment.py 81 4 95% 102, 104-105, 181
Syscheck
Name Stmts Miss Cover Missing
------------------------------------------------------------------
/wazuh/framework/wazuh/syscheck.py 78 50 36% 27-57, 68-78, 92-94, 99, 130-157
Util
/wazuh/framework/wazuh/utils.py 496 377 24% 30-45, 56-61, 72-91, 103-120, 133-167, 177-194, 208-228, 266-274, 284-309, 319-327, 338-346, 356-375, 379-383, 388-396, 400-409, 413-415, 419-425, 462-490, 494-515, 539, 541, 547, 551, 561, 570, 572-575, 596-608, 637-677, 681-688, 692, 696-708, 712-716, 720-731, 735, 749-766, 777-798, 802-807, 811-828, 832-843, 847-848, 852, 857, 862, 867-878, 886-895, 902-904, 911, 915, 920, 929, 933, 937-939, 943-946, 950, 960-962, 967-971, 975-977
WDB
Name Stmts Miss Cover Missing
-------------------------------------------------------------
/wazuh/framework/wazuh/wdb.py 99 69 30% 42-56, 72, 81-96, 116-181
In addition to improving existing tests, it's necessary to create new tests for all code that does not have tests (syscollector, ciscat, exception, etc).
该提问来源于开源项目:wazuh/wazuh