简体   繁体   English

如何测试Chrome扩展程序以获取自动更新功能?

[英]How to test Chrome extension for auto-update feature?

I am about to finish my Google Chrome extension. 我即将完成Google Chrome扩展程序。 If I'm not mistaking all Chrome apps come with a capability of auto-updating. 如果我没有误认为所有Chrome应用都具有自动更新功能。 If so, is there a way for me to test it before I submit my app to the Chrome Web Store? 如果是这样,在我将应用程序提交到Chrome网上应用店之前,有没有办法对其进行测试?

PS. PS。 Also do I need to account for any special conditions in my extension? 我还需要考虑我的扩展中的任何特殊情况吗?

To test the updating procedure, it's best to submit your extension to the Web Store in a non-public fashion. 要测试更新过程,最好以非公开方式将扩展名提交到Web Store。

As you publish an item, you have a choice of Public, Unlisted, and Trusted Testers publication. 在发布项目时,您可以选择公开,不公开和可信测试者出版物。

  • Public means that the extension will be searchable and everyone can install 公共意味着扩展程序将是可搜索的,每个人都可以安装
  • Unlisted means everyone can install, but they need the direct link to the extension listing; 不公开表示每个人都可以安装,但他们需要直接链接到扩展名列表; it will not be searchable in the Web Store and not indexable by search engines. 它不能在网上商店中搜索到,也不能被搜索引擎索引。
  • Trusted Testers is the same as above, but also restricts installs to a whitelist of Google Accounts. 受信任的测试人员与上述相同,但也会将安装限制为Google帐户的白名单。

Go with any non-Public option and you can test it as it would actually behave (including the unfortunate delay of automatic review checks). 使用任何非公共选项,您可以测试它实际上的行为(包括不幸的自动审查检查延迟)。


The method described by kadaj is no longer valid for Windows , as Chrome will reject any CRX not hosted by the Web Store. kadaj描述的方法不再适用于Windows ,因为Chrome会拒绝任何非网络商店托管的CRX。

But previously, yes, you could test this with setting up your own hosting (ie Dropbox Public folder) of the CRX and its associated update XML, as described in the guide . 但是之前,是的,你可以通过设置你自己的CRX托管(即Dropbox公共文件夹)及其相关的更新XML来测试这一点,如指南所述 This still works for non-Windows platforms, as well as Dev/Canary builds on Windows. 这仍然适用于非Windows平台,以及Windows上的Dev / Canary构建。

All you need is to increment version number in your manifest file and the chrome app will automatically update itself. 您只需在清单文件中增加版本号,Chrome应用程序就会自动更新。 If you want to test this you can host your own extension and specify a update_url . 如果要对此进行测试,可以托管自己的扩展并指定update_url Follow the guide at https://developer.chrome.com/extensions/autoupdate 按照https://developer.chrome.com/extensions/autoupdate上的指南操作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM