Skip to content

Dokimi offers a number of helper commands for testing in Go.

License

Notifications You must be signed in to change notification settings

farbodsalimi/dokimi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dokimi

Go Release Go Report Card Maintainability Test Coverage

Dokimi provides some helper commands for testing in Go.

Table of Contents

Installation

go install github.com/farbodsalimi/dokimi@latest

Commands

check-coverage

Usage:
  dokimi check-coverage [flags]

Flags:
  -c, --coverprofile string   coverprofile (default "coverage.out")
  -d, --do-not-fail           do-not-fail
  -h, --help                  help for check-coverage
  -t, --threshold float       threshold (default 100)

Example:

dokimi check-coverage --threshold=90 --do-not-fail

report

Usage:
  dokimi report [flags]

Flags:
  -h, --help              help for report
  -i, --input string      Path to input file
  -o, --output string     Path to output file
  -r, --reporter string   Reporter name e.g. istanbul, lcov, ...
      --show              Shows written reports

Write Istanbul json reports and display them

  1. Go inside your project directory and run your tests:

    go test -v -coverprofile=coverage.out ./...
  2. Show your coverage in Istanbul UI:

    dokimi report --input=coverage.out --output=coverage.json --reporter=istanbul --show

Only write Istanbul json reports

  1. Go inside your project directory and run your tests:

    go test -v -coverprofile=coverage.out ./...
  2. Generate Istanbul json file:

    dokimi report --input=coverage.out --output=coverage.json --reporter=istanbul

About

Dokimi offers a number of helper commands for testing in Go.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published