rspecからHTMLレポートを生成するにはどうすればよいですか?前の回答をオフに構築rspecからHTMLファイルを生成
rspec <path_to_spec_file> --format html
rspecからHTMLレポートを生成するにはどうすればよいですか?前の回答をオフに構築rspecからHTMLファイルを生成
rspec <path_to_spec_file> --format html
RSpecのは、HTML形式の出力を生成するためのコマンドラインオプションを持っている
rspec /directory/containing/specs/** --format h > output.html
私は私のレールのアプリのルートからこれを実行します/ **以下のパスを指定してください。 私はそれが助けてくれることを願っています。 "_spec.rb"以外のファイルがある場合は、パス引数を変更する必要があります。
、その非常に単純:
"--out out.html"の代わりに "> out.html"を使用した場合の問題は、rspecコマンドが '<!DOCTYPE html>の上のHTMLファイルにエコーされるということです。 –
シナリオ
https://www.relishapp.com/rspec/rspec-core/docs/command-line/format-optionから:私はrspec example_spec.rb --format progress --format documentation --out rspec.txt
を実行すると、出力が ".F *"
およびファイル "rspec.txt" を含める必要があり、複数の形式
something does something that passes does something that fails (FAILED - 1) does something that is pending (PENDING: No reason given)
ジェンキンスを使用してそれらのため
を見て。
我々は.rspecする
--format html
--out rspec_results.html
を追加することができますフォーマットに
rspec spec/* --format html --out report.html
を指定する-f
または--format
オプションを使用し
rspec_results.htmlする結果を書き込みますので、RSpecの
を参照してください。
rspec_html_formatter
gemを使用すると、かなりRSpecのHTMLレポートを生成できます。実装については、https://github.com/kingsleyh/rspec_reports_formatterを参照してください。
rspec -f RspecHtmlFormatter spec
bascially私の問題は、私はレポートを生成するには、この可能単一のHTML file.Is内のすべてのコントローラの私のすべてのテストケースのHTML形式のレポートを生成したいということです???? –