test all case and plugin test together
Added by lee yaoer over 7 years ago
Hi,
now I want to get test coverage reports.
The coverage reports include both original and plugin.
how can i do ?
I write a .rake named pluginname.rake at redmine3.4.4/plugins/pluginname/lib/rasks/pluginname.rake
namespace :test do
desc "test coverageall - plugin funtionals and redmine test."
task :coverageall do
ENV["REDMINE_ENV"] = "test"
ENV["COVERAGE"] = "1"
ENV["NAME"] = "redmine_reports"
Rake::Task["test:testall:test"].invoke
end
namespace :testall do
desc 'plugin funtionals and redmine test.'
Rake::TestTask.new :test => "db:test:prepare" do |t|
rm_f "coverage"
t.libs << "test1"
t.verbose = true
t.pattern = "plugins/redmine_reports/test/functional/**/*_test.rb"
t.test_files = FileList['test/integration/lib/redmine/*_test.rb'] +
FileList['test/functional/*_test.rb'] +
FileList['test/integration/lib/redmine/**/*_test.rb'] +
FileList['test/integration/api_test/*_test.rb'] +
FileList['test/integration/*_test.rb'] +
FileList['test/integration/routing/*_test.rb'] +
FileList['test/ui/**/*_test_ui.rb'] +
FileList['test/unit/*_test.rb'] +
FileList['test/unit/lib/redmine/**/**/*_test.rb']
end
end
end
but the coverage isn't include all test , what should I do?
thanks for help