https://github.com/farbodsalimi/dokimi
Dokimi offers a number of helper commands for testing in Go.
https://github.com/farbodsalimi/dokimi
coverage golang testing
Last synced: 10 months ago
JSON representation
Dokimi offers a number of helper commands for testing in Go.
- Host: GitHub
- URL: https://github.com/farbodsalimi/dokimi
- Owner: farbodsalimi
- License: mit
- Created: 2022-05-14T19:16:43.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-29T08:45:40.000Z (over 3 years ago)
- Last Synced: 2025-07-31T22:49:52.384Z (11 months ago)
- Topics: coverage, golang, testing
- Language: Go
- Homepage:
- Size: 4.37 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dokimi
[](https://github.com/farbodsalimi/dokimi/actions/workflows/go.yml)
[](https://github.com/farbodsalimi/dokimi/actions/workflows/release.yml)
[](https://goreportcard.com/report/github.com/farbodsalimi/dokimi)
[](https://codeclimate.com/github/farbodsalimi/dokimi/maintainability)
[](https://codeclimate.com/github/farbodsalimi/dokimi/test_coverage)
Dokimi provides some helper commands for testing in Go.
**Table of Contents**
- [dokimi](#dokimi)
- [Installation](#installation)
- [Commands](#commands)
- [check-coverage](#check-coverage)
- [report](#report)
- [Write Istanbul json reports and display them](#write-istanbul-json-reports-and-display-them)
- [Only write Istanbul json reports](#only-write-istanbul-json-reports)
## Installation
```bash
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:
```bash
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:
```bash
go test -v -coverprofile=coverage.out ./...
```
2. Show your coverage in Istanbul UI:
```bash
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:
```bash
go test -v -coverprofile=coverage.out ./...
```
2. Generate Istanbul json file:
```bash
dokimi report --input=coverage.out --output=coverage.json --reporter=istanbul
```