Cloud9 Watir/Selenium Testing

允我心安 提交于 2019-12-05 02:23:07

问题


I have set up Cloud9 and Codeship for a simple Continuous Integration and Delivery system. It works well for developing my website/app. Has anyone been able to develop and run browser based Cucumber tests from within the Cloud9 IDE? If so, what kind of set-up did it require?

PS. I have been trying to get the Watir/Selenium chromedriver installed and working with the 'headless' gem.


回答1:


First an explanation. I found it very easy to set up github, c9.io, and codeship for CI and CD using Cucumber for acceptance testing on Codeship. Unfortunately, developing the Cucumber tests was difficult, because I had to commit, push, and examin the failing Integration tests on codeship. I wanted to be able to quickly run and debug Cucumber scenarios in the IDE. But, there is no browser for watir/selenium to open. Thus the question.

After a day of searching and hint from c9.io on twitter, I have consensed the solution down to two steps ...

  1. Install firefox and xvfb: sudo apt-get install firefox xvfb
  2. Run cucumber in an xvfb context: xvfb-run cucumber


来源:https://stackoverflow.com/questions/26785310/cloud9-watir-selenium-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!