ruby Rspec+jenkins+allure持續整合
阿新 • • 發佈:2018-11-16
2.ruby下載allure的gem
gem install allure-rspec
3.修改原始碼
C:\Ruby23-x64\lib\ruby\gems\2.3.0\gems\allure-rspec-0.8.0\lib\allure-rspec\formatter.rb
加入require 'pathname'
4.rspec_helper加入程式碼
require 'allure-rspec' RSpec.configure do |c| c.include AllureRSpec::Adaptor end AllureRSpec.configure do|c| c.output_dir = 'allure-results' # default: gen/allure-results c.clean_dir = true # clean the output directory first? (default: true) c.logging_level = Logger::DEBUG # logging level (default: DEBUG) end
5.jenkins配置
- 系統管理>管理外掛>下載Allure Jenkins Plugin
- 系統管理>全域性工具配置>配置allure
- 新建任務並配置
6.構建檢視報告
注意:allure會自動剔除重複的用例,所以用例編寫的時候不要有重複的用例名稱