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,
- 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.
- 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.
- 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.
- 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
精彩评论