从 rspec 生成 HTML 文件 [英] Generate HTML file from rspec

查看:48
本文介绍了从 rspec 生成 HTML 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从 rspec 生成 HTML 报告?

How do I generate an HTML report from rspec?

推荐答案

建立在上一个答案的基础上,非常简单:

Building off the previous answer, its pretty simple:

rspec /directory/containing/specs/** --format h > output.html

我使用以下路径规范/**从我的 rails 应用程序的根目录运行它.我希望这有帮助.如果您有非_spec.rb"文件,您可能需要修改路径参数.

I run this from the root of my rails app with the following path spec/**. I hope that helps. If you have non "_spec.rb" files in there you might need to modify the path argument.

这篇关于从 rspec 生成 HTML 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆