简体   繁体   中英

How to report execution time of each test in protractor-jasmine?

Is there a ready-made way to display execution time of every 'it' block in protractor and jasmine? I want to display the execution time of each test wether it failed or succeeded.

Install jasmine-spec-reporter npm library and add the below code to your config file.

/* Jasmin specReporter */
const { SpecReporter } = require('jasmine-spec-reporter');
 jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true, displayDuration: true } }));

Hope it helps you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM