github.com/jonsyu1/godel@v0.0.0-20171017211503-64567a0cf169/apps/gunit/README.md (about)

     1  gunit
     2  =====
     3  gunit is a library and CLI for running Go tests, generating coverage reports and generating JUnit-style XML output. It
     4  uses [go-junit-report](https://github.com/jstemmer/go-junit-report) as the library for formatting test reports and
     5  [gt](https://godoc.org/rsc.io/gt) for running cached tests.
     6  
     7  Documentation
     8  -------------
     9  Documentation for `gunit` is provided in the Go code and as part of the application itself.
    10  
    11  * Run `gunit --help` to get an overview of the commands and flags
    12  * gunit is configured using a YML or JSON configuration file. Refer to the documentation in
    13    `apps/gunit/config/config.go` for information on the configuration parameters that are available.
    14  * Refer to `apps/gunit/config/example_test.go` for sample configuration files
    15  
    16  Development
    17  -----------
    18  Use the following commands for development. All paths in the example commands assume that they are run from the root
    19  project directory of godel -- if the current working directory is `apps/gunit`, use `../../godelw` instead.
    20  
    21  * Run `./godelw verify` to apply formatting, perform linting checks and run the gödel tests
    22  * Run `./godelw test --tags=gunit` to run the gunit-specific tests (not included by default in the tests run by `./godlew verify`)
    23  * Run `./godelw build` to build the gunit binary in `apps/gunit/build`
    24  
    25  ### Add a new test utility
    26  * In order for a test utility to be added, it must be a Go program that has a main package
    27  * The test utilities are managed and packaged by [amalgomate](https://github.com/palantir/amalgomate)
    28  * Add the code required for the new test utility (the main package and any supporting code) to the vendor directory
    29  * Edit `apps/gunit/testers.yml` and add an entry for the new test utility
    30    * Add an entry to `packages` where the key is the name of the test utility (no whitespace) and the value has a key
    31      named `main` and the value is the import path to the `main` package for the test utility. For more details on the
    32      config file format, refer to the documentation for amalgomate.
    33  * Run `go generate` in the root directory of the project to re-generate the files in `generated_src`
    34  
    35  ### Generate
    36  Run `go generate` in the `apps/gonform` directory to create or update the `generated_src` directory and the source files
    37  within it. The `go generate` task for this project requires the amalgomate command to run. The version of amalgomate
    38  used to build the distribution is included as a vendored dependency.