Skip to content
This repository

Yeti 0.2.27 — First-class code coverage

Reid Burke reid released this February 13, 2014 · 4 commits to master since this release

Yeti 0.2.27 provides first-class code coverage reporting provided by Istanbul.

Simply use Yeti with the -c or --coverage option. By default, Yeti will instrument your code on-the-fly and show a brief summary.

$ yeti -c
Found 1 file to test.
  Agent connected: Chrome (34.0.1825.4) / Mac OS from 127.0.0.1
✓ Testing started on Chrome (34.0.1825.4) / Mac OS
✓ Agent completed: Chrome (34.0.1825.4) / Mac OS
Coverage summary:
Statements   : 96.02% ( 1110/1156 )
Branches     : 88.53% ( 772/872 )
Functions    : 97.45% ( 229/235 )
Lines        : 96.27% ( 1110/1153 )
✓ 397 tests passed! (7 seconds)

Use the --coverage-report option to generate reports written to ./coverage
or another directory defined by --coverage-dir. Values for --coverage-report include:

  • lcov for LCOV and HTML reports.
  • lcovonly for LCOV without HTML.
  • html for HTML only.
  • json for Istanbul JSON.
  • summary for the default summary shown above.
  • Any other report supported by Istanbul.

Excluding files from instrumentation

Yeti instruments all JavaScript files automatically with Istanbul. If you'd prefer to instrument
your JavaScript code with Istanbul as a part of a build step, you can pass --no-instrument
to skip all instrumenting. Yeti will still generate code coverage reports if used with
the --coverage option.

If you'd like to exclude some JavaScript files from instrumenting, you can pass multiple
--instrument-exclude options defining minimatch patterns to exclude.

$ yeti -c --instrument-exclude "vendor/**" --instrument-exclude "**.nocover.js"

To prevent needing to specify these verbose options every time, you can put a
coverageOptions object in your project's .yeti.json file containing configuration
that is only used with --coverage.

In this example, YUI defines options that disable built-in instrumentation and passes the query string parameter filter=coverage to cause its tests to load pre-instrumented files:

$ cd yui3/src/app
$ cat ../../.yeti.json
{
    "basedir": ".",
    "glob": "**/tests/unit/*.html",
    "coverageOptions": {
        "instrument": false,
        "query": "filter=coverage"
    }
}
$ yeti -c # will run with --no-instrument --query "filter=coverage"
Found 1 file to test.
  Agent connected: Chrome (34.0.1825.4) / Mac OS from 127.0.0.1
✓ Testing started on Chrome (34.0.1825.4) / Mac OS
✓ Agent completed: Chrome (34.0.1825.4) / Mac OS
Coverage summary:
Statements   : 96.02% ( 1110/1156 )
Branches     : 88.53% ( 772/872 )
Functions    : 97.45% ( 229/235 )
Lines        : 96.27% ( 1110/1153 )
✓ 397 tests passed! (7 seconds)

Prefer --caps for browser launching

Yeti 0.2.25 introduced the --caps option that lets you specify Selenium capabilities directly instead of using Yeti's --browser option. The --browser option allowed for shorthand to be used for launching browsers like -b firefox/xp; however, transforming the shorthand into Selenium capabilities is difficult because many services name operating systems and browsers differently. Should we intrepret the shorthand xp as XP, WINDOWS, or Windows XP?

That's why this release deprecates --browser in favor of --caps. The --browser option will continue to be supported until Yeti 0.3, but if you're using Yeti to launch browsers, we recommend that you switch to using --caps. For the exact capabilities to use, check the documentation for your Selenium provider, such as the platforms page for Sauce Labs. For example, this will launch Firefox 26 on Sauce Labs:

yeti --caps "browserName=firefox;version=26;platform=Windows XP" test.html

Get Yeti

Install the latest version of Yeti with npm install -g yeti. Thanks and enjoy!

Yeti 0.2.26 — Bug fixes and feedback in CI

Reid Burke reid released this February 07, 2014 · 28 commits to master since this release

Today's release prints useful feedback to stderr when Yeti is used in CI. It also includes a fix for issue #74 (Unable to serve error) and #68 (improve DOH support).

When using Yeti to in CI, e.g. to produce JUnit XML output, previous versions of Yeti would go silent after testing began as Yeti produced XML output on stdout. This made it difficult to determine if Yeti was doing anything while tests ran. When using Yeti with --junit, today's release prints status after every test completion to stderr while XML prints to stdout.

Big thanks to @henryqdineen for contributing the fix for DOH support!

In addition to fixing bugs, we have made some improvements to Yeti's own tests and to Yeti's documentation. Yeti's website now uses Pure for your viewing pleasure on desktop and mobile devices.

Full Changelog

  • Automate most of the release in the fabfile.
  • Update package metadata. Add SPDX license.
  • Update browser versions on landing page.
  • Update contribute doc with new URLs, branding.
  • Only strip 2 lines from the Contribute page.
  • Fix light sub-heading on landing page.
  • Switch to Pure from YUI CSS. Add Yahoo logo.
  • Update Elsewhere links to new GitHub locations.
  • Move remaining Makefile tasks into the Jakefile.
  • Use GitHub Releases in favor of HISTORY.md.
  • Generate Selleck project file from package.json.
  • Fix #68. Fix doh support. (Thanks @henryqdineen!)
  • Fix #74. Do not lookup agents when destroyed.
  • Add missing err argument to getPathname callbacks.
  • Use onUrlChanged to detect page navigation.
  • Fix typo in functional test comment.
  • Fix JSHint errors.
  • Avoid calling rl.write when rl is not a terminal.
  • Prevent double line update after each test.
  • Do not print lines on beat if output isn't a TTY.
  • When JUnit requested, show status on stderr.
  • Move submitBatch reporter logic into helper fn.
  • Move shared CLI and Reporters IO into Console.
  • Exit code 3 for test completion with failures.
  • .jshintrc -> package.json. Remove globalstrict.
  • Depend on mock-utf8-stream.
  • Report raw WD response if response was not JSON.
  • New Yahoo branding.
  • Update copyright year.

Yeti 0.2.25 — More flexible Selenium launching

Reid Burke reid released this December 20, 2013 · 60 commits to master since this release

Since our last release in July, Yeti has been used to automate over 21 million tests for YUI.

We've been refining Yeti as we've used it to automate testing for every YUI commit across 14 environments. Yeti has been rock solid and we're pleased to present our best release yet.

Selenium launching with --caps

The new --caps option makes it easier than ever to specify environments that aren't covered by Yeti's simple --browser option. This lets you launch browsers and give custom parameters exactly as required by Selenium services like Sauce Labs or BrowserStack. For example:

Launch Safari 7 on Sauce Labs

yeti --caps "platform=OS X 10.9;browserName=safari;version=7" --hub http://yeti.example.com/

Launch Safari 7 on BrowserStack

Includes screenshots with browserstack.debug.

yeti --caps "os=OS X;os_version=Mavericks;browser=Safari;version=7.0;browserstack.debug=true" --hub http://yeti.example.com/

Launch iOS 7 on iPhone 5s on BrowserStack

Includes screenshots with browserstack.debug.

yeti --caps "platform=MAC;device=iPhone 5S;browserName=iPhone;browserstack.debug=true" --hub http://yeti.example.com/

More Changes

  • Fix Windows support by using USERPROFILE instead of HOME for configuration locator.
  • Fix potential memory leaks by breaking references to objects when testing completes.
  • Fix "No browsers connected, exiting" bug.
  • Fix crash when encoding an undefined value in the JUnit XML reporter.
  • Fix bug in internal state when test skipped because it did not exist.
  • Add IE 11 and Windows 8.1 to User-Agent list.
  • Update wd and request dependencies.

Stay tuned for more Yeti updates in 2014! Have a great holiday and New Year.

Get Yeti

You can upgrade now by running npm install -g yeti. Learn more about Yeti at yeti.cx.

Something went wrong with that request. Please try again.