Run cucumber tests on heroku

I am thinking of running my cucumber tests on my rails app when it is running on heroku. Is this a sane way to check for differences between development environment and deployment environment?

Does anybody have any experience of this kind of scenario? Rake -T tells me "cucumber rake task not available (cucumber not installed)" even though I have specified cucumber-rails in my .gems file. Am I approaching this from the wrong angle?

Any ideas or suggestions?


You could use a seperate Heroku instance and deploy your app to there. You should then be able to run your tests via heroku rake.

You can use the --app parameter to the heroku command line to choose which instance to run commands on. Just dont delete your prod database by accident.


That would require the creation, modification and subsequent removal of a test database, and since Heroku ignores the database.yml file, this would not be possible at all.

You may try running your app in the testing environment by setting it in the console, and then you may be able to run tests

heroku config:add RACK_ENV=test

but even if you get this to work, say goodbye to your production database as I'm pretty sure Heroku will again override the database.yml and use the database it automatically assigned to your app.

You may also consider creating a second app on Heroku just for testing.


您的宝石清单中是否还有cucumber宝石?

链接地址: http://www.djcxy.com/p/47860.html

上一篇: 事件驱动的架构...无限循环

下一篇: 在heroku上运行黄瓜测试