测试WebRTC应用程序

Testing WebRTC applications

测试WebRTC应用程序

When writing automated tests for your WebRTC applications, there are useful configurations that can be enabled for browsers that make development and testing easier.

在为WebRTC应用程序编写自动测试时,可以为浏览器启用一些有用的配置,使开发和测试更容易。

Chrome

When running automated tests on Chrome, the following arguments are useful when launching:

在Chrome上运行自动测试时,以下参数在启动时很有用:

  • --allow-file-access-from-files - Allows API access for file:// URLs
  • --allow-file-access-from-files-允许API访问file:// URLs
  • --disable-translate - Disables the translation popup
  • --disable-translate-禁用翻译弹出窗口
  • --use-fake-ui-for-media-stream - Provide fake media streams. Useful when running on CI servers.
  • --use-fake-ui-for-media-stream-提供虚假媒体流。在CI服务器上运行时很有用。
  • --use-file-for-fake-audio-capture=<filename> - Provide a file to use when capturing audio.
  • --use-file-for-fake-audio-capture=<filename>-提供一个在捕获音频时使用的文件。
  • --use-file-for-fake-video-capture=<filename> - Provide a file to use when capturing video.
  • --use-file-for-fake-video-capture=<filename>-提供一个在拍摄视频时使用的文件。
  • --headless - Run in headless mode. Useful when running on CI servers.
  • --headless-在无头模式下运行。在CI服务器上运行时很有用。
  • --mute-audio - Mute audio output.
  • --mute-audio-将音频输出静音。

Firefox

When running automated tests on Firefox, we need to provide a set of preference keys that will be used on the launched instance. Below is the configuration used for the WebRTC samples automated tests:

在Firefox上运行自动测试时,我们需要提供一组将在启动的实例上使用的首选项密钥。以下是用于WebRTC示例自动测试的配置:

"prefs": {
    "browser.cache.disk.enable": false,
    "browser.cache.disk.capacity": 0,
    "browser.cache.disk.smart_size.enabled": false,
    "browser.cache.disk.smart_size.first_run": false,
    "browser.sessionstore.resume_from_crash": false,
    "browser.startup.page": 0,
    "media.navigator.streams.fake": true,
    "media.navigator.permission.disabled": true,
    "device.storage.enabled": false,
    "media.gstreamer.enabled": false,
    "browser.startup.homepage": "about:blank",
    "browser.startup.firstrunSkipsHomepage": false,
    "extensions.update.enabled": false,
    "app.update.enabled": false,
    "network.http.use-cache": false,
    "browser.shell.checkDefaultBrowser": false
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值