开发者

Run selenium on a remote server

I am writing integration test for one of my project, usi开发者_Go百科ng the following gems for the same, rspec, capybara and selenium.

I face the following challenges in the same,

  1. I want to run the test on an existing database, i don't want to clear the existing data before or after executing the test.
  2. We have a remote server for integration testing. Is it possible to run the test on a remove server? The way i would like to go is after updating the build on integration server, i would like to go for a integration test using selenium.

Any help is highly appreciated.


  1. Sorry, but selenium tests cannot be run in a transaction. You have to (for example) dump database and load previously prepared database after executing each test.
  2. Yes, it is possible. What solution you're using for continuous integration and build management? What's the problem you're encountering? Can you describe it?


Got the solution, we need to do as follows,

Capybara.current_driver = :selenium
Capybara.app_host = 'http://www.google.com'
...
visit('/')

Reference: capybara gem

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜