在 Ant 中使用内联 CSS 获取 Xspec 测试结果

Get Xspec test results with inline CSS within Ant

Xspec 提供了 HTML 份包含测试结果的报告。我正在寻找一种方法来避免在 Xspec 报告中使用 CSS 文件的绝对路径。

我在 HTML 页面看到 there is a command-line option -i to place the CSS inline。脚本版本默认使用inline=true。

但是,样式表中用于格式化 HTML 报告的默认设置是 false。我正在从 Ant 调用 Xspec,但我似乎找不到在 Ant 调用中添加此选项的方法。这可能吗?

即使您通过在 GitHub 上发帖找到了答案,我也会回答这个问题,希望它对其他人有用。

正如在 GitHub, the functionality to have inline CSS when running XSpec with Ant is currently in two pull requests which should be merged soon into the master branch of XSpec. In the meantime you can use the branch in this pull request 上的回答那样具有此功能。非常感谢任何反馈!