背景:我使用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