Why not use shared ActiveRecord connections for Rspec + Selenium?

后端 未结 6 1863
傲寒
傲寒 2020-11-30 23:12

It seems the most commonly accepted way to deal with Selenium and tests is to avoid using transactional fixtures and then using something like database_cleaner between tests

6条回答
  •  长情又很酷
    2020-11-30 23:22

    I was just doing a little reading on this myself. I discovered the snippet you shared here in this blog post:

    http://blog.plataformatec.com.br/2011/12/three-tips-to-improve-the-performance-of-your-test-suite/

    To answer your question directly, the database cleaner github page cautions that it can " result in non-deterministic failures". I'd go right ahead and use it, but if you start running into weird failures, maybe this is a good place to start looking.

提交回复
热议问题