{"id":13596370,"url":"https://github.com/Nike-Inc/burnside","last_synced_at":"2025-04-09T16:32:25.772Z","repository":{"id":57191748,"uuid":"90105491","full_name":"Nike-Inc/burnside","owner":"Nike-Inc","description":"Fast and Reliable E2E Web Testing with only Javascript","archived":false,"fork":false,"pushed_at":"2017-12-22T04:17:07.000Z","size":672,"stargazers_count":381,"open_issues_count":0,"forks_count":21,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-04-05T21:08:29.127Z","etag":null,"topics":["burnside","burnside-proxy","e2e","e2e-testing","javascript","karma","modular","test-runner","webpack"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nike-Inc.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-03T03:45:27.000Z","updated_at":"2024-11-30T17:25:27.000Z","dependencies_parsed_at":"2022-09-01T00:52:05.569Z","dependency_job_id":null,"html_url":"https://github.com/Nike-Inc/burnside","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nike-Inc%2Fburnside","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nike-Inc%2Fburnside/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nike-Inc%2Fburnside/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nike-Inc%2Fburnside/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nike-Inc","download_url":"https://codeload.github.com/Nike-Inc/burnside/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067896,"owners_count":21042373,"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","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":["burnside","burnside-proxy","e2e","e2e-testing","javascript","karma","modular","test-runner","webpack"],"created_at":"2024-08-01T16:02:22.062Z","updated_at":"2025-04-09T16:32:20.763Z","avatar_url":"https://github.com/Nike-Inc.png","language":"JavaScript","readme":"## Burnside\n\n\u003e Test your entire app, end to end, in pure JavaScript\n\nBurnside is an easy to use, modular, and extendable End to End (E2E) testing tool. Burnside leverages the flexibility of JavaScript and the power of modern Browser APIs to inject logic and scripting into your website, without the slowdown of networking for every individual command.\n\n\u003e Looking for something more hands on? Check out Burnside's interactive, [Test-Driven Tutorial!](#tutorial)\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n### Installation\n\n```\n$ npm install --save-dev burnside-cli\n```\n\n\u003ca name=\"usage\"\u003e\u003c/a\u003e\n### Usage\n```JSON\n{\n  \"scripts\": {\n    \"burnside\": \"burnside ./path/to/tests.js --startup='./exampleServer.sh' --condition='start' --wait=5000 --browsers=chrome,firefox\"\n  }\n}  \n```\n\n\u003ca name=\"cli-usage\"\u003e\u003c/a\u003e\n### Command Line Options\nBurnside's CLI supports the following flags:\n\n.alias('b', 'browsers')\n  .alias('t', 'timeout')\n  .alias('s', 'startup')\n  .alias('c', 'condition')\n  .alias('k', 'karmaConfig')\n  .alias('v', 'verbose')\n\n| Options | Example | Purpose |\n| ------ | ------- | ------- |\n| `\u003cdefault\u003e` | `./path/to/tests.js` | Your Test File. Webpack is built in so use `require` for more files. |\n| `--verbose` `-v` | `--verbose` | Turns up logging and adds request tracing |\n| `--startup` `-s` | `--startup='./exampleServer.sh'` | An _optional_ startup command for your application. |\n| `--condition` `-c` | `--condition='startup'` | An _optional_ startup message for Burnside to wait on |\n| `--wait` `-w` | `--wait=500` | The amount of time Burnside will wait for the `startup` `condition` to be reached, if specified. Defaults to 5000 |\n| `--browsers` `-b` | `--browsers=chrome,firefox` | The browsers Burnside should attempt to use when testing. You're responsible for making sure they are installed and configured. Available: `chrome` and `firefox` |\n| `--karmaConfig` `-k` | `--karmaConfig=./burnside.karma.conf.js` | A relative path to an optional Karma configuration. You can use this to override settings, inject Karma plugins, and configure them while also allowing Burnside to add in its own [required Karma configuration](https://github.com/Nike-Inc/burnside/tree/master/packages/burnside-cli/karma.conf.js) to be layered on afterward. For more information visit on how to work with Karma, visit its [Documentation](https://karma-runner.github.io/1.0/config/configuration-file.html) |\n\nBurnside is a modular ecosystem based on a core that runs inside of a Browser. The CLI bundles Karma and Webpack to load your tests within Chrome, but you can use Burnside's core with any Test Runner you'd like to set up.\n\u003e If you'd like to configure your own test runner, we've included a [Sample project](https://github.com/Nike-Inc/burnside/tree/master/packages/burnside-sample) configured to use Karma and Webpack directly.\n\n\u003ca name=\"basic-usage\"\u003e\u003c/a\u003e\n### Test usage\n\n```js\nconst Burnside = window.Burnside; // or `import Burnside` if you're not using the CLI\n\nconst burnside = new Burnside({\n  host: 'http://localhost:3000',\n  path: '/index.html'\n});\n\n// now you can execute any function and capture the result!\nburnside\n  .exec(['.header'], selector =\u003e {\n    return document.querySelector(selector);\n  })\n  .then(value =\u003e {\n    // assert on value here\n  })\n```\n\n\u003e For more complete documentation of Burnside, check out our [API](https://github.com/Nike-Inc/burnside/blob/master/docs/api.md) and [Architecture](https://github.com/Nike-Inc/burnside/blob/master/docs/architecture.md) documentation.\n\n\u003ca name=\"proxy-config\"\u003e\u003c/a\u003e\n### Burnside Local Proxy Configuration\nBurnside consists of two main moving parts: the Core JS and a Proxy that runs locally in the background that handles injecting Burnside's JS Client into the page. Because the proxy is used by the browsers for every outbound request, we've also added some additional features that can allow you to fine tune your testing.\n\nBurnside's proxy is configured via a `.burnside-localproxyrc` at the root of your project. Below is a documented example:\n\n```js\n{\n  \"key\": \"./certs/localhost.privkey.pem\", // the key and certificate to use for SSL decryption\n  \"cert\": \"./certs/localhost.cert.pem\",\n  \"port\": 9888, // the port you want the Proxy to run on\n  \"extensions\": [  // an array of names of Extensions for Burnside to use when injecting the client\n    \"burnside-dom\"\n  ]\n  \"replaceImages\": true,  // enables a feature that replaces all images with a default for faster testing (also accepts an image filepath e.g. \"./path/to/my/image.png\" )\n  \"injects\": [ // an array of urls mapped into injected javascript tags\n    \"https://cdnjs.cloudflare.com/ajax/libs/sinon.js/1.15.4/sinon.min.js\"\n  ],\n  \"request\": { // headers to (over)write on outbound network requests\n    \"headers\": {\n      \"secret-custom-header\": \"\u003cSHARED-SECRET\u003e\"\n    }\n  },\n  \"response\": { // headers to (over)write on network request responses\n    \"headers\": {\n      \"Access-Control-Allow-Origin\": \"*\"\n    }\n  }\n}\n```\n\n\u003e Note: In order to intercept and decrypt SSL traffic Burnside's Local Proxy utilizes a simple self signed certificate. If you encounter issues decrypting SSL pages, consider regenerating these files with fresh credentials using the script found in [/packages/burnside-localproxy/make-cert.sh](/packages/burnside-localproxy/make-cert.sh) as a base.\n\n\u003ca name=\"how\"\u003e\u003c/a\u003e\n### How It Works\n\nBurnside runs your application inside an iframe and uses iframe messaging to communicate between test code and the application. This is in contrast to the approach taken by the Selenium webdriver, which instead uses HTTP to communicate interactions between tests and the application, introducing more network latency and inconsistency to your test suite.\n\n![overview.png](overview.png)\n\n\u003ca name=\"tutorial\"\u003e\u003c/a\u003e\n## Tutorial Setup Instructions\n\nThe Burnside tutorial is a set of exercises designed to walk you through how to use Burnside properly and to give you some pointers in the process. To run it, you need to clone the repository and install its dependencies.\n\n\u003e System requirements: Node Runtime Installed Matching the `package.json` specifications\n```\ngit clone https://github.com/Nike-Inc/burnside.git\n\ncd burnside \u0026\u0026 npm run tutorial\n```\nNow you're all configured! If you'd like to contribute to the Tutorial, please read our [Tutorial Developers Guide](https://github.com/Nike-Inc/burnside/blob/master/docs/tutorial.md)\n\n## License\n\n[LICENSE](LICENSE)\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNike-Inc%2Fburnside","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNike-Inc%2Fburnside","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNike-Inc%2Fburnside/lists"}