SHARE
TWEET

Untitled

a guest Jan 7th, 2012 309 Never
  1. =begin
  2. how to hook up hudson, ci_reporter and Watir tests
  3.  
  4. 1. install Hudson. add Ruby and Rake plugins
  5. 2. gem install ci_reporter (will be used to jenerate junit style xml reports)
  6. 3. create a job that invokes a rake test task and consumes junit style results from test/reports/*.xml
  7.  
  8. =end
  9.  
  10. # create this in your rake file
  11. gem 'ci_reporter'
  12. require 'ci/reporter/rake/test_unit'
  13.  
  14. # run your rake test task with dependency on ci reporter
  15. Rake::TestTask.new(:test => 'ci:setup:testunit') do |test|
  16.   # your test code
  17. end
  18.  
  19. # then you run run
  20. rake test
  21. # and it will automatically use ci_reporter
  22. # or just have TestTask wihtout dependency
  23. Rake::TestTask.new(:test) do |test|
  24.   # your test code
  25. end
  26.  
  27. # and run rake like this
  28. rake ci:setup:reporter test
  29.  
  30. # either way will work.
RAW Paste Data
Top