Skip to content
Cheng Lou edited this page Aug 25, 2014 · 4 revisions
  Usage: hux [options] <globs ...>

  Options:

    -h, --help               output usage information
    -V, --version            output the version number
    -r, --record             Record a new test
    -w, --write              Write new screenshots using the automated steps
    -c, --compare            Compare screenshots against preexisting written ones
    -b, --browser <browser>  Default: Firefox. Chrome needs extra setup (See README).
    -o, --only <taskName>    Run only the designated task.
    -s, --server <url>       Default: Firefox: http://localhost:4444/wd/hub. Chrome: http://localhost:9515. Address of the Selenium server.

  Defaults to search every Huxleyfile in current & nested folders.
  Optionally pass a list of Huxleyfile paths. Accepts glob patterns.

  Example:

    hux --record examples/**
    hux --write ./test ./tests-with-nested-folders/**
    hux --compare examples/nested/ --only testInput1

write and compare mode seem useful, but in reality, you'd probably use the default hux mode 95% of the time. The default mode is a workflow which...

  • checks the unchanged tasks between your repo's current state and the previous clean state
  • stashes correctly your git change
  • runs hux --write and saves screenshots of your repo before your changes
  • unstashes
  • hux --compare to record the new screenshots and compare with the previously recorded ones
  • cleans up the temporary screenshot folders whose screenshots look the same before and after.

The --only <taskName> flag is pretty useful. You'd probably use that a lot in your ordinary workflow.

  • Switch the default browser: Currently, only Firefox and Chrome are supported. For Chrome, you need chromedriver, which doesn't come bundled with Selenium yet. If you're using Brew, just do brew install chromedriver and start it with chromedriver. Then start huxley with the browser flag: hux --browser chrome.

  • Record actions in real-time: Huxley, by default, ignores the recorded delay between your keystrokes, clicks, scrolls, etc. to speed up the tests. But for UI transitions and AJAX requests, you'd want the delay. During recording, press l enter to start recording in real-time. l enter again to stop the live recording.

  • Inject a custom driver: see the API page.

Clone this wiki locally