javascript - Identify protractor test failed assertions -
when protractor test fails, how can find test failed?
for example, displays is: 1 test, 1 assertion, 1 failure
if had multiple assertions , failures, not know 1 failed.
i looked in documentation , in live selenium webdriver trace, did not see how know assertion or test failed.
edit: looks there whole time , didn't read
failures:
1) angularjs homepage todo list should add todo message: expected false true. stacktrace: error: failed expectation @ [object object]. (/users/jacques.fu/projects/protractor/todo-spec.js:11:75)
by default, protractor
should give stacktrace on line expectation failed or error happened. but, find useful terminalreporter
jasmine reporter jasmine-reporters
. add onprepare()
make work:
jasmine.getenv().addreporter(new jasminereporters.terminalreporter({ verbosity: 3, color: true, showstack: true }));
Comments
Post a Comment