webrat in selenium mode reports files executed in rcov but doesn't reflect the code that was executed
Reported by Kurt Kowar | June 9th, 2009 @ 06:56 PM
Comments and changes to this ticket
-
gaffo June 10th, 2009 @ 03:39 PM
- State changed from new to open
Kurt, I'm not really sure what you mean by this.
-
Edgars Beigarts July 8th, 2009 @ 09:15 AM
Selenium starts mongrel in backround so coverage is not calculated for this processs.
I have moneky patched RailsApplicationServer start_command and now it displays correctly for me.
It wotk un mac and linux. On windows i don't know how to get path to mongrel_rails (on linux i can get it with whitch command) ?
@@@ require "webrat/selenium/rails_application_server"
module Webrat
module Seleniumclass RailsApplicationServer < ApplicationServer def start_command_with_rcov rcov_opts = %{--exclude "spec/*,gems/*,features/*,/Library/*" --rails --aggregate "coverage.data"} mongrel_rails_path = `which mongrel_rails`.delete("\n") start_command = start_command_without_rcov.gsub("mongrel_rails", "#{mongrel_rails_path} --") "rcov #{rcov_opts} #{start_command}" end alias_method_chain :start_command, :rcov end
end end
@@@ rcov --exclude "spec/,gems/,features/,/Library/" --rails --aggregate "coverage.data" /usr/bin/mongrel_rails -- start -d --chdir='/Users/be/code/mycrm' --port=3000 --environment=test --pid ~/code/test_app/tmp/pids/mongrel_selenium.pid &
-
gaffo July 8th, 2009 @ 09:59 AM
Edgars,
You may want to take a look at:
http://github.com/gaffo/mainline, it might be doing what you want.
-Mike
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
Ruby Acceptance Testing for Web applications.