{"id":20064916,"url":"https://github.com/baidu/logcover","last_synced_at":"2025-05-05T18:31:17.155Z","repository":{"id":12190807,"uuid":"14794259","full_name":"baidu/logcover","owner":"baidu","description":"轻量级异常日志测试覆盖率度量工具","archived":false,"fork":false,"pushed_at":"2017-02-15T09:25:45.000Z","size":244,"stargazers_count":54,"open_issues_count":1,"forks_count":40,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-04-09T23:02:18.238Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/baidu.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-29T06:31:49.000Z","updated_at":"2024-03-28T09:22:10.000Z","dependencies_parsed_at":"2022-09-24T10:50:17.571Z","dependency_job_id":null,"html_url":"https://github.com/baidu/logcover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Flogcover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Flogcover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Flogcover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/baidu%2Flogcover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/baidu","download_url":"https://codeload.github.com/baidu/logcover/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224459222,"owners_count":17314848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T13:48:12.813Z","updated_at":"2024-11-13T13:48:13.349Z","avatar_url":"https://github.com/baidu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n背景：\n 异常测试是软件测试中非常重要的一环，异常测试充分与否直接影响到测试质量和产品线上稳定性。\nlogcover是Baidu质量部推出的一款专门用于度量异常测试覆盖率的轻量级工具，通过度量异常日志的测试覆盖率来反应异常测试覆盖率，因为打印异常日志的程序分支往往更需要测试覆盖的异常分支。\n\n\n原理：\n 结合程序源代码和测试执行产生的日志，计算程序异常日志的测试覆盖率。\n例如： 源代码中有100处异常日志(warning、fatal、error)打印点，程序在测试过程中，产生了100条日志，对应源代码中50处日志打印点，则异常日志覆盖率是50%，同时，logcover会给出覆盖日志和未覆盖日志的所有信息，包括文件名、行号等，便于快速识别未覆盖异常日志。\n\n\n实现：\n• 根据svn，对源代码进行轻量级静态分析，获得代码中异常日志打印的原始信息\n• 收集单机/多机测试日志，并对日志文件进行parse、filter、merge等处理，得到实际覆盖的日志信息\n• 根据代码中的原始日志信息和实际测试产生的日志信息，做diff计算，得出异常log覆盖率和覆盖信息\n• 覆盖率报告邮件推送\n\n\nlogcover使用说明:\n1: 下载logcover\n2: 修改对应 logcover.cfg文件 \n   logcover_type =0 表示单机模式；logcover_type=1表示多机模式。\n   选择多机模式时，对应填写 machines、user、password、log_paths和script_path \n3: 执行 sh logcover.sh $svn $log_cover_log_dir $mail_list -s $mail_subject \n   $svn : 被测程序svn源码路径\n   $log_cover_log_dir: log文件存放路径\n   $mail_list : 覆盖率报告推送邮件列表，多邮件中间以空格分隔。例如:zhangsan@xx.com li@xx.com\n   -s $mail_subject : 推送邮件自定义主题\n\nlogcover执行环境依赖:\n1: perl v5.8.5+ \n2: python v2.7+\n3: svn client v1.6.5+\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaidu%2Flogcover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbaidu%2Flogcover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbaidu%2Flogcover/lists"}