• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

wfscheper / xkcdpwd / 30 / 2
86%
master: 86%

Build:
DEFAULT BRANCH: master
Ran 07 Apr 2018 01:32AM UTC
Files 3
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Apr 2018 01:29AM UTC coverage: 72.477% (-27.5%) from 100.0%
30.2

push

travis-ci

wfscheper
tRestructure project layout and add test framework

We need a way to run command-line functional tests. This adds a basic
framework based on the golden files pattern used by the dep tool. In
order for this to work, we also move command line code into
a subdirectory and pull the dictionary portion out to a top-level
xkcdpwd package. Drop cobra in favor of go flags command-line ala the
dep project, because cobra's model doesn't let us test the command-line
both in-line and as a subprocess in parallel. We want to do this so we
can get coverage metrics and functionally test the binary.

The integration tests use a testdata directory in cmd/xkcdcmd. The test
harness recursively walks that directory looking for testscase.json
files. The test name is the path from testdata to the testcase.json
file.

The json file describes how to run the tests, and if the last test
command is expected to generate an error. Optionally, a file stdout.txt
records the expected output of the commmand.

Given that xkcdpwd generates random passphrases, in order for static
files to properly express the expected output, we use a test build tag
to bake in an english dictionary of only one word.

79 of 109 relevant lines covered (72.48%)

4.57 hits per line

Source Files on job 30.2
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 10
  • Travis Job 30.2
  • b1930391 on github
  • Prev Job for on master (#5.2)
  • Next Job for on master (#31.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc