我在windows机器上运行serverspec,我正在以html格式创建输出。
rspec 'C:\Ruby Scripts\Test.rb' --format html --out 'C:\Ruby Scripts\Test.html'
但是如果测试用例失败,输出html中包含很多powershell函数列表。如何省略powershell函数并获得摘要?
脚本如下。
require 'spec_helper'
set :backend, :cmd
set :os, :family => 'windows'
# check the msi is installed or not
describe package('Orca') do
it { should be_installed }
end
#
describe windows_registry_key('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyProductName') do
it { should exist }
end
describe windows_registry_key('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyProductName') do
it { should have_property('AppServer') }
end
describe windows_registry_key('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyProductName') do
it { should have_property('DBServer') }
end
describe windows_registry_key('HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyProductName') do
it { should have_property('WebServer') }
end