We are developing a Twilio based web application (AngularJS and Microsoft WebAPI) and have assembled a number of automated tests using SpecFlow, Selenium Webdriver and Chromedriver. We use the Programmable Voice component to make calls and the automated tests make calls to test numbers. The tests all run fine on developer machines, but when deployed on Windows 2012R2 Datacenter virtual machines running on VMWare VSphere/ESXi 6 hosts they fail as Chromedriver cannot find a recording device so therefore won't establish the WebRTC connection to Twilio. The hosts that we use do not have a sound card and therefore show no audio devices available to the VMs. I believe we can add a USB sound card to the host and share it with one VM, but this is a clunky solution that renders VMWare DRS a bit useless and we have several VMs that we'd like to run these tests on. I'm hoping I'm not the first person to try to use automated testing with Twilio so was looking for how others had implemented it in a virtual/cloud environment? I have raised a support case with Twilio but they had no ideas.
Devin Rader provided the answer. blog.andyet.com/2014/09/29/testing-webrtc-applications explains how to add a switch to Chrome (--use-fake-device-for-media-stream) that fakes a microphone and means that you can make a WebRTC connection in Chrome without a microphone device. There is also a switch for Firefox that I assume works but I haven't tried it. The switch also works with Chromedriver and I have successfully run Selenium tests using Chromedriver on a Windows 2012R2 server VM with no sound card. Thanks Devin.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments