lambdaisland / kaocha-cloverage

Code coverage analysis for Kaocha
Eclipse Public License 1.0
34 stars 12 forks source link

Flags issues #4

Closed AndreaCrotti closed 4 years ago

AndreaCrotti commented 5 years ago

I'm having a few weird issues with the Cli, this is one:

bin/kaocha --plugin cloverage --codecov
Unknown option: "--codecov"
USAGE:

bin/kaocha [OPTIONS]... [TEST-SUITE]...

  -c, --config-file FILE            tests.edn  Config file to read.
      --print-config                           Print out the fully merged and normalized config, then exit.
      --print-test-plan                        Load tests, build up a test plan, then print out the test plan and exit.
      --print-result                           Print the test result map as returned by the Kaocha API.
      --fail-fast                              Stop testing after the first failure.
      --[no-]color                             Enable/disable ANSI color codes in output. Defaults to true.
      --[no-]watch                             Watch filesystem for changes and re-run tests.
      --reporter SYMBOL                        Change the test reporter, can be specified multiple times.
      --plugin KEYWORD                         Load the given plugin.
      --version                                Print version information and quit.
      --help                                   Display this help message.
  -H, --test-help                              Display this help message.
      --[no-]randomize                         Run test namespaces and vars in random order.
      --seed SEED                              Provide a seed to determine the random order of tests.
      --skip SYM                               Skip tests with this ID and their children.
      --focus SYM                              Only run this test, skip others.
      --skip-meta SYM                          Skip tests where this metadata key is truthy.
      --focus-meta SYM                         Only run tests where this metadata key is truthy.
      --[no-]capture-output                    Capture output during tests.
      --cov-output PATH                        Cloverage output directory.
      --[no-]cov-text                          Produce a text report.
      --[no-]cov-html                          Produce a HTML report.
      --[no-]emma-xml                          Produce an EMMA XML report. [emma.sourceforge.net]
      --[no-]lcov                              Produce a lcov/gcov report.
      --[no-]codecov                           Generate a JSON report for Codecov.io
      --[no-]coveralls                         Send a JSON report to Coveralls if on a CI server
      --[no-]cov-summary                       Prints a summary
      --cov-fail-threshold PERCENT             Sets the percentage threshold at which cloverage will abort the build. Default: 0%
      --cov-low-watermark PERCENT              Sets the low watermark percentage (valid values 0..100). Default: 50%
      --cov-high-watermark PERCENT             Sets the high watermark percentage (valid values 0..100). Default: 80%
      --[no-]cov-nop                           Instrument with noops.
      --cov-ns-regex REGEX                     Regex for instrumented namespaces (can be repeated).
      --cov-ns-exclude-regex REGEX             Regex for namespaces not to be instrumented (can be repeated).
      --cov-src-ns-path PATH                   Path (string) to directory containing test namespaces (can be repeated). Defaults to test suite source paths.

which is a bit weird since it should definitively work, and on another project configured in the same way it works https://github.com/AndreaCrotti/elo/blob/master/.circleci/config.yml#L73

The other thing is that I would need to skip some tests while running test coverage, according to the --help this should work bin/kaocha --skip-meta :e2e --plugin cloverage even if bin/kaocha --skip-meta :e2e does work correctly skipping the undesired tests.

This maybe makes sense since it's cloverage that eventually runs the tests, or is kaocha still controlling which ones should be skipped in theory?

plexus commented 5 years ago

It is likely that something is pulling in an old version of tools.cli, see https://github.com/lambdaisland/kaocha/issues/30

AndreaCrotti commented 5 years ago

Ah yes we were using an older version of tools.cli. The strange thing is that I had to do a lein clean to actually get it to work, but now it seems to be fine, thanks!

plexus commented 5 years ago

Glad you got it working!