패키지, 저장소 및 앱 카테고리 검색

패키지 상세v0.1.3

lcov_parser

LCOV 커버리지 파일을 구조화된 레코드로 분석하여 줄, 분기, 함수 커버리지 데이터에 쉽게 액세스할 수 있도록 해주는 Dart 패키지입니다.

AndroidiOSmacOSWindowsLinux
30일 다운로드
38.7만
좋아요
4
Pub 점수
140

패키지 설치

flutter pub add lcov_parser

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

lcov_parser 패키지는 LCOV(Linux Coverage) 형식 파일을 분석하여 라인, 브랜치, 함수 커버리지용 구조화된 데이터로 변환하는 Dart 도구입니다. 개발자들이 테스트 커버리지 결과를 프로그래밍 방식으로 분석할 수 있게 해주며, CI/CD 파이프라인에 통합하거나 보고서를 생성하는 것을 쉽게 만듭니다. 이 패키지는 여러 플랫폼을 지원하며, 세밀한 커버리지 메트릭을 통해 높은 코드 품질을 유지하려는 팀에게 이상적입니다.

사용 사례

  • 테스트 실행에서 LCOV 파일 파싱
  • CI/CD 워크플로우에 커버리지 분석 통합
  • 응용 프로그램에서 커버리지 보고서 생성
  • 시간에 따른 코드 커버리지 추세 분석
  • 풀 리퀘스트에서 커버리지 임계값 검증

주요 기능

  • 라인, 브랜치 및 함수 커버리지를 지원
  • 구조화된 데이터 모델을 제공합니다
  • Dart 프로젝트와의 간편한 통합
  • 크로스 플랫폼 호환성
  • 경량이며 파싱에 집중

적합한 대상

  • 테스트 자동화 엔지니어
  • CI/CD 파이프라인 개발자
  • 코드 품질 팀
  • Dart 프로젝트 유지보수자
  • 커버리지 보고서 생성기

고려 사항

  • 유효한 LCOV 입력 파일이 필요합니다
  • 커버리지 데이터를 생성하지 않음 — 오직 분석만 수행
  • LCOV 형식으로 제한됨
  • 내장 보고서 UI 없음
  • LCOV를 생성하기 위해 외부 커버리지 도구에 의존합니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Lcov parser

Dart

A simple lcov file parser implementation in Dart.

The lcov is used to get test coverage. It works as a front-end for gcov collecting the data and generating the coverage info.

This implementation translates the lcov format to Dart classes we can understand and use the coverage info for a lot of proposals.

How to use

To use it is very simple, this package exports the model of the record and the parser class, and you will receive from the return of the parser is a list of record. As you can see in the code below

import 'package:lcov_parser/lcov_parser.dart';

void main() async {
    final file = 'absolute path from lcov.info file';
    final records = await Parser.parse(file);
}

Another option is to parse records from a list of strings:

void main() {
  final lines = [
    'SF:lib/src/interceptors/app_version_interceptor.dart',
    'DA:6,1',
    'DA:11,1',
    // ...more lines here
    'end_of_record',
  ];
  final records = Parser.parseLines(lines);
}

You also will find a script example in the example/main.dart file.

How to contribute with the project.

Feel free to open issues in this repository or open your pull request.

Running the tests

In the root path

dart test

카테고리

의존성

의존성 목록 3 개

소스 저장소

이 패키지를 사용하는 프로젝트