javascript - Print only jasmine focused tests -
it difficult describe how useful , convenient "focused specs" feature of jasmine >=2.1 is. using fdescribe
and/or fit
can run specified tests without modifying protractor config.
the problem output on console. it prints out every single spec matching pattern in protractor configuration.
first, focused specs test results printed. information useful:
using chromedriver directly... [launcher] running 1 instances of webdriver started open case screen should display correct url ... passed . should display summary description ... passed
then, there huge output containing "disabled" tests (~20 seconds scroll down):
click button after switching environment should redirect queue in previous environment ... disabled 1 of 1 passed (0 skipped, 1 disabled). ... 'you have been logged out.' alert message should show alert message after closing sessions in browser window ... disabled 1 of 1 passed (0 skipped, 1 disabled). success: 202 specs, 0 failures, 0 skipped, 199 disabled in 12.89s.
in other words, there 3 specs out of 202 executed, 202 printed on console, 199 of them disabled.
is there way avoid having disabled specs being written on console while having verbose information focused tests?
note using terminalreporter
jasmine-reporters
:
jasmine.getenv().addreporter(new jasminereporters.terminalreporter({ verbosity: 3, color: true, showstack: true }));
setting verbosity
< 3 helps solve problem disabled tests, in case, not getting information tests focused:
using chromedriver directly... [launcher] running 1 instances of webdriver started ...success: 202 specs, 0 failures, 0 skipped, 199 disabled in 12.225s. 202 specs, 0 failures
for same problem in future - decided use different terminal reporter instead - jasmine-spec-reporter
- quite configurable , provides more precise , better formatted output (see these awesome checkboxes, example):
note still reports maximum information executed tests. needed in case.
Comments
Post a Comment