Class: SpecFlowReport
- Inherits:
-
Object
- Object
- SpecFlowReport
- Defined in:
- lib/albacore/specflowreport.rb
Instance Attribute Summary
Attributes included from Albacore::RunCommand
Attributes included from Logging
Instance Method Summary collapse
- #execute ⇒ Object
- #get_command_line ⇒ Object
- #get_command_parameters ⇒ Object
- #get_options ⇒ Object
- #get_projects ⇒ Object
-
#initialize(command = nil, report = nil) ⇒ SpecFlowReport
constructor
A new instance of SpecFlowReport.
Methods included from Configuration::SpecFlowReport
included, #specflowreport, specflowreportconfig
Methods included from Albacore::Configuration
Methods included from Albacore::RunCommand
Methods included from AttrMethods
Methods included from Albacore::Task
clean_dirname, create_rake_task, include_config, included
Methods included from UpdateAttributes
Methods included from YAMLConfig
#configure, #load_config_by_task_name
Methods included from Logging
#create_logger, #log_device=, #log_level, #log_level=
Methods included from Failure
Constructor Details
#initialize(command = nil, report = nil) ⇒ SpecFlowReport
Returns a new instance of SpecFlowReport.
11 12 13 14 15 16 17 18 |
# File 'lib/albacore/specflowreport.rb', line 11 def initialize(command=nil, report=nil) @options=[] @projects =[] super() update_attributes specflowreport.to_hash @command = command unless command.nil? @report = report unless command.nil? end |
Instance Method Details
#execute ⇒ Object
55 56 57 58 59 60 61 |
# File 'lib/albacore/specflowreport.rb', line 55 def execute() command_params = get_command_parameters result = run_command "specflow.exe", command_params.join(" ") = 'SpecFlow Failed. See Build Log For Detail. ' + command_params.join(" ") if !result end |
#get_command_line ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/albacore/specflowreport.rb', line 20 def get_command_line command_params = [] command_params << @command command_params << get_command_parameters commandline = command_params.join(" ") @logger.debug "Build SpecFlow Command Line: " + commandline commandline end |
#get_command_parameters ⇒ Object
47 48 49 50 51 52 53 |
# File 'lib/albacore/specflowreport.rb', line 47 def get_command_parameters command_params = [] command_params << @report command_params << get_projects command_params << command_params end |
#get_options ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/albacore/specflowreport.rb', line 39 def if @options.empty? then "/xmlTestResult:TestResult.xml /out:specs.html" else @options.join(" ") end end |
#get_projects ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'lib/albacore/specflowreport.rb', line 29 def get_projects if @projects.empty? then = "SpecFlow Expects at list one project file" @logger.debug else @projects.map{|asm| "\"#{asm}\""}.join(' ') end end |