{"id":17724368,"url":"https://github.com/jjgonecrypto/hounds","last_synced_at":"2025-09-23T02:31:54.679Z","repository":{"id":57266898,"uuid":"70113904","full_name":"jjgonecrypto/hounds","owner":"jjgonecrypto","description":"Release the hounds and smoke test any site. The beasts will follow links and stream any page errors to a pipe of your choice.","archived":false,"fork":false,"pushed_at":"2020-05-23T12:13:31.000Z","size":452,"stargazers_count":15,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-20T18:10:03.010Z","etag":null,"topics":["e2e-tests","monkey-test","nightmare","smoke-tests","stream"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjgonecrypto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-06T01:39:32.000Z","updated_at":"2023-09-07T21:05:07.000Z","dependencies_parsed_at":"2022-08-25T03:41:17.912Z","dependency_job_id":null,"html_url":"https://github.com/jjgonecrypto/hounds","commit_stats":null,"previous_names":["justinjmoses/hounds"],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/jjgonecrypto/hounds","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fhounds","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fhounds/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fhounds/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fhounds/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjgonecrypto","download_url":"https://codeload.github.com/jjgonecrypto/hounds/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjgonecrypto%2Fhounds/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276503590,"owners_count":25653915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-23T02:00:09.130Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["e2e-tests","monkey-test","nightmare","smoke-tests","stream"],"created_at":"2024-10-25T15:46:39.160Z","updated_at":"2025-09-23T02:31:54.626Z","avatar_url":"https://github.com/jjgonecrypto.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hounds\n\n*Release the hounds* and smoke test any site. Sanity check after a large refactor, or plug into your CI tool of choice.\u003cbr /\u003e\n![](https://media.giphy.com/media/TVCqfX7rLyMuY/giphy.gif)\n\nThe beasts will follow all links (internal or otherwise) and round up any uncaught page errors. As a seamless unit, they will scour the field for their quarry by spanning out, containing an area, and expanding (breadth-first search).\n\nUses [nightmare](https://github.com/segmentio/nightmare) to fire up an Electron webkit browser (with optional UI).\n\n[![npm version](https://badge.fury.io/js/hounds.svg)](https://badge.fury.io/js/hounds)\n[![GitHub version](https://badge.fury.io/gh/justinjmoses%2Fhounds.svg)](https://badge.fury.io/gh/justinjmoses%2Fhounds) [![CircleCI](https://circleci.com/gh/justinjmoses/hounds.svg?style=svg)](https://circleci.com/gh/justinjmoses/hounds)\n\n## Usage\n\n`npm i hounds`\n\n```javascript\nconst hounds = require('hounds')\n\nconst hunt = hounds.release({ url: 'http://localhost:8080' })\n    .on('error', console.error)\n    .on('end', process.exit)\n\nconst quarry = new Writable({\n    objectMode: true,\n    write: (chunk, enc, next) =\u003e {\n        console.dir(chunk)\n        next()\n    }\n})\n\nhunt.pipe(quarry)\n```\n\nTo use the built-in stdout writers, you can use `hounds.writers.error` and `hounds.writers.url`:\n\n```javascript\nconst hunt = hounds.release({\n    url: 'http://localhost:8080',\n    logTo: hounds.writers.url()\n})\n\nhunt.pipe(hounds.writers.error())\n```\n\nTo show the Electron UI, with devTools open, and keep both alive, use the following options when releasing the hounds:\n\n```javascript\n{\n    url: '...',\n    keepAlive: true,\n    nightmare: {\n        show: true, openDevTools: true\n    }\n}\n```\n\n## Options\n* `url` base URL to start from\n* `keepAlive` don't end the stream or the nightmare session when complete (when combined with `nightmare.show`, allows you to interact with the browser when done).\n* `waitAfterLoadedFor` The number of milliseconds to wait after each page is loaded before following the next link in the queue\n* `maxFollows` The maximum number of links to follow and track (the default is `Infinity`)\n* `timeout` The number of ms before ending the session. When the timeout is reached, the system will end on the next attempt to read from the queue (Note: this has no use when `keepAlive` is `true`). (No default)\n* `logTo` An optional writable stream that all URLs attempting to be processed will be written to.\n* `urlFilter` An optional predicate function, taking the current `url` as a parameter, and returning `true` or `false` as to whether or not to include it in the hunt. Second argument of `domainFiltered` is a bool stating whether or not the host matches (use it if you'd like to include that check in your filter)\n* `before` and `after` callbacks receive nightmare instance and if defined, must return it (see [examples/preAuth.js](https://github.com/justinjmoses/hounds/blob/master/examples/preAuth.js#L14-L26))\n* `screnshot` A function that given the current `url`, returns the path string of the PNG to save\n* `consoleLevel` A string corresponding to one of the [console logging levels](https://github.com/segmentio/nightmare/tree/3.0.1#onconsole-functiontype--arguments-). The default is `error`. In this way, console events that are not Javascript errors can be reported.\n* `nightmare` All [nightmare 3.0.1 options](https://github.com/segmentio/nightmare/tree/3.0.1#nightmareoptions) are supported\n\n## Known Issues\n* `screenshot` with outside domains causes nightmare to hang periodically ([ref issue on nightmare](https://github.com/segmentio/nightmare/issues/955))\n* `console.errors` not currently handled\n* `404`s are not currently handled\n* `/index.html` and `/` are not treated as the same URL, and are both processed\n* Subdomains (including `www`) are treated as different hosts\n* `unpipe()` won't stop the stream from finding results\n* links which are hidden in the page are still detected, could use [jQuery's approach](https://github.com/jquery/jquery/blob/2d4f53416e5f74fa98e0c1d66b6f3c285a12f0ce/test/data/jquery-1.9.1.js#L7474) as an optional workaround\n\n## Examples\n\n```bash\nnpm i hounds\ncd node_modules/hounds/examples\nnpm i\n```\n\nThen try out `node .` for a basic example based on the test fixtures\n\n![hounds-simple](https://cloud.githubusercontent.com/assets/799038/19570264/41277d88-96c7-11e6-9060-83b7590c0cfb.gif)\n\nUnleash them on the latest sites from HackerNews via `node hackerNews`\n\nOr use them against a local site with auth (see [examples/preAuth.js](examples/preAuth.jss#L14-L26))\n\n![hounds-preauth](https://cloud.githubusercontent.com/assets/799038/19570191/ec2cd0a8-96c6-11e6-9586-f3b4fa9507b2.gif)\n\n## Changelog\n* ~~`0.2.0` Supports a single url with a promise~~\n* ~~`0.3.0` Stream support (instead of promises)~~\n    * ~~`0.3.1` Migrated to [nightmare](https://github.com/segmentio/nightmare) - 3x faster than Webdriver/Phantom2 and option to open up devTools~~\n    * ~~`0.3.2` Stream usage cleanup~~\n* ~~`0.4.0` Support to keep the session alive via `keepAlive`~~\n* ~~`0.5.0` Handles console errors that occur after `DOMContentLoaded` (with configurable timeout `waitAfterLoadedFor (ms)`). Follows links now.~~\n* ~~`0.6.0` Prevent visiting the same link twice.~~\n* ~~`0.7.0` Allow max number of links to follow or timeout.~~\n* ~~`0.8.0` Support for logTo writable stream for URLs processed, and correct error emitting bugfix.~~\n* ~~`0.9.0` By default, only links within same `hostname:port` are considered. Override with predicate function `urlFilter`~~\n* ~~`0.10.0` `urlFilter` also receives result of domain check as second argument. Bug fix: no dupes anchors in the one page~~\n* ~~`1.0.0` `before` and `after` callbacks receive nightmare instance and if defined, must return it (see [examples/preAuth.js](https://github.com/justinjmoses/hounds/blob/master/examples/preAuth.js))~~\n* ~~`1.1.0` Upgrading to nightmare 2.8.1~~\n* ~~`1.2.0` Upgrading to nightmare 2.10.0~~\n* ~~`1.2.1` Fixing tests~~\n* ~~`1.3.0` Exposing the writers~~\n* ~~`1.4.0` Support for `screenshot`~~\n* ~~`1.4.1` `prettyjson` to regular dependency~~\n* ~~`1.5.0` Bugfix: `before` is invoked during the initial run and the system waits until it completes~~\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjgonecrypto%2Fhounds","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjgonecrypto%2Fhounds","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjgonecrypto%2Fhounds/lists"}