Reputation: 1438
We have two separate Ruby on Rails apps, one that accepts uploaded files, the other that produces files from the uploads the other app received.
We're trying to put together end-to-end blackbox regression and integration tests that demonstrate that when you upload a certain file to the first app, you can count on getting a certain file out of the other app.
The question is how to script this, so that the two separate databases are reset with seeded values, the two servers are fired up and Capybara visits the two separate "web sites."
So far in building and testing each app we have relied on the Rails magic that makes things "just work," so dealing with separate databases, separate server ports and other unknown wrinkles is looking like a stumbling block.
Has anyone written up best practices for this kind of testing? Any examples of how to automate this kind of integration testing?
Upvotes: 2
Views: 229
Reputation: 1196
You can put the both apps online with Heroku. Then use sauce_ruby gem from saucelabs.com as a connector to get rspec and capybara to run tests agains apps. Run heroku run rake db:reset to reseed (with seed.rb) the data before the tests(you can script this). sauce ruby
Upvotes: 1