GoogleChromeLabs / extension-update-testing-tool

Tool for testing the update flow for Chrome Extensions during development, including permission grants.
Apache License 2.0
141 stars 11 forks source link

Extension Update Testing Tool

The Extension Update Testing Tool is a local extension update server that can be used for testing updates to Chrome Extensions during local development, including permission grants.

Screenshot of Extension Update Testing Tool

Use Cases

This tool serves a number of use cases:

It is particularly useful for (but not limited to) migrations to Manifest V3, since this often involves changes to the permissions an extension requests.

Getting Started

  1. Install Node.js and NPM: https://nodejs.org/
  2. Clone this repository.
  3. Run npm install in the root of the repository.

How to use

  1. Run npm start.
  2. Open the local server at http://localhost:8080.
  3. Drag an unpacked extension (folder or .zip file) to the page.
  4. Follow the instructions to install the extension.
  5. Drag an updated extension to the page, making sure to update the version field in the manifest.json file.
  6. Click "Update" at chrome://extensions to see the extension update.

Advanced Configuration

You can configure the port of the local server using the PORT environment variable, e.g:

PORT=4000 npm start

You can also use WRITE_KEY to write a private key locally and have a consistent extension ID across restarts, e.g:

WRITE_KEY=1 npm start

FAQ

Why do I see "Package is invalid: 'CRX_REQUIRED_PROOF_MISSING'."?

This happens if you try to use the policy install methods but haven't set the required policy keys. If you've already set these, you may need to click "Reload policies" at chrome://policy.

Acknowledgements

This project was inspired by many great community projects, including https://github.com/thom4parisot/crx.

Contributing

Contributions are welcome. See How to Contribute for more information on how to get involved.