Currently I’m using ruby rake to run ALL selenium ruby webdriver scripts that I have in my test suite, so I just need to run command “rake” in “Start Command Prompt with Ruby” window, then all scripts will be run.
However, now I’m only want to run some scripts in my test suite (NOT all scripts). So, How can I accomplish this thing ? I expect something like typing in Ruby terminal window like: rake test1.rb test2.rb, then sytem will only run two scripts that I have.
task :default do
FileList['test*.rb'].each { |file|
system("ruby #{file} > #{directory_name}/#{file}.out")}
end
Pass the test files you want to run as arguments of your rake task. How to pass arguments: How to pass command line arguments to a rake task