自动测试WebRTC应用程序? [英] Automated testing of webrtc application?
问题描述
我正在开发一个会议应用程序,详细信息:
I am developing a conferencing app, details:
-
目标:Chrome浏览器
target: chrome browser
服务器:node.js(当前为Windows env)
server: node.js ( currently windows env)
最简单的测试方案是:
- 打开两个浏览器选项卡(如果需要,请打开浏览器)
- 模拟按钮单击两者.
- 模拟接受getUserMedia请求(最困难的部分)
- 更多仿真内容,并读取JavaScript变量值并进行验证.
- open two browser tabs( open browser if need be)
- emulate button click on both.
- emulate accept getUserMedia request( hardest part)
- more emulation stuff and reading JavaScript variable values and verifying them.
到目前为止,我一直在对所有这些进行手动测试,但是从长远来看,这是不切实际的.
我没有做太多的自动化测试(只是一些单元测试).最初,我以为mocha
可以完成工作,但是开始认为这还不够.
Till now, I have been doing manual testing for all of this, but decided that it would be impractical for the long run.
I have not done much automated testing( just a bit of unit testing). Initially, i thought mocha
would do the job, but beginning to think it is not enough.
我需要一些有关实现浏览器启动,打开标签和授予媒体共享权限所需的tools or alternate test frameworks
的指针.
I need some pointers as to what are tools or alternate test frameworks
needed to achieve browser starting, tab opening and giving media sharing permissions.
推荐答案
Chrome浏览器具有用于跳过get getUserMedia权限以及使用假设备的命令行标志:
Chrome has command line flags for skipping get getUserMedia permission as well as using fake devices:
- -use-fake-ui-for-media-stream(跳过GUM权限提示)
- -使用假设备进行媒体流(使用假设备)
检查 http://blog.andyet.com/2014/09/29/testing- webrtc-applications , http://googletesting. blogspot.se/2014/08/chrome-firefox-webrtc-interop-test-pt-1.html 获取背景信息
如果要单击按钮,则此功能的标准工具是硒.如果您更喜欢Javascript而不是Java,那么您可能正在寻找诸如webdriver.io之类的绑定.
If you want to click buttons, the standard tool for this is selenium. If you prefer Javascript to Java, a binding such as webdriver.io might be what you're looking for.
这篇关于自动测试WebRTC应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!