Lamp with cucumber
I am using Cucumber with Selenium, FixtureReplacement and DatabaseCleaner.
Oddly enough, my data that I created with FixtureReplacement is not available from my tests.
I added my own selenium rail framework and I am using my own profile for my advanced selenium features. My cucumber setting for selenium profile:
Webrat.configure do |config|
config.mode = :selenium
config.application_environment = :selenium
end
Cucumber::Rails::World.use_transactional_fixtures = false
require "database_cleaner"
# Clean the database once when starting
DatabaseCleaner.clean_with :truncation
DatabaseCleaner.strategy = :truncation
Before do
DatabaseCleaner.start
include FixtureReplacement
end
After do
DatabaseCleaner.clean
end
# this is necessary to have webrat "wait_for" the response body to be available
# when writing steps that match against the response body returned by selenium
World(Webrat::Selenium::Matchers)
FixtureReplacement works well, I tested it in the Rails console.
I am running my selenium functions with
RAILS_ENV=selenium cucumber -p selenium features/enhanced/test.feature
Does anyone know a solution to this problem?
Regards
+2
source to share
2 answers
It had nothing to do with Fixtures. I thought I could not access my data because I could not login.
The following fixed: Cucumbers + selenium crashing randomly
+1
source to share