Explain karma unit test times

血红的双手。 提交于 2019-12-31 02:36:28

问题


I've been searching the web for this for two days and I found nothing. Maybe I'm looking in the wrong way — I don't know...

So here it is: what are the times on my console when running a Karma+Jasmine+phantomJs unit test?

... Executed 1 of 1 SUCCESS (0.878 secs / 0.112 secs)

First, I though that the second time is the total unit test time (for example, when running multiple tasks), however, sometimes the first time gets to be 'bigger', sometimes not...

Anyone?


回答1:


total time / net time

  • net time = only test execution (in the browser)
  • total time = how long it took since Karma noticed the file change till the final result was printed (net time + communication with the browser + loading the files in the browser)

See karma/lib/reporters/base.js



来源:https://stackoverflow.com/questions/34639279/explain-karma-unit-test-times

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!