0

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

その結果、下の画像に示すように Powershell 機能が提供されます。この Powershell 関数を結果 html から省略する方法。 ここに画像の説明を入力

4

0 に答える 0