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

wfscheper / xkcdpwd / 31 / 1
86%
master: 86%

Build:
DEFAULT BRANCH: master
Ran 07 Apr 2018 01:30AM 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%. Remained the same
31.1

push

travis-ci

wfscheper
Restructure 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 31.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 11
  • Travis Job 31.1
  • 3271034b on github
  • Prev Job for on master (#30.1)
  • Next Job for on master (#35.1)
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