ruby Rspec+jenkins+allure持续集成

1.Allure2使用说明

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会自动剔除重复的用例,所以用例编写的时候不要有重复的用例名称

 

posted @ 2018-11-16 14:07  掘屎男孩  阅读(268)  评论(0编辑  收藏  举报