How can I run all my selenium tests sequentially in C#?

Cucumber (BDD framework): How can I make use_transactional_fixtures run only on @javascript scenarios?

  • So, some of my scenarios are tagged with @javascript so that they are run with selenium instead of rack_test. To make selenium tests work properly with the database, I had to disable transactional fixtures in my features/support/env.rb: Cucumber::Rails::World.use_transactional_fixtures = false DatabaseCleaner.strategy = :truncation Now, this works fine, but I want my test suite to be nice and speedy and NOT truncate the database more often than necessary (as it is an expensive operation). I.e. on scenarios not tagged with @javascript, I'd like to have use_transactional_fixtures = true. Where can I configure this?

  • Answer:

    There has been some churn recently in cucumber-rails' support for database cleaning on @javascript scenarios. As of version 1.2.0 you can now choose whether to have @javascript scenarios use truncation or transactions for cleaning the database between scenarios. The rest of your suite can use a transaction-based cleaning strategy. See https://github.com/cucumber/cucumber-rails/blob/master/features/choose_javascript_database_strategy.feature for further details.

Matt Wynne at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.