背景:我使用Jasmine作为我的量角器测试框架,我一直在使用jasmine spec reporter进行报告。昨天我稍微改变了我的量角器conf.js我jasmineNodeOpts
参数包括print()
功能即JasmineNodeOpts - 打印量角器测试结果
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 120000,
includeStackTrace : true,
isVerbose : true,
print: function() {}
},
,因为我学会了将各自报告之前删除.
我加入这个打印功能。例如,用我的测试报告回来:
. ✓ should display a profile question about IT loads
. ✓ checks the width of the progress bar
. ✓ selects an option from the radio buttons and updates the progress bar
而现在这些领先的点都被删除。不过,现在我的最终报告也略有改变来自:
14 specs, 2 failures Finished in 45.473 seconds // this is the old, desired output
要这样:
Executed 14 of 14 specs (2 FAILED) in 45 secs. // this is my current, undesired output
我想两全其美的,具有.
从我的报告中删除,但保留了以前的总报告。
问题:我不能jasmineNodeOpts
和/或print()
功能找到详细文档。它在jasmine-spec-reporter和protractor reference conf中被提及,但是它没有真正的工作原理文档,只提供了很弱的例子。
有谁知道我在哪里可以了解更多关于这个print()
函数和/或如何更改我的最终测试输出?
太棒了,谢谢你。完美工作。不知道为什么我自己没有想到编辑记者,我被困在如何配置'print()'函数:) – Gunderson
Np ..很高兴它工作! – AdityaReddy